diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-06-07 12:37:42 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-06-07 12:37:42 -0400 |
| commit | 8c08151643329be88fa8f45c72a7b4c7c30ce218 (patch) | |
| tree | 164f38a34b7790fef0de35b7786613632e5fc18b | |
| parent | 730fc4e9bae5a157c83db8061c2c6831a297e959 (diff) | |
| download | dynamic-extension-8c08151643329be88fa8f45c72a7b4c7c30ce218.tar.gz | |
Adjusted DE tests to cover all policy configurations
| -rw-r--r-- | CMakeLists.txt | 22 | ||||
| -rw-r--r-- | tests/de_level_tag.cpp | 25 | ||||
| -rw-r--r-- | tests/de_level_tomb.cpp | 25 | ||||
| -rw-r--r-- | tests/de_tier_tag.cpp | 25 | ||||
| -rw-r--r-- | tests/de_tier_tomb.cpp | 25 | ||||
| -rw-r--r-- | tests/dynamic_extension_tests.inc (renamed from tests/dynamic_extension_tests.cpp) | 12 |
6 files changed, 119 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fd2107..9d73729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,25 @@ if (tests) target_link_libraries(mutable_buffer_tests PUBLIC gsl check subunit pthread) target_include_directories(mutable_buffer_tests PRIVATE include) - add_executable(dynamic_extension_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/dynamic_extension_tests.cpp) - target_link_libraries(dynamic_extension_tests PUBLIC gsl check subunit pthread) - target_include_directories(dynamic_extension_tests PRIVATE include) + #add_executable(dynamic_extension_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/dynamic_extension_tests.cpp) + #target_link_libraries(dynamic_extension_tests PUBLIC gsl check subunit pthread) + #target_include_directories(dynamic_extension_tests PRIVATE include) + + add_executable(de_tier_tag ${CMAKE_CURRENT_SOURCE_DIR}/tests/de_tier_tag.cpp) + target_link_libraries(de_tier_tag PUBLIC gsl check subunit pthread) + target_include_directories(de_tier_tag PRIVATE include) + + add_executable(de_tier_tomb ${CMAKE_CURRENT_SOURCE_DIR}/tests/de_tier_tomb.cpp) + target_link_libraries(de_tier_tomb PUBLIC gsl check subunit pthread) + target_include_directories(de_tier_tomb PRIVATE include) + + add_executable(de_level_tag ${CMAKE_CURRENT_SOURCE_DIR}/tests/de_level_tag.cpp) + target_link_libraries(de_level_tag PUBLIC gsl check subunit pthread) + target_include_directories(de_level_tag PRIVATE include) + + add_executable(de_level_tomb ${CMAKE_CURRENT_SOURCE_DIR}/tests/de_level_tomb.cpp) + target_link_libraries(de_level_tomb PUBLIC gsl check subunit pthread) + target_include_directories(de_level_tomb PRIVATE include) add_executable(memisam_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/memisam_tests.cpp) target_link_libraries(memisam_tests PUBLIC gsl check subunit pthread) diff --git a/tests/de_level_tag.cpp b/tests/de_level_tag.cpp new file mode 100644 index 0000000..91f158c --- /dev/null +++ b/tests/de_level_tag.cpp @@ -0,0 +1,25 @@ +/* + * tests/dynamic_extension_tests.cpp + * + * Unit tests for Dynamic Extension Framework + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * All rights reserved. Published under the Modified BSD License. + * + */ +#include <set> +#include <random> +#include <algorithm> + +#include "testing.h" +#include "framework/DynamicExtension.h" +#include "shard/WIRS.h" + +#include <check.h> +using namespace de; + +typedef DynamicExtension<WRec, WIRS<WRec>, WIRSQuery<WRec>, LayoutPolicy::LEVELING, DeletePolicy::TAGGING> DE; + +#include "dynamic_extension_tests.inc" diff --git a/tests/de_level_tomb.cpp b/tests/de_level_tomb.cpp new file mode 100644 index 0000000..c3dc5df --- /dev/null +++ b/tests/de_level_tomb.cpp @@ -0,0 +1,25 @@ +/* + * tests/dynamic_extension_tests.cpp + * + * Unit tests for Dynamic Extension Framework + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * All rights reserved. Published under the Modified BSD License. + * + */ +#include <set> +#include <random> +#include <algorithm> + +#include "testing.h" +#include "framework/DynamicExtension.h" +#include "shard/WIRS.h" + +#include <check.h> +using namespace de; + +typedef DynamicExtension<WRec, WIRS<WRec>, WIRSQuery<WRec>, LayoutPolicy::LEVELING, DeletePolicy::TOMBSTONE> DE; + +#include "dynamic_extension_tests.inc" diff --git a/tests/de_tier_tag.cpp b/tests/de_tier_tag.cpp new file mode 100644 index 0000000..9b6b5a4 --- /dev/null +++ b/tests/de_tier_tag.cpp @@ -0,0 +1,25 @@ +/* + * tests/dynamic_extension_tests.cpp + * + * Unit tests for Dynamic Extension Framework + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * All rights reserved. Published under the Modified BSD License. + * + */ +#include <set> +#include <random> +#include <algorithm> + +#include "testing.h" +#include "framework/DynamicExtension.h" +#include "shard/WIRS.h" + +#include <check.h> +using namespace de; + +typedef DynamicExtension<WRec, WIRS<WRec>, WIRSQuery<WRec>, LayoutPolicy::TEIRING, DeletePolicy::TAGGING> DE; + +#include "dynamic_extension_tests.inc" diff --git a/tests/de_tier_tomb.cpp b/tests/de_tier_tomb.cpp new file mode 100644 index 0000000..82942fd --- /dev/null +++ b/tests/de_tier_tomb.cpp @@ -0,0 +1,25 @@ +/* + * tests/dynamic_extension_tests.cpp + * + * Unit tests for Dynamic Extension Framework + * + * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Dong Xie <dongx@psu.edu> + * + * All rights reserved. Published under the Modified BSD License. + * + */ +#include <set> +#include <random> +#include <algorithm> + +#include "testing.h" +#include "framework/DynamicExtension.h" +#include "shard/WIRS.h" + +#include <check.h> +using namespace de; + +typedef DynamicExtension<WRec, WIRS<WRec>, WIRSQuery<WRec>, LayoutPolicy::TEIRING, DeletePolicy::TOMBSTONE> DE; + +#include "dynamic_extension_tests.inc" diff --git a/tests/dynamic_extension_tests.cpp b/tests/dynamic_extension_tests.inc index 41400c5..f94a294 100644 --- a/tests/dynamic_extension_tests.cpp +++ b/tests/dynamic_extension_tests.inc @@ -9,18 +9,6 @@ * All rights reserved. Published under the Modified BSD License. * */ -#include <set> -#include <random> -#include <algorithm> - -#include "testing.h" -#include "framework/DynamicExtension.h" -#include "shard/WIRS.h" - -#include <check.h> -using namespace de; - -typedef DynamicExtension<WRec, WIRS<WRec>, WIRSQuery<WRec>> DE; START_TEST(t_create) { |