diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c6eb9e607..0d44e0656 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -290,10 +290,12 @@ SETUP_BASIC_TEST( entt/entity/view.cpp ) +# Test entity_no_mixin + SETUP_BASIC_TEST( NAME entity_no_mixin SOURCES - entt/entity/storage_utility.cpp + entt/entity_no_mixin/storage_utility.cpp DEFS ENTT_NO_MIXIN ) diff --git a/test/entt/entity/storage_utility.cpp b/test/entt/entity/storage_utility.cpp index 67c8249a8..d0ea387dd 100644 --- a/test/entt/entity/storage_utility.cpp +++ b/test/entt/entity/storage_utility.cpp @@ -14,28 +14,16 @@ TYPED_TEST(StorageUtility, StorageType) { using value_type = TestFixture::type; // just a bunch of static asserts to avoid regressions -#ifdef ENTT_NO_MIXIN - testing::StaticAssertTypeEq, entt::basic_storage>(); - testing::StaticAssertTypeEq, entt::storage>(); -#else testing::StaticAssertTypeEq, entt::sigh_mixin>>(); testing::StaticAssertTypeEq, entt::sigh_mixin>>(); -#endif // ENTT_NO_MIXIN } TYPED_TEST(StorageUtility, StorageFor) { using value_type = TestFixture::type; // just a bunch of static asserts to avoid regressions -#ifdef ENTT_NO_MIXIN - testing::StaticAssertTypeEq, const entt::basic_storage>(); - testing::StaticAssertTypeEq, entt::basic_storage>(); - testing::StaticAssertTypeEq, const entt::storage>(); - testing::StaticAssertTypeEq, entt::storage>(); -#else testing::StaticAssertTypeEq, const entt::sigh_mixin>>(); testing::StaticAssertTypeEq, entt::sigh_mixin>>(); testing::StaticAssertTypeEq, const entt::sigh_mixin>>(); testing::StaticAssertTypeEq, entt::sigh_mixin>>(); -#endif } diff --git a/test/entt/entity_no_mixin/storage_utility.cpp b/test/entt/entity_no_mixin/storage_utility.cpp new file mode 100644 index 000000000..bc536cdb4 --- /dev/null +++ b/test/entt/entity_no_mixin/storage_utility.cpp @@ -0,0 +1,29 @@ +#include +#include + +template +struct StorageUtility: testing::Test { + using type = Type; +}; + +using StorageUtilityTypes = ::testing::Types; + +TYPED_TEST_SUITE(StorageUtility, StorageUtilityTypes, ); + +TYPED_TEST(StorageUtility, StorageType) { + using value_type = TestFixture::type; + + // just a bunch of static asserts to avoid regressions + testing::StaticAssertTypeEq, entt::basic_storage>(); + testing::StaticAssertTypeEq, entt::storage>(); +} + +TYPED_TEST(StorageUtility, StorageFor) { + using value_type = TestFixture::type; + + // just a bunch of static asserts to avoid regressions + testing::StaticAssertTypeEq, const entt::basic_storage>(); + testing::StaticAssertTypeEq, entt::basic_storage>(); + testing::StaticAssertTypeEq, const entt::storage>(); + testing::StaticAssertTypeEq, entt::storage>(); +}