Browse Source

test: minor changes (thanks msvc for accepting invalid code)

Michele Caini 4 years ago
parent
commit
81e6bbe643
2 changed files with 4 additions and 4 deletions
  1. 2 2
      test/entt/entity/group.cpp
  2. 2 2
      test/entt/entity/view.cpp

+ 2 - 2
test/entt/entity/group.cpp

@@ -173,7 +173,7 @@ TEST(NonOwningGroup, Each) {
     registry.emplace<char>(e1);
 
     ASSERT_NE(iterable.begin(), iterable.end());
-    ASSERT_NO_THROW(iterable.begin()->swap(*iterable.begin()));
+    ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
 
     auto cgroup = std::as_const(registry).group_if_exists(entt::get<const int, const char>);
     auto citerable = cgroup.each();
@@ -795,7 +795,7 @@ TEST(OwningGroup, Each) {
     registry.emplace<char>(e1);
 
     ASSERT_NE(iterable.begin(), iterable.end());
-    ASSERT_NO_THROW(iterable.begin()->swap(*iterable.begin()));
+    ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
 
     auto cgroup = std::as_const(registry).group_if_exists<const int>(entt::get<const char>);
     auto citerable = cgroup.each();

+ 2 - 2
test/entt/entity/view.cpp

@@ -191,7 +191,7 @@ TEST(SingleComponentView, Each) {
     auto iterable = view.each();
 
     ASSERT_NE(iterable.begin(), iterable.end());
-    ASSERT_NO_THROW(iterable.begin()->swap(*iterable.begin()));
+    ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
 
     auto cview = std::as_const(registry).view<const int>();
     auto citerable = cview.each();
@@ -680,7 +680,7 @@ TEST(MultiComponentView, Each) {
     auto iterable = view.each();
 
     ASSERT_NE(iterable.begin(), iterable.end());
-    ASSERT_NO_THROW(iterable.begin()->swap(*iterable.begin()));
+    ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
 
     auto cview = std::as_const(registry).view<const int, const char>();
     auto citerable = cview.each();