Răsfoiți Sursa

test: avoid using custom entities when emplacing in a registry - see #1095

Michele Caini 2 ani în urmă
părinte
comite
872e0c6dde
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      test/entt/entity/view.cpp

+ 2 - 2
test/entt/entity/view.cpp

@@ -544,7 +544,7 @@ TEST(SingleComponentView, SwapStorage) {
     ASSERT_EQ(view.storage<0u>(), nullptr);
     ASSERT_EQ(cview.storage<const int>(), nullptr);
 
-    const entt::entity entity{4u};
+    const entt::entity entity{registry.create()};
     registry.emplace<int>(entity);
 
     view.storage(registry.storage<int>());
@@ -1509,7 +1509,7 @@ TEST(MultiComponentView, SwapStorage) {
     ASSERT_EQ(view.storage<0u>(), nullptr);
     ASSERT_EQ(view.storage<const char>(), nullptr);
 
-    const entt::entity entity{4u};
+    const entt::entity entity{registry.create()};
     registry.emplace<int>(entity);
     registry.emplace<char>(entity);