Browse Source

test: code coverage

Michele Caini 5 years ago
parent
commit
64cc200df0
1 changed files with 7 additions and 7 deletions
  1. 7 7
      test/entt/meta/meta_type.cpp

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

@@ -49,8 +49,8 @@ struct clazz_t {
 };
 
 struct overloaded_func_t {
-    void e(int v) {
-        value = v + v;
+    int e(int v) const {
+        return v + v;
     }
 
     int f(const base_t &, int a, int b) {
@@ -59,20 +59,20 @@ struct overloaded_func_t {
 
     int f(int a, int b) {
         value = a;
-        return b * b;
+        return g(b);
     }
 
     int f(int v) const {
-        return v * v;
+        return g(v);
     }
 
     float f(int a, float b) {
         value = a;
-        return b + b;
+        return e(b);
     }
 
-    void g(int v) {
-        value = v * v;
+    int g(int v) const {
+        return v * v;
     }
 
     inline static int value = 0;