diff --git a/test/entt/container/dense_map.cpp b/test/entt/container/dense_map.cpp index dc9415cbb..4cbec3151 100644 --- a/test/entt/container/dense_map.cpp +++ b/test/entt/container/dense_map.cpp @@ -966,7 +966,7 @@ TEST(DenseMap, Indexing) { map[key] = 99; ASSERT_TRUE(map.contains(key)); - ASSERT_EQ(map[std::move(key)], 99); + ASSERT_EQ(map[int{key}], 99); ASSERT_EQ(cmap.at(key), 99); // NOLINT ASSERT_EQ(map.at(key), 99); } diff --git a/test/entt/core/any.cpp b/test/entt/core/any.cpp index 36ef7ae2a..66d6933b5 100644 --- a/test/entt/core/any.cpp +++ b/test/entt/core/any.cpp @@ -1298,7 +1298,7 @@ TEST_F(Any, ForwardAsAny) { int value = 42; auto ref = entt::forward_as_any(value); auto cref = entt::forward_as_any(std::as_const(value)); - auto any = entt::forward_as_any(std::move(value)); + auto any = entt::forward_as_any(int{value}); ASSERT_TRUE(any); ASSERT_TRUE(ref); diff --git a/test/entt/core/iterator.cpp b/test/entt/core/iterator.cpp index a1510c6b0..a68ba5ad5 100644 --- a/test/entt/core/iterator.cpp +++ b/test/entt/core/iterator.cpp @@ -6,11 +6,12 @@ #include "../common/boxed_int.h" TEST(InputIteratorPointer, Functionalities) { - test::boxed_int instance{}; - entt::input_iterator_pointer ptr{std::move(instance)}; + entt::input_iterator_pointer ptr{test::boxed_int{0}}; + + ASSERT_EQ(ptr->value, 0); + ptr->value = 42; - ASSERT_EQ(instance.value, 0); // NOLINT ASSERT_EQ(ptr->value, 42); ASSERT_EQ(ptr->value, (*ptr).value); ASSERT_EQ(ptr.operator->(), &ptr.operator*()); diff --git a/test/entt/core/type_info.cpp b/test/entt/core/type_info.cpp index 5518967d9..45bb9ced0 100644 --- a/test/entt/core/type_info.cpp +++ b/test/entt/core/type_info.cpp @@ -47,7 +47,7 @@ TEST(TypeInfo, Functionalities) { static_assert(std::is_copy_assignable_v, "Copy assignable type required"); static_assert(std::is_move_assignable_v, "Move assignable type required"); - entt::type_info info{std::in_place_type}; + const entt::type_info info{std::in_place_type}; entt::type_info other{std::in_place_type}; ASSERT_EQ(info, entt::type_info{std::in_place_type}); @@ -67,12 +67,6 @@ TEST(TypeInfo, Functionalities) { ASSERT_EQ(other.index(), entt::type_index::value()); ASSERT_EQ(other.hash(), entt::type_hash::value()); ASSERT_EQ(other.name(), entt::type_name::value()); - - other = std::move(info); - - ASSERT_EQ(other.index(), entt::type_index::value()); - ASSERT_EQ(other.hash(), entt::type_hash::value()); - ASSERT_EQ(other.name(), entt::type_name::value()); } TEST(TypeInfo, Order) { diff --git a/test/entt/meta/meta_any.cpp b/test/entt/meta/meta_any.cpp index ab2e70168..d7c7d61d7 100644 --- a/test/entt/meta/meta_any.cpp +++ b/test/entt/meta/meta_any.cpp @@ -1355,7 +1355,7 @@ TEST_F(MetaAny, ForwardAsMeta) { int value = 42; auto ref = entt::forward_as_meta(value); auto cref = entt::forward_as_meta(std::as_const(value)); - auto any = entt::forward_as_meta(std::move(value)); + auto any = entt::forward_as_meta(int{value}); ASSERT_TRUE(any); ASSERT_TRUE(ref); diff --git a/test/entt/resource/resource_cache.cpp b/test/entt/resource/resource_cache.cpp index a352faccc..28e3422ef 100644 --- a/test/entt/resource/resource_cache.cpp +++ b/test/entt/resource/resource_cache.cpp @@ -376,8 +376,8 @@ TEST(ResourceCache, Indexing) { cache.load("resource"_hs, 99); ASSERT_TRUE(cache.contains("resource"_hs)); - ASSERT_EQ(cache[std::move("resource"_hs)], 99); ASSERT_EQ(std::as_const(cache)["resource"_hs], 99); + ASSERT_EQ(cache["resource"_hs], 99); } TEST(ResourceCache, LoaderDispatching) {