Browse Source

test: use shared non default constructible type

Michele Caini 2 years ago
parent
commit
4983d40358
1 changed files with 2 additions and 5 deletions
  1. 2 5
      test/entt/meta/meta_container.cpp

+ 2 - 5
test/entt/meta/meta_container.cpp

@@ -13,13 +13,10 @@
 #include <entt/meta/meta.hpp>
 #include <entt/meta/meta.hpp>
 #include <entt/meta/resolve.hpp>
 #include <entt/meta/resolve.hpp>
 #include "../common/config.h"
 #include "../common/config.h"
+#include "../common/non_default_constructible.h"
 
 
 struct invalid {};
 struct invalid {};
 
 
-struct non_default_constructible {
-    non_default_constructible() = delete;
-};
-
 TEST(MetaContainer, Invalid) {
 TEST(MetaContainer, Invalid) {
     ASSERT_FALSE(entt::meta_any{42}.as_sequence_container());
     ASSERT_FALSE(entt::meta_any{42}.as_sequence_container());
     ASSERT_FALSE(entt::meta_any{42}.as_associative_container());
     ASSERT_FALSE(entt::meta_any{42}.as_associative_container());
@@ -325,7 +322,7 @@ TEST(SequenceContainer, StdDeque) {
 }
 }
 
 
 TEST(SequenceContainer, NonDefaultConstructible) {
 TEST(SequenceContainer, NonDefaultConstructible) {
-    std::vector<non_default_constructible> vec{};
+    std::vector<test::non_default_constructible> vec{};
     auto any = entt::forward_as_meta(vec);
     auto any = entt::forward_as_meta(vec);
     auto view = any.as_sequence_container();
     auto view = any.as_sequence_container();