Explorar o código

test: minor changes

Michele Caini %!s(int64=2) %!d(string=hai) anos
pai
achega
699dff81b7
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 2
      test/entt/entity/registry.cpp
  2. 1 0
      test/entt/entity/storage_no_instance.cpp

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

@@ -524,10 +524,10 @@ ENTT_DEBUG_TEST(RegistryDeathTest, Storage) {
     registry.storage<test::empty>("other"_hs);
     registry.storage<test::empty>("other"_hs);
 
 
     ASSERT_DEATH(registry.storage<int>("other"_hs), "");
     ASSERT_DEATH(registry.storage<int>("other"_hs), "");
-    ASSERT_DEATH(std::as_const(registry).storage<int>("other"_hs), "");
+    ASSERT_DEATH([[maybe_unused]] const auto *storage = std::as_const(registry).storage<int>("other"_hs), "");
 
 
     ASSERT_DEATH(registry.storage<entt::entity>("other"_hs), "");
     ASSERT_DEATH(registry.storage<entt::entity>("other"_hs), "");
-    ASSERT_DEATH(std::as_const(registry).storage<entt::entity>("other"_hs), "");
+    ASSERT_DEATH([[maybe_unused]] const auto *storage = std::as_const(registry).storage<entt::entity>("other"_hs), "");
 }
 }
 
 
 TEST(Registry, Identifiers) {
 TEST(Registry, Identifiers) {

+ 1 - 0
test/entt/entity/storage_no_instance.cpp

@@ -8,6 +8,7 @@
 #include <gtest/gtest.h>
 #include <gtest/gtest.h>
 #include <entt/core/iterator.hpp>
 #include <entt/core/iterator.hpp>
 #include <entt/core/type_info.hpp>
 #include <entt/core/type_info.hpp>
+#include <entt/entity/component.hpp>
 #include <entt/entity/entity.hpp>
 #include <entt/entity/entity.hpp>
 #include <entt/entity/storage.hpp>
 #include <entt/entity/storage.hpp>
 #include "../../common/config.h"
 #include "../../common/config.h"