test: suppress some warnings here and there
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -256,7 +256,7 @@ TEST(Snapshot, Iterator) {
|
||||
ASSERT_EQ(registry.view<another_component>().size(), size);
|
||||
|
||||
registry.view<another_component>().each([](const auto entity, const auto &) {
|
||||
ASSERT_TRUE(entt::to_integral(entity) % 2);
|
||||
ASSERT_NE(entt::to_integral(entity) % 2u, 0u);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -658,7 +658,7 @@ TEST_F(MetaAny, SetGet) {
|
||||
const auto value = any.get("value"_hs);
|
||||
|
||||
ASSERT_TRUE(value);
|
||||
ASSERT_TRUE(value.try_cast<int>());
|
||||
ASSERT_NE(value.try_cast<int>(), nullptr);
|
||||
ASSERT_EQ(value.cast<int>(), 42);
|
||||
ASSERT_EQ(instance.value, 42);
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ TEST_F(MetaData, GetMetaAnyArg) {
|
||||
const auto value = entt::resolve<clazz_t>().data("i"_hs).get(any);
|
||||
|
||||
ASSERT_TRUE(value);
|
||||
ASSERT_TRUE(value.cast<int>());
|
||||
ASSERT_TRUE(static_cast<bool>(value.cast<int>()));
|
||||
ASSERT_EQ(value.cast<int>(), 99);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ TEST(Lib, Meta) {
|
||||
ASSERT_TRUE(pos && vel);
|
||||
|
||||
ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve<int>());
|
||||
ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast<int>());
|
||||
ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast<int>(), nullptr);
|
||||
ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast<int>(), 42);
|
||||
ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast<int>(), 3);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ TEST(Lib, Meta) {
|
||||
ASSERT_TRUE(pos && vel);
|
||||
|
||||
ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve<int>());
|
||||
ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast<int>());
|
||||
ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast<int>(), nullptr);
|
||||
ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast<int>(), 42);
|
||||
ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast<int>(), 3);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ TEST(Lib, Meta) {
|
||||
ASSERT_TRUE(pos && vel);
|
||||
|
||||
ASSERT_EQ(pos.type().data("x"_hs).type(), entt::resolve<int>());
|
||||
ASSERT_TRUE(pos.type().data("y"_hs).get(pos).try_cast<int>());
|
||||
ASSERT_NE(pos.type().data("y"_hs).get(pos).try_cast<int>(), nullptr);
|
||||
ASSERT_EQ(pos.type().data("x"_hs).get(pos).cast<int>(), 42);
|
||||
ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast<int>(), 3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user