Explorar o código

lib, test: minor changes

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
df346ab380
Modificáronse 3 ficheiros con 6 adicións e 10 borrados
  1. 2 3
      test/lib/meta/lib.cpp
  2. 4 4
      test/lib/meta/main.cpp
  3. 0 3
      test/lib/meta/types.h

+ 2 - 3
test/lib/meta/lib.cpp

@@ -6,12 +6,11 @@
 #include <entt/meta/meta.hpp>
 #include "types.h"
 
-
 position create_position(int x, int y) {
     return position{x, y};
 }
 
-ENTT_EXPORT void meta_set_up() {
+ENTT_EXPORT void set_up() {
     entt::meta<position>()
             .type("position"_hs)
             .ctor<&create_position>()
@@ -24,7 +23,7 @@ ENTT_EXPORT void meta_set_up() {
             .data<&velocity::dy>("dy"_hs);
 }
 
-ENTT_EXPORT void meta_tear_down() {
+ENTT_EXPORT void tear_down() {
     entt::meta<position>().reset();
     entt::meta<velocity>().reset();
 }

+ 4 - 4
test/lib/meta/main.cpp

@@ -6,14 +6,14 @@
 #include <entt/meta/meta.hpp>
 #include "types.h"
 
-ENTT_IMPORT void meta_set_up();
-ENTT_IMPORT void meta_tear_down();
+ENTT_IMPORT void set_up();
+ENTT_IMPORT void tear_down();
 ENTT_IMPORT entt::meta_any wrap_int(int);
 
 TEST(Lib, Meta) {
     ASSERT_FALSE(entt::resolve("position"_hs));
 
-    meta_set_up();
+    set_up();
     entt::meta<double>().conv<int>();
 
     ASSERT_TRUE(entt::resolve("position"_hs));
@@ -35,5 +35,5 @@ TEST(Lib, Meta) {
 
     ASSERT_EQ(wrap_int(1).type(), entt::resolve<int>());
 
-    meta_tear_down();
+    tear_down();
 }

+ 0 - 3
test/lib/meta/types.h

@@ -1,10 +1,8 @@
 #ifndef ENTT_LIB_META_TYPES_H
 #define ENTT_LIB_META_TYPES_H
 
-
 #include <entt/lib/attribute.h>
 
-
 struct ENTT_API position {
     int x{};
     int y{};
@@ -15,5 +13,4 @@ struct ENTT_API velocity {
     double dy{};
 };
 
-
 #endif // ENTT_LIB_META_TYPES_H