Просмотр исходного кода

test: use shared aggregate type

Michele Caini 2 лет назад
Родитель
Сommit
577ff97980
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      test/entt/core/any.cpp

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

@@ -10,6 +10,7 @@
 #include <gtest/gtest.h>
 #include <entt/core/any.hpp>
 #include <entt/core/type_info.hpp>
+#include "../common/aggregate.h"
 #include "../common/config.h"
 
 struct empty {
@@ -1555,12 +1556,8 @@ TEST_F(Any, NoSboAlignment) {
 }
 
 TEST_F(Any, AggregatesMustWork) {
-    struct aggregate_type {
-        int value;
-    };
-
     // the goal of this test is to enforce the requirements for aggregate types
-    entt::any{std::in_place_type<aggregate_type>, 42}.emplace<aggregate_type>(42);
+    entt::any{std::in_place_type<test::aggregate>, 42}.emplace<test::aggregate>(42);
 }
 
 TEST_F(Any, DeducedArrayType) {