diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-27 18:21:26 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-27 18:21:26 -0400 |
| commit | d6e08e9d8d3ac9b356ac50cee22b41f828160247 (patch) | |
| tree | 2c1f62f6385072e1a824e557693634acc3136cdd /tests | |
| parent | f462921cbc52688fb478c6ac86a891e596fd6053 (diff) | |
| download | dynamic-extension-d6e08e9d8d3ac9b356ac50cee22b41f828160247.tar.gz | |
Expanded query interface
Query interface now enables skipping of delete processing and stopping
query processing when first match is found.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/memisam_tests.cpp | 6 | ||||
| -rw-r--r-- | tests/pgm_tests.cpp | 6 | ||||
| -rw-r--r-- | tests/wirs_tests.cpp | 6 | ||||
| -rw-r--r-- | tests/wss_tests.cpp | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/tests/memisam_tests.cpp b/tests/memisam_tests.cpp index 7f6d136..0ae97dc 100644 --- a/tests/memisam_tests.cpp +++ b/tests/memisam_tests.cpp @@ -223,16 +223,16 @@ START_TEST(t_irs_query_merge) irs_query_parms<Rec> parms = {lower_key, upper_key, k}; parms.rng = gsl_rng_alloc(gsl_rng_mt19937); - std::vector<std::vector<Rec>> results(2); + std::vector<std::vector<de::Wrapped<Rec>>> results(2); for (size_t i=0; i<1000; i++) { auto state1 = IRSQuery<Rec>::get_query_state(&shard, &parms); ((IRSState<WRec> *) state1)->sample_size = k; - results[0] = strip_wrapping(IRSQuery<Rec>::query(&shard, state1, &parms)); + results[0] = IRSQuery<Rec>::query(&shard, state1, &parms); auto state2 = IRSQuery<Rec>::get_query_state(&shard, &parms); ((IRSState<WRec> *) state2)->sample_size = k; - results[1] = strip_wrapping(IRSQuery<Rec>::query(&shard, state2, &parms)); + results[1] = IRSQuery<Rec>::query(&shard, state2, &parms); IRSQuery<Rec>::delete_query_state(state1); IRSQuery<Rec>::delete_query_state(state2); diff --git a/tests/pgm_tests.cpp b/tests/pgm_tests.cpp index 9622522..0552417 100644 --- a/tests/pgm_tests.cpp +++ b/tests/pgm_tests.cpp @@ -212,12 +212,12 @@ START_TEST(t_range_query_merge) ck_assert_int_eq(results[0].size() + results[1].size(), result_size); - std::vector<std::vector<Rec>> proc_results; + std::vector<std::vector<Wrapped<Rec>>> proc_results; for (size_t j=0; j<results.size(); j++) { - proc_results.emplace_back(std::vector<Rec>()); + proc_results.emplace_back(std::vector<Wrapped<Rec>>()); for (size_t i=0; i<results[j].size(); i++) { - proc_results[j].emplace_back(results[j][i].rec); + proc_results[j].emplace_back(results[j][i]); } } diff --git a/tests/wirs_tests.cpp b/tests/wirs_tests.cpp index 2fe7f68..a72f950 100644 --- a/tests/wirs_tests.cpp +++ b/tests/wirs_tests.cpp @@ -229,16 +229,16 @@ START_TEST(t_wirs_query_merge) wirs_query_parms<WRec> parms = {lower_key, upper_key, k}; parms.rng = gsl_rng_alloc(gsl_rng_mt19937); - std::vector<std::vector<WRec>> results(2); + std::vector<std::vector<Wrapped<WRec>>> results(2); for (size_t i=0; i<1000; i++) { auto state1 = WIRSQuery<WRec>::get_query_state(shard, &parms); ((WIRSState<WRec> *) state1)->sample_size = k; - results[0] = strip_wrapping(WIRSQuery<WRec>::query(shard, state1, &parms)); + results[0] = WIRSQuery<WRec>::query(shard, state1, &parms); auto state2 = WIRSQuery<WRec>::get_query_state(shard, &parms); ((WIRSState<WRec> *) state2)->sample_size = k; - results[1] = strip_wrapping(WIRSQuery<WRec>::query(shard, state2, &parms)); + results[1] = WIRSQuery<WRec>::query(shard, state2, &parms); WIRSQuery<WRec>::delete_query_state(state1); WIRSQuery<WRec>::delete_query_state(state2); diff --git a/tests/wss_tests.cpp b/tests/wss_tests.cpp index d3bc5c0..cdc8001 100644 --- a/tests/wss_tests.cpp +++ b/tests/wss_tests.cpp @@ -225,16 +225,16 @@ START_TEST(t_wss_query_merge) wss_query_parms<WRec> parms = {k}; parms.rng = gsl_rng_alloc(gsl_rng_mt19937); - std::vector<std::vector<WRec>> results(2); + std::vector<std::vector<Wrapped<WRec>>> results(2); for (size_t i=0; i<1000; i++) { auto state1 = WSSQuery<WRec>::get_query_state(shard, &parms); ((WSSState<WRec> *) state1)->sample_size = k; - results[0] = strip_wrapping(WSSQuery<WRec>::query(shard, state1, &parms)); + results[0] = WSSQuery<WRec>::query(shard, state1, &parms); auto state2 = WSSQuery<WRec>::get_query_state(shard, &parms); ((WSSState<WRec> *) state2)->sample_size = k; - results[1] = strip_wrapping(WSSQuery<WRec>::query(shard, state2, &parms)); + results[1] = WSSQuery<WRec>::query(shard, state2, &parms); WSSQuery<WRec>::delete_query_state(state1); WSSQuery<WRec>::delete_query_state(state2); |