diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-01-22 10:14:05 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-01-22 10:15:46 -0500 |
| commit | 4ac2e14d24a1fdd3f9bf777775b16bf6a677f487 (patch) | |
| tree | 2faee0bb55d67a6bda4a789e2d04436e118e598f /tests/rangecount_tests.cpp | |
| parent | 38693c342558628c75e0ab0d23c32a95a499ed8b (diff) | |
| download | dynamic-extension-4ac2e14d24a1fdd3f9bf777775b16bf6a677f487.tar.gz | |
Added RangeCount query
Diffstat (limited to 'tests/rangecount_tests.cpp')
| -rw-r--r-- | tests/rangecount_tests.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/rangecount_tests.cpp b/tests/rangecount_tests.cpp new file mode 100644 index 0000000..fe3a587 --- /dev/null +++ b/tests/rangecount_tests.cpp @@ -0,0 +1,55 @@ +/* + * tests/rangequery_tests.cpp + * + * Unit tests for Range Queries across several different + * shards + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * Distributed under the Modified BSD License. + * + */ + +#include "shard/ISAMTree.h" +#include "query/rangecount.h" +#include "include/testing.h" + +#include <check.h> + +using namespace de; + +typedef ISAMTree<Rec> Shard; + +#include "include/rangecount.h" + + +Suite *unit_testing() +{ + Suite *unit = suite_create("Range Count Query Testing"); + inject_rangecount_tests(unit); + + return unit; +} + + +int shard_unit_tests() +{ + int failed = 0; + Suite *unit = unit_testing(); + SRunner *unit_shardner = srunner_create(unit); + + srunner_run_all(unit_shardner, CK_NORMAL); + failed = srunner_ntests_failed(unit_shardner); + srunner_free(unit_shardner); + + return failed; +} + + +int main() +{ + int unit_failed = shard_unit_tests(); + + return (unit_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} |