diff --git a/test/entt/entity/group.cpp b/test/entt/entity/group.cpp index ae76d4fb1..a51319746 100644 --- a/test/entt/entity/group.cpp +++ b/test/entt/entity/group.cpp @@ -86,11 +86,11 @@ TEST(NonOwningGroup, Functionalities) { ASSERT_EQ(cgroup.rbegin(), cgroup.rend()); ASSERT_TRUE(group.empty()); - ASSERT_TRUE(group.capacity()); + ASSERT_NE(group.capacity(), 0u); group.shrink_to_fit(); - ASSERT_FALSE(group.capacity()); + ASSERT_EQ(group.capacity(), 0u); } TEST(NonOwningGroup, ElementAccess) { diff --git a/test/entt/entity/snapshot.cpp b/test/entt/entity/snapshot.cpp index df4d9d557..1d73a2bc0 100644 --- a/test/entt/entity/snapshot.cpp +++ b/test/entt/entity/snapshot.cpp @@ -256,7 +256,7 @@ TEST(Snapshot, Iterator) { ASSERT_EQ(registry.view().size(), size); registry.view().each([](const auto entity, const auto &) { - ASSERT_TRUE(entt::to_integral(entity) % 2); + ASSERT_NE(entt::to_integral(entity) % 2u, 0u); }); } diff --git a/test/entt/meta/meta_any.cpp b/test/entt/meta/meta_any.cpp index 958884ceb..fe3b7cb0c 100644 --- a/test/entt/meta/meta_any.cpp +++ b/test/entt/meta/meta_any.cpp @@ -658,7 +658,7 @@ TEST_F(MetaAny, SetGet) { const auto value = any.get("value"_hs); ASSERT_TRUE(value); - ASSERT_TRUE(value.try_cast()); + ASSERT_NE(value.try_cast(), nullptr); ASSERT_EQ(value.cast(), 42); ASSERT_EQ(instance.value, 42); diff --git a/test/entt/meta/meta_data.cpp b/test/entt/meta/meta_data.cpp index 79c87da2e..998818812 100644 --- a/test/entt/meta/meta_data.cpp +++ b/test/entt/meta/meta_data.cpp @@ -216,7 +216,7 @@ TEST_F(MetaData, GetMetaAnyArg) { const auto value = entt::resolve().data("i"_hs).get(any); ASSERT_TRUE(value); - ASSERT_TRUE(value.cast()); + ASSERT_TRUE(static_cast(value.cast())); ASSERT_EQ(value.cast(), 99); } diff --git a/test/lib/meta/main.cpp b/test/lib/meta/main.cpp index 2b4c3dfde..984d9113d 100644 --- a/test/lib/meta/main.cpp +++ b/test/lib/meta/main.cpp @@ -28,7 +28,7 @@ TEST(Lib, Meta) { ASSERT_TRUE(pos && vel); ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve()); - ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast()); + ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast(), nullptr); ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast(), 42); ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast(), 3); diff --git a/test/lib/meta_plugin/main.cpp b/test/lib/meta_plugin/main.cpp index 18eee633e..2efb5eaaa 100644 --- a/test/lib/meta_plugin/main.cpp +++ b/test/lib/meta_plugin/main.cpp @@ -29,7 +29,7 @@ TEST(Lib, Meta) { ASSERT_TRUE(pos && vel); ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve()); - ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast()); + ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast(), nullptr); ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast(), 42); ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast(), 3); diff --git a/test/lib/meta_plugin_std/main.cpp b/test/lib/meta_plugin_std/main.cpp index 18eee633e..2efb5eaaa 100644 --- a/test/lib/meta_plugin_std/main.cpp +++ b/test/lib/meta_plugin_std/main.cpp @@ -29,7 +29,7 @@ TEST(Lib, Meta) { ASSERT_TRUE(pos && vel); ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve()); - ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast()); + ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast(), nullptr); ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast(), 42); ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast(), 3);