Browse Source

test: use shared non_comparable type

Michele Caini 2 years ago
parent
commit
1717b3683c
1 changed files with 5 additions and 8 deletions
  1. 5 8
      test/entt/core/any.cpp

+ 5 - 8
test/entt/core/any.cpp

@@ -12,6 +12,7 @@
 #include <entt/core/type_info.hpp>
 #include "../common/aggregate.h"
 #include "../common/config.h"
+#include "../common/non_comparable.h"
 
 struct empty {
     ~empty() {
@@ -37,10 +38,6 @@ struct fat {
     double value[4];
 };
 
-struct not_comparable {
-    bool operator==(const not_comparable &) const = delete;
-};
-
 struct not_movable {
     not_movable() = default;
 
@@ -1226,7 +1223,7 @@ TEST_F(Any, Comparable) {
     test('c', value);
 }
 
-TEST_F(Any, NotComparable) {
+TEST_F(Any, NonComparable) {
     auto test = [](const auto &instance) {
         auto any = entt::forward_as_any(instance);
 
@@ -1239,9 +1236,9 @@ TEST_F(Any, NotComparable) {
         ASSERT_TRUE(entt::any{} != any);
     };
 
-    test(not_comparable{});
-    test(std::unordered_map<int, not_comparable>{});
-    test(std::vector<not_comparable>{});
+    test(test::non_comparable{});
+    test(std::unordered_map<int, test::non_comparable>{});
+    test(std::vector<test::non_comparable>{});
 }
 
 TEST_F(Any, CompareVoid) {