Browse Source

test: use shared non_movable type

Michele Caini 2 years ago
parent
commit
134640411a
1 changed files with 3 additions and 14 deletions
  1. 3 14
      test/entt/core/any.cpp

+ 3 - 14
test/entt/core/any.cpp

@@ -13,6 +13,7 @@
 #include "../common/aggregate.h"
 #include "../common/config.h"
 #include "../common/non_comparable.h"
+#include "../common/non_movable.h"
 
 struct empty {
     ~empty() {
@@ -38,18 +39,6 @@ struct fat {
     double value[4];
 };
 
-struct not_movable {
-    not_movable() = default;
-
-    not_movable(const not_movable &) = default;
-    not_movable(not_movable &&) = delete;
-
-    not_movable &operator=(const not_movable &) = default;
-    not_movable &operator=(not_movable &&) = delete;
-
-    double payload{};
-};
-
 struct alignas(64u) over_aligned {};
 
 struct Any: ::testing::Test {
@@ -1410,8 +1399,8 @@ TEST_F(Any, NonCopyableValueType) {
 }
 
 TEST_F(Any, NonMovableType) {
-    entt::any any{std::in_place_type<not_movable>};
-    entt::any other{std::in_place_type<not_movable>};
+    entt::any any{std::in_place_type<test::non_movable>};
+    entt::any other{std::in_place_type<test::non_movable>};
 
     ASSERT_TRUE(any);
     ASSERT_TRUE(other);