|
|
@@ -30,9 +30,9 @@ void listener(counter &counter, Registry &, typename Registry::entity_type) {
|
|
|
++counter.value;
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, GenericType) {
|
|
|
+TEST(SighMixin, GenericType) {
|
|
|
entt::entity entities[2u]{entt::entity{3}, entt::entity{42}};
|
|
|
- entt::sigh_storage_mixin<entt::storage<int>> pool;
|
|
|
+ entt::sigh_mixin<entt::storage<int>> pool;
|
|
|
entt::sparse_set &base = pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
@@ -95,9 +95,9 @@ TEST(SighStorageMixin, GenericType) {
|
|
|
ASSERT_TRUE(pool.empty());
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, StableType) {
|
|
|
+TEST(SighMixin, StableType) {
|
|
|
entt::entity entities[2u]{entt::entity{3}, entt::entity{42}};
|
|
|
- entt::sigh_storage_mixin<entt::storage<stable_type>> pool;
|
|
|
+ entt::sigh_mixin<entt::storage<stable_type>> pool;
|
|
|
entt::sparse_set &base = pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
@@ -160,9 +160,9 @@ TEST(SighStorageMixin, StableType) {
|
|
|
ASSERT_FALSE(pool.empty());
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, EmptyType) {
|
|
|
+TEST(SighMixin, EmptyType) {
|
|
|
entt::entity entities[2u]{entt::entity{3}, entt::entity{42}};
|
|
|
- entt::sigh_storage_mixin<entt::storage<empty_type>> pool;
|
|
|
+ entt::sigh_mixin<entt::storage<empty_type>> pool;
|
|
|
entt::sparse_set &base = pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
@@ -225,9 +225,9 @@ TEST(SighStorageMixin, EmptyType) {
|
|
|
ASSERT_TRUE(pool.empty());
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, NonDefaultConstructibleType) {
|
|
|
+TEST(SighMixin, NonDefaultConstructibleType) {
|
|
|
entt::entity entities[2u]{entt::entity{3}, entt::entity{42}};
|
|
|
- entt::sigh_storage_mixin<entt::storage<non_default_constructible>> pool;
|
|
|
+ entt::sigh_mixin<entt::storage<non_default_constructible>> pool;
|
|
|
entt::sparse_set &base = pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
@@ -281,8 +281,8 @@ TEST(SighStorageMixin, NonDefaultConstructibleType) {
|
|
|
ASSERT_TRUE(pool.empty());
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, VoidType) {
|
|
|
- entt::sigh_storage_mixin<entt::storage<void>> pool;
|
|
|
+TEST(SighMixin, VoidType) {
|
|
|
+ entt::sigh_mixin<entt::storage<void>> pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
counter on_construct{};
|
|
|
@@ -297,7 +297,7 @@ TEST(SighStorageMixin, VoidType) {
|
|
|
ASSERT_EQ(pool.type(), entt::type_id<void>());
|
|
|
ASSERT_TRUE(pool.contains(entt::entity{99}));
|
|
|
|
|
|
- entt::sigh_storage_mixin<entt::storage<void>> other{std::move(pool)};
|
|
|
+ entt::sigh_mixin<entt::storage<void>> other{std::move(pool)};
|
|
|
|
|
|
ASSERT_FALSE(pool.contains(entt::entity{99}));
|
|
|
ASSERT_TRUE(other.contains(entt::entity{99}));
|
|
|
@@ -313,8 +313,8 @@ TEST(SighStorageMixin, VoidType) {
|
|
|
ASSERT_EQ(on_destroy.value, 1);
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, Move) {
|
|
|
- entt::sigh_storage_mixin<entt::storage<int>> pool;
|
|
|
+TEST(SighMixin, Move) {
|
|
|
+ entt::sigh_mixin<entt::storage<int>> pool;
|
|
|
entt::registry registry;
|
|
|
|
|
|
counter on_construct{};
|
|
|
@@ -330,7 +330,7 @@ TEST(SighStorageMixin, Move) {
|
|
|
ASSERT_TRUE(std::is_move_assignable_v<decltype(pool)>);
|
|
|
ASSERT_EQ(pool.type(), entt::type_id<int>());
|
|
|
|
|
|
- entt::sigh_storage_mixin<entt::storage<int>> other{std::move(pool)};
|
|
|
+ entt::sigh_mixin<entt::storage<int>> other{std::move(pool)};
|
|
|
|
|
|
ASSERT_TRUE(pool.empty());
|
|
|
ASSERT_FALSE(other.empty());
|
|
|
@@ -347,7 +347,7 @@ TEST(SighStorageMixin, Move) {
|
|
|
ASSERT_EQ(pool.get(entt::entity{3}), 3);
|
|
|
ASSERT_EQ(other.at(0u), static_cast<entt::entity>(entt::null));
|
|
|
|
|
|
- other = entt::sigh_storage_mixin<entt::storage<int>>{};
|
|
|
+ other = entt::sigh_mixin<entt::storage<int>>{};
|
|
|
other.bind(entt::forward_as_any(registry));
|
|
|
|
|
|
other.emplace(entt::entity{42}, 42);
|
|
|
@@ -365,9 +365,9 @@ TEST(SighStorageMixin, Move) {
|
|
|
ASSERT_EQ(on_destroy.value, 1);
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, Swap) {
|
|
|
- entt::sigh_storage_mixin<entt::storage<int>> pool;
|
|
|
- entt::sigh_storage_mixin<entt::storage<int>> other;
|
|
|
+TEST(SighMixin, Swap) {
|
|
|
+ entt::sigh_mixin<entt::storage<int>> pool;
|
|
|
+ entt::sigh_mixin<entt::storage<int>> other;
|
|
|
entt::registry registry;
|
|
|
|
|
|
counter on_construct{};
|
|
|
@@ -411,7 +411,7 @@ TEST(SighStorageMixin, Swap) {
|
|
|
ASSERT_EQ(on_destroy.value, 3);
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, CustomAllocator) {
|
|
|
+TEST(SighMixin, CustomAllocator) {
|
|
|
auto test = [](auto pool, auto alloc) {
|
|
|
using registry_type = typename decltype(pool)::registry_type;
|
|
|
registry_type registry;
|
|
|
@@ -466,12 +466,12 @@ TEST(SighStorageMixin, CustomAllocator) {
|
|
|
|
|
|
test::throwing_allocator<entt::entity> allocator{};
|
|
|
|
|
|
- test(entt::sigh_storage_mixin<entt::basic_storage<int, entt::entity, test::throwing_allocator<int>>>{allocator}, allocator);
|
|
|
- test(entt::sigh_storage_mixin<entt::basic_storage<std::true_type, entt::entity, test::throwing_allocator<std::true_type>>>{allocator}, allocator);
|
|
|
- test(entt::sigh_storage_mixin<entt::basic_storage<stable_type, entt::entity, test::throwing_allocator<stable_type>>>{allocator}, allocator);
|
|
|
+ test(entt::sigh_mixin<entt::basic_storage<int, entt::entity, test::throwing_allocator<int>>>{allocator}, allocator);
|
|
|
+ test(entt::sigh_mixin<entt::basic_storage<std::true_type, entt::entity, test::throwing_allocator<std::true_type>>>{allocator}, allocator);
|
|
|
+ test(entt::sigh_mixin<entt::basic_storage<stable_type, entt::entity, test::throwing_allocator<stable_type>>>{allocator}, allocator);
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, ThrowingAllocator) {
|
|
|
+TEST(SighMixin, ThrowingAllocator) {
|
|
|
auto test = [](auto pool) {
|
|
|
using pool_allocator_type = typename decltype(pool)::allocator_type;
|
|
|
using value_type = typename decltype(pool)::value_type;
|
|
|
@@ -543,12 +543,12 @@ TEST(SighStorageMixin, ThrowingAllocator) {
|
|
|
ASSERT_EQ(on_destroy.value, 1);
|
|
|
};
|
|
|
|
|
|
- test(entt::sigh_storage_mixin<entt::basic_storage<int, entt::entity, test::throwing_allocator<int>>>{});
|
|
|
- test(entt::sigh_storage_mixin<entt::basic_storage<stable_type, entt::entity, test::throwing_allocator<stable_type>>>{});
|
|
|
+ test(entt::sigh_mixin<entt::basic_storage<int, entt::entity, test::throwing_allocator<int>>>{});
|
|
|
+ test(entt::sigh_mixin<entt::basic_storage<stable_type, entt::entity, test::throwing_allocator<stable_type>>>{});
|
|
|
}
|
|
|
|
|
|
-TEST(SighStorageMixin, ThrowingComponent) {
|
|
|
- entt::sigh_storage_mixin<entt::storage<test::throwing_type>> pool;
|
|
|
+TEST(SighMixin, ThrowingComponent) {
|
|
|
+ entt::sigh_mixin<entt::storage<test::throwing_type>> pool;
|
|
|
using registry_type = typename decltype(pool)::registry_type;
|
|
|
registry_type registry;
|
|
|
|