Browse Source

test: minor changes (help the code coverage tool)

Michele Caini 3 years ago
parent
commit
2f2b0cf98a
1 changed files with 2 additions and 8 deletions
  1. 2 8
      test/entt/entity/registry.cpp

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

@@ -852,10 +852,7 @@ TEST(Registry, Each) {
     match = 0u;
     match = 0u;
 
 
     registry.each([&](auto entity) {
     registry.each([&](auto entity) {
-        if(registry.all_of<int>(entity)) {
-            ++match;
-        }
-
+        match += registry.all_of<int>(entity);
         static_cast<void>(registry.create());
         static_cast<void>(registry.create());
         ++tot;
         ++tot;
     });
     });
@@ -882,10 +879,7 @@ TEST(Registry, Each) {
     match = 0u;
     match = 0u;
 
 
     registry.each([&](auto entity) {
     registry.each([&](auto entity) {
-        if(registry.all_of<int>(entity)) {
-            ++match;
-        }
-
+        match += registry.all_of<int>(entity);
         registry.destroy(entity);
         registry.destroy(entity);
         ++tot;
         ++tot;
     });
     });