Sfoglia il codice sorgente

test: try to make lcov happy

Michele Caini 3 anni fa
parent
commit
a86bf1332b

+ 1 - 3
test/lib/locator/plugin/main.cpp

@@ -11,9 +11,7 @@ TEST(Lib, Locator) {
 
     ASSERT_EQ(entt::locator<service>::value().value, 42);
 
-    userdata ud{};
-    ud.handle = entt::locator<service>::handle();
-    ud.value = 3;
+    userdata ud{entt::locator<service>::handle(), 3};
 
     cr_plugin ctx;
     ctx.userdata = &ud;

+ 2 - 0
test/lib/locator/plugin/types.h

@@ -3,6 +3,8 @@
 
 #include <entt/locator/locator.hpp>
 
+struct service;
+
 struct userdata {
     typename entt::locator<service>::node_type handle;
     int value;

+ 1 - 2
test/lib/meta/plugin/main.cpp

@@ -14,8 +14,7 @@ TEST(Lib, Meta) {
 
     ASSERT_FALSE(entt::resolve("position"_hs));
 
-    userdata ud{};
-    ud.ctx = entt::locator<entt::meta_ctx>::handle();
+    userdata ud{entt::locator<entt::meta_ctx>::handle(), entt::meta_any{}};
 
     cr_plugin ctx;
     ctx.userdata = &ud;

+ 2 - 1
test/lib/meta/plugin/types.h

@@ -2,7 +2,8 @@
 #define ENTT_LIB_META_PLUGIN_TYPES_H
 
 #include <entt/locator/locator.hpp>
-#include <entt/meta/meta.hpp>
+
+class meta_ctx;
 
 struct userdata {
     entt::locator<entt::meta_ctx>::node_type ctx;