Browse Source

test: use shared non_comparable type

Michele Caini 2 years ago
parent
commit
e210c31bf2
1 changed files with 5 additions and 8 deletions
  1. 5 8
      test/entt/meta/meta_any.cpp

+ 5 - 8
test/entt/meta/meta_any.cpp

@@ -8,6 +8,7 @@
 #include <entt/meta/meta.hpp>
 #include <entt/meta/resolve.hpp>
 #include "../common/config.h"
+#include "../common/non_comparable.h"
 
 struct clazz_t {
     clazz_t()
@@ -61,10 +62,6 @@ enum class enum_class : unsigned short int {
     bar = 42u
 };
 
-struct not_comparable_t {
-    bool operator==(const not_comparable_t &) const = delete;
-};
-
 struct unmanageable_t {
     unmanageable_t() = default;
     unmanageable_t(const unmanageable_t &) = delete;
@@ -1053,15 +1050,15 @@ TEST_F(MetaAny, Comparable) {
     ASSERT_TRUE(entt::meta_any{} != any);
 }
 
-TEST_F(MetaAny, NotComparable) {
-    entt::meta_any any{not_comparable_t{}};
+TEST_F(MetaAny, NonComparable) {
+    entt::meta_any any{test::non_comparable{}};
 
     ASSERT_EQ(any, any);
-    ASSERT_NE(any, entt::meta_any{not_comparable_t{}});
+    ASSERT_NE(any, entt::meta_any{test::non_comparable{}});
     ASSERT_NE(entt::meta_any{}, any);
 
     ASSERT_TRUE(any == any);
-    ASSERT_FALSE(any == entt::meta_any{not_comparable_t{}});
+    ASSERT_FALSE(any == entt::meta_any{test::non_comparable{}});
     ASSERT_TRUE(entt::meta_any{} != any);
 }