Browse Source

meta: test (and add a todo note to fix/revert) a corner case of meta_factory

Michele Caini 1 year ago
parent
commit
f1bfbaa981
2 changed files with 8 additions and 1 deletions
  1. 1 0
      TODO
  2. 7 1
      test/entt/meta/meta_factory.cpp

+ 1 - 0
TODO

@@ -44,3 +44,4 @@ TODO:
 * built-in no-pagination storage - no_pagination page size as limits::max
 * meta_any ownership construction and from_void
 * meta_factory() isn't fully tested yet
+* entt::meta isn't required anymore, we can do everything with entt::meta_factory and avoid symbol duplication

+ 7 - 1
test/entt/meta/meta_factory.cpp

@@ -1,8 +1,8 @@
 #include <gtest/gtest.h>
 #include <entt/core/type_info.hpp>
-#include <entt/locator/locator.hpp>
 #include <entt/meta/context.hpp>
 #include <entt/meta/factory.hpp>
+#include <entt/meta/meta.hpp>
 #include <entt/meta/resolve.hpp>
 
 TEST(MetaFactory, Constructors) {
@@ -16,8 +16,14 @@ TEST(MetaFactory, Constructors) {
     ASSERT_NE(entt::resolve(entt::type_id<int>()), entt::meta_type{});
     ASSERT_EQ(entt::resolve(ctx, entt::type_id<int>()), entt::meta_type{});
 
+    // this is because of entt::meta, which should be deprecated nowadays
+    ASSERT_FALSE(entt::resolve(entt::type_id<int>()).is_integral());
+
     factory = entt::meta_factory<int>{ctx};
 
     ASSERT_NE(entt::resolve(entt::type_id<int>()), entt::meta_type{});
     ASSERT_NE(entt::resolve(ctx, entt::type_id<int>()), entt::meta_type{});
+
+    // this is because of entt::meta, which should be deprecated nowadays
+    ASSERT_FALSE(entt::resolve(ctx, entt::type_id<int>()).is_integral());
 }