|
|
@@ -2092,6 +2092,22 @@ TEST(Registry, Storage) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+TEST(Registry, VoidType) {
|
|
|
+ using namespace entt::literals;
|
|
|
+
|
|
|
+ entt::registry registry;
|
|
|
+ const auto entity = registry.create();
|
|
|
+ auto &storage = registry.storage<void>("custom"_hs);
|
|
|
+ storage.emplace(entity);
|
|
|
+
|
|
|
+ ASSERT_TRUE(registry.storage<void>().empty());
|
|
|
+ ASSERT_FALSE(registry.storage<void>("custom"_hs).empty());
|
|
|
+ ASSERT_TRUE(registry.storage<void>("custom"_hs).contains(entity));
|
|
|
+
|
|
|
+ ASSERT_EQ(registry.storage<void>().type(), entt::type_id<void>());
|
|
|
+ ASSERT_EQ(registry.storage<void>("custom"_hs).type(), entt::type_id<void>());
|
|
|
+}
|
|
|
+
|
|
|
TEST(Registry, RegistryStorageIterator) {
|
|
|
entt::registry registry;
|
|
|
const auto entity = registry.create();
|