Explorar el Código

test: suppress warnings + increase code coverage

Michele Caini hace 5 años
padre
commit
4f93995bd7
Se han modificado 2 ficheros con 13 adiciones y 1 borrados
  1. 12 0
      test/entt/meta/meta_func.cpp
  2. 1 1
      test/entt/meta/meta_type.cpp

+ 12 - 0
test/entt/meta/meta_func.cpp

@@ -442,8 +442,20 @@ TEST_F(MetaFunc, ExternalMemberFunction) {
 }
 
 TEST_F(MetaFunc, ReRegistration) {
+    int count = 0;
+
+    for([[maybe_unnused]] auto func: entt::resolve<func_t>().func()) {
+        ++count;
+    }
+
     MetaFunc::StaticSetUp();
 
+    for([[maybe_unnused]] auto func: entt::resolve<func_t>().func()) {
+        --count;
+    }
+
+    ASSERT_EQ(count, 0);
+
     auto *node = entt::internal::meta_info<base_t>::resolve();
 
     ASSERT_NE(node->func, nullptr);

+ 1 - 1
test/entt/meta/meta_type.cpp

@@ -674,7 +674,7 @@ TEST_F(MetaType, ClassTemplate) {
 TEST_F(MetaType, ReRegistration) {
     int count = 0;
 
-    for(auto type: entt::resolve()) {
+    for([[maybe_unnused]] auto type: entt::resolve()) {
         ++count;
     }