Browse Source

test: avoid using the trampoline resolve function

Michele Caini 3 years ago
parent
commit
3c9045a3a8

+ 2 - 1
test/entt/meta/meta_base.cpp

@@ -1,6 +1,7 @@
 #include <utility>
 #include <gtest/gtest.h>
 #include <entt/core/hashed_string.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/node.hpp>
@@ -181,7 +182,7 @@ TEST_F(MetaBase, TransferWithMutatingThis) {
 TEST_F(MetaBase, ReRegistration) {
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<derived_t>();
+    auto &&node = entt::internal::resolve<derived_t>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
 
     ASSERT_TRUE(node.details);
     ASSERT_FALSE(node.details->base.empty());

+ 2 - 1
test/entt/meta/meta_conv.cpp

@@ -1,6 +1,7 @@
 #include <utility>
 #include <gtest/gtest.h>
 #include <entt/core/hashed_string.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/node.hpp>
@@ -62,7 +63,7 @@ TEST_F(MetaConv, Functionalities) {
 TEST_F(MetaConv, ReRegistration) {
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<clazz_t>();
+    auto &&node = entt::internal::resolve<clazz_t>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
 
     ASSERT_TRUE(node.details);
     ASSERT_FALSE(node.details->conv.empty());

+ 2 - 1
test/entt/meta/meta_ctor.cpp

@@ -3,6 +3,7 @@
 #include <entt/core/hashed_string.hpp>
 #include <entt/core/utility.hpp>
 #include <entt/entity/registry.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/resolve.hpp>
@@ -205,7 +206,7 @@ TEST_F(MetaCtor, NonDefaultConstructibleType) {
 TEST_F(MetaCtor, ReRegistration) {
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<double>();
+    auto &&node = entt::internal::resolve<double>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
 
     ASSERT_TRUE(node.details);
     ASSERT_FALSE(node.details->ctor.empty());

+ 2 - 1
test/entt/meta/meta_data.cpp

@@ -4,6 +4,7 @@
 #include <gtest/gtest.h>
 #include <entt/core/hashed_string.hpp>
 #include <entt/core/type_traits.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/node.hpp>
@@ -645,7 +646,7 @@ TEST_F(MetaData, ReRegistration) {
 
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<base_t>();
+    auto &&node = entt::internal::resolve<base_t>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
     auto type = entt::resolve<base_t>();
 
     ASSERT_TRUE(node.details);

+ 2 - 1
test/entt/meta/meta_dtor.cpp

@@ -1,6 +1,7 @@
 #include <utility>
 #include <gtest/gtest.h>
 #include <entt/core/hashed_string.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/node.hpp>
@@ -101,7 +102,7 @@ TEST_F(MetaDtor, AsRefConstruction) {
 TEST_F(MetaDtor, ReRegistration) {
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<clazz_t>();
+    auto &&node = entt::internal::resolve<clazz_t>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
 
     ASSERT_NE(node.dtor.dtor, nullptr);
 

+ 2 - 1
test/entt/meta/meta_prop.cpp

@@ -3,6 +3,7 @@
 #include <utility>
 #include <gtest/gtest.h>
 #include <entt/core/hashed_string.hpp>
+#include <entt/locator/locator.hpp>
 #include <entt/meta/factory.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/resolve.hpp>
@@ -86,7 +87,7 @@ TEST_F(MetaProp, ReRegistration) {
 
     SetUp();
 
-    auto &&node = entt::internal::resolve_TODO<base_1_t>();
+    auto &&node = entt::internal::resolve<base_1_t>(entt::internal::meta_context::from(entt::locator<entt::meta_ctx>::value_or()));
     auto type = entt::resolve<base_1_t>();
 
     ASSERT_TRUE(node.details);