test: reduced the amount of madness by a few degrees :)

This commit is contained in:
Michele Caini
2020-10-05 16:54:20 +02:00
parent df5deb8b88
commit 0709c402f8
8 changed files with 113 additions and 113 deletions

View File

@@ -13,8 +13,8 @@ TEST(Algorithm, StdSort) {
sort(arr.begin(), arr.end());
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_LT(arr[i], arr[i+1]);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_LT(arr[i], arr[i+1u]);
}
}
@@ -27,8 +27,8 @@ TEST(Algorithm, StdSortBoxedInt) {
return lhs.value > rhs.value;
});
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_GT(arr[i].value, arr[i+1].value);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_GT(arr[i].value, arr[i+1u].value);
}
}
@@ -38,8 +38,8 @@ TEST(Algorithm, InsertionSort) {
sort(arr.begin(), arr.end());
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_LT(arr[i], arr[i+1]);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_LT(arr[i], arr[i+1u]);
}
}
@@ -51,8 +51,8 @@ TEST(Algorithm, InsertionSortBoxedInt) {
return lhs.value > rhs.value;
});
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_GT(arr[i].value, arr[i+1].value);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_GT(arr[i].value, arr[i+1u].value);
}
}
@@ -71,8 +71,8 @@ TEST(Algorithm, RadixSort) {
return value;
});
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_LT(arr[i], arr[i+1]);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_LT(arr[i], arr[i+1u]);
}
}
@@ -84,8 +84,8 @@ TEST(Algorithm, RadixSortBoxedInt) {
return instance.value;
});
for(typename decltype(arr)::size_type i = 0; i < (arr.size() - 1); ++i) {
ASSERT_GT(arr[i].value, arr[i+1].value);
for(auto i = 0u; i < (arr.size() - 1u); ++i) {
ASSERT_GT(arr[i].value, arr[i+1u].value);
}
}

View File

@@ -41,21 +41,21 @@ TEST(NonOwningGroup, Functionalities) {
ASSERT_NE(cgroup.begin(), cgroup.end());
ASSERT_NE(group.rbegin(), group.rend());
ASSERT_NE(cgroup.rbegin(), cgroup.rend());
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{1});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group.size<int>(), 1u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.emplace<int>(e0);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{2});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 2u);
ASSERT_EQ(group.size<int>(), 2u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.remove<int>(e0);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{1});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group.size<int>(), 1u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.get<char>(e0) = '1';
registry.get<char>(e1) = '2';
@@ -106,7 +106,7 @@ TEST(NonOwningGroup, ElementAccess) {
registry.emplace<int>(e1);
registry.emplace<char>(e1);
for(typename decltype(group)::size_type i{}; i < group.size(); ++i) {
for(auto i = 0u; i < group.size(); ++i) {
ASSERT_EQ(group[i], i ? e0 : e1);
ASSERT_EQ(cgroup[i], i ? e0 : e1);
}
@@ -310,7 +310,7 @@ TEST(NonOwningGroup, IndexRebuiltOnDestroy) {
registry.destroy(e0);
registry.emplace<int>(registry.create(), 42);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group[{}], e1);
ASSERT_EQ(group.get<int>(e1), 1);
ASSERT_EQ(group.get<unsigned int>(e1), 1u);
@@ -479,7 +479,7 @@ TEST(NonOwningGroup, EmptyAndNonEmptyTypes) {
ASSERT_TRUE(entt == e0 || entt == e1);
}
ASSERT_EQ(group.size(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 2u);
}
TEST(NonOwningGroup, TrackEntitiesOnComponentDestruction) {
@@ -607,21 +607,21 @@ TEST(OwningGroup, Functionalities) {
ASSERT_NE(cgroup.begin(), cgroup.end());
ASSERT_NE(group.rbegin(), group.rend());
ASSERT_NE(cgroup.rbegin(), cgroup.rend());
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{1});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group.size<int>(), 1u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.emplace<int>(e0);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{2});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 2u);
ASSERT_EQ(group.size<int>(), 2u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.remove<int>(e0);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size<int>(), typename decltype(group)::size_type{1});
ASSERT_EQ(cgroup.size<const char>(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group.size<int>(), 1u);
ASSERT_EQ(cgroup.size<const char>(), 2u);
registry.get<char>(e0) = '1';
registry.get<char>(e1) = '2';
@@ -669,7 +669,7 @@ TEST(OwningGroup, ElementAccess) {
registry.emplace<int>(e1);
registry.emplace<char>(e1);
for(typename decltype(group)::size_type i{}; i < group.size(); ++i) {
for(auto i = 0u; i < group.size(); ++i) {
ASSERT_EQ(group[i], i ? e0 : e1);
ASSERT_EQ(cgroup[i], i ? e0 : e1);
}
@@ -957,7 +957,7 @@ TEST(OwningGroup, IndexRebuiltOnDestroy) {
registry.destroy(e0);
registry.emplace<int>(registry.create(), 42);
ASSERT_EQ(group.size(), typename decltype(group)::size_type{1});
ASSERT_EQ(group.size(), 1u);
ASSERT_EQ(group[{}], e1);
ASSERT_EQ(group.get<int>(e1), 1);
ASSERT_EQ(group.get<unsigned int>(e1), 1u);
@@ -1136,7 +1136,7 @@ TEST(OwningGroup, EmptyAndNonEmptyTypes) {
ASSERT_TRUE(entt == e0 || entt == e1);
}
ASSERT_EQ(group.size(), typename decltype(group)::size_type{2});
ASSERT_EQ(group.size(), 2u);
}
TEST(OwningGroup, TrackEntitiesOnComponentDestruction) {

View File

@@ -100,17 +100,17 @@ TEST(Registry, Context) {
TEST(Registry, Functionalities) {
entt::registry registry;
ASSERT_EQ(registry.size(), entt::registry::size_type{0});
ASSERT_EQ(registry.alive(), entt::registry::size_type{0});
ASSERT_EQ(registry.size(), 0u);
ASSERT_EQ(registry.alive(), 0u);
ASSERT_NO_THROW((registry.reserve<int, char>(8)));
ASSERT_NO_THROW(registry.reserve(42));
ASSERT_TRUE(registry.empty());
ASSERT_EQ(registry.capacity(), entt::registry::size_type{42});
ASSERT_EQ(registry.capacity<int>(), entt::registry::size_type{8});
ASSERT_EQ(registry.capacity<char>(), entt::registry::size_type{8});
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
ASSERT_EQ(registry.capacity(), 42u);
ASSERT_EQ(registry.capacity<int>(), 8u);
ASSERT_EQ(registry.capacity<char>(), 8u);
ASSERT_EQ(registry.size<int>(), 0u);
ASSERT_EQ(registry.size<char>(), 0u);
ASSERT_TRUE((registry.empty<int, char>()));
registry.prepare<double>();
@@ -124,8 +124,8 @@ TEST(Registry, Functionalities) {
ASSERT_TRUE(registry.has<>(e0));
ASSERT_FALSE(registry.any<>(e1));
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
ASSERT_EQ(registry.size<int>(), 1u);
ASSERT_EQ(registry.size<char>(), 1u);
ASSERT_FALSE(registry.empty<int>());
ASSERT_FALSE(registry.empty<char>());
@@ -186,28 +186,28 @@ TEST(Registry, Functionalities) {
ASSERT_EQ(static_cast<const entt::registry &>(registry).get<int>(e0), 1);
ASSERT_EQ(static_cast<const entt::registry &>(registry).get<int>(e1), 1);
ASSERT_EQ(registry.size(), entt::registry::size_type{3});
ASSERT_EQ(registry.alive(), entt::registry::size_type{3});
ASSERT_EQ(registry.size(), 3u);
ASSERT_EQ(registry.alive(), 3u);
ASSERT_FALSE(registry.empty());
ASSERT_EQ(registry.version(e2), entt::registry::version_type{0});
ASSERT_EQ(registry.current(e2), entt::registry::version_type{0});
ASSERT_EQ(registry.version(e2), 0u);
ASSERT_EQ(registry.current(e2), 0u);
ASSERT_NO_THROW(registry.destroy(e2));
ASSERT_EQ(registry.version(e2), entt::registry::version_type{0});
ASSERT_EQ(registry.current(e2), entt::registry::version_type{1});
ASSERT_EQ(registry.version(e2), 0u);
ASSERT_EQ(registry.current(e2), 1u);
ASSERT_TRUE(registry.valid(e0));
ASSERT_TRUE(registry.valid(e1));
ASSERT_FALSE(registry.valid(e2));
ASSERT_EQ(registry.size(), entt::registry::size_type{3});
ASSERT_EQ(registry.alive(), entt::registry::size_type{2});
ASSERT_EQ(registry.size(), 3u);
ASSERT_EQ(registry.alive(), 2u);
ASSERT_FALSE(registry.empty());
ASSERT_NO_THROW(registry.clear());
ASSERT_EQ(registry.size(), entt::registry::size_type{3});
ASSERT_EQ(registry.alive(), entt::registry::size_type{0});
ASSERT_EQ(registry.size(), 3u);
ASSERT_EQ(registry.alive(), 0u);
ASSERT_TRUE(registry.empty());
const auto e3 = registry.create();
@@ -215,8 +215,8 @@ TEST(Registry, Functionalities) {
ASSERT_EQ(registry.get_or_emplace<int>(e3, 3), 3);
ASSERT_EQ(registry.get_or_emplace<char>(e3, 'c'), 'c');
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{1});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
ASSERT_EQ(registry.size<int>(), 1u);
ASSERT_EQ(registry.size<char>(), 1u);
ASSERT_FALSE(registry.empty<int>());
ASSERT_FALSE(registry.empty<char>());
ASSERT_TRUE((registry.has<int, char>(e3)));
@@ -225,15 +225,15 @@ TEST(Registry, Functionalities) {
ASSERT_NO_THROW(registry.clear<int>());
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{1});
ASSERT_EQ(registry.size<int>(), 0u);
ASSERT_EQ(registry.size<char>(), 1u);
ASSERT_TRUE(registry.empty<int>());
ASSERT_FALSE(registry.empty<char>());
ASSERT_NO_THROW(registry.clear());
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<int>(), 0u);
ASSERT_EQ(registry.size<char>(), 0u);
ASSERT_TRUE((registry.empty<int, char>()));
const auto e4 = registry.create();
@@ -244,17 +244,17 @@ TEST(Registry, Functionalities) {
ASSERT_EQ(registry.remove_if_exists<int>(e4), 1u);
ASSERT_EQ(registry.remove_if_exists<int>(e5), 0u);
ASSERT_EQ(registry.size<int>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<char>(), entt::registry::size_type{0});
ASSERT_EQ(registry.size<int>(), 0u);
ASSERT_EQ(registry.size<char>(), 0u);
ASSERT_TRUE(registry.empty<int>());
ASSERT_EQ(registry.capacity<int>(), entt::registry::size_type{8});
ASSERT_EQ(registry.capacity<char>(), entt::registry::size_type{8});
ASSERT_EQ(registry.capacity<int>(), 8u);
ASSERT_EQ(registry.capacity<char>(), 8u);
registry.shrink_to_fit<int, char>();
ASSERT_EQ(registry.capacity<int>(), entt::registry::size_type{});
ASSERT_EQ(registry.capacity<char>(), entt::registry::size_type{});
ASSERT_EQ(registry.capacity<int>(), 0u);
ASSERT_EQ(registry.capacity<char>(), 0u);
}
TEST(Registry, ReplaceAggregate) {
@@ -703,27 +703,27 @@ TEST(Registry, CleanViewAfterRemoveAndClear) {
registry.emplace<int>(entity, 0);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(view.size_hint(), entt::registry::size_type{1});
ASSERT_EQ(view.size_hint(), 1u);
registry.remove<char>(entity);
ASSERT_EQ(view.size_hint(), entt::registry::size_type{0});
ASSERT_EQ(view.size_hint(), 0u);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(view.size_hint(), entt::registry::size_type{1});
ASSERT_EQ(view.size_hint(), 1u);
registry.clear<int>();
ASSERT_EQ(view.size_hint(), entt::registry::size_type{0});
ASSERT_EQ(view.size_hint(), 0u);
registry.emplace<int>(entity, 0);
ASSERT_EQ(view.size_hint(), entt::registry::size_type{1});
ASSERT_EQ(view.size_hint(), 1u);
registry.clear();
ASSERT_EQ(view.size_hint(), entt::registry::size_type{0});
ASSERT_EQ(view.size_hint(), 0u);
}
TEST(Registry, CleanNonOwningGroupViewAfterRemoveAndClear) {
@@ -734,27 +734,27 @@ TEST(Registry, CleanNonOwningGroupViewAfterRemoveAndClear) {
registry.emplace<int>(entity, 0);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.remove<char>(entity);
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear<int>();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<int>(entity, 0);
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
}
TEST(Registry, CleanFullOwningGroupViewAfterRemoveAndClear) {
@@ -765,27 +765,27 @@ TEST(Registry, CleanFullOwningGroupViewAfterRemoveAndClear) {
registry.emplace<int>(entity, 0);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.remove<char>(entity);
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear<int>();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<int>(entity, 0);
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
}
TEST(Registry, CleanPartialOwningGroupViewAfterRemoveAndClear) {
@@ -796,27 +796,27 @@ TEST(Registry, CleanPartialOwningGroupViewAfterRemoveAndClear) {
registry.emplace<int>(entity, 0);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.remove<char>(entity);
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<char>(entity, 'c');
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear<int>();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
registry.emplace<int>(entity, 0);
ASSERT_EQ(group.size(), entt::registry::size_type{1});
ASSERT_EQ(group.size(), 1u);
registry.clear();
ASSERT_EQ(group.size(), entt::registry::size_type{0});
ASSERT_EQ(group.size(), 0u);
}
TEST(Registry, NestedGroups) {

View File

@@ -749,12 +749,12 @@ TEST(SparseSet, CanModifyDuringIteration) {
entt::sparse_set<entt::entity> set;
set.emplace(entt::entity{0});
ASSERT_EQ(set.capacity(), entt::sparse_set<entt::entity>::size_type{1});
ASSERT_EQ(set.capacity(), 1u);
const auto it = set.begin();
set.reserve(entt::sparse_set<entt::entity>::size_type{2});
set.reserve(2u);
ASSERT_EQ(set.capacity(), entt::sparse_set<entt::entity>::size_type{2});
ASSERT_EQ(set.capacity(), 2u);
// this should crash with asan enabled if we break the constraint
const auto entity = *it;

View File

@@ -708,12 +708,12 @@ TEST(Storage, CanModifyDuringIteration) {
entt::storage<entt::entity, int> pool;
pool.emplace(entt::entity{0}, 42);
ASSERT_EQ(pool.capacity(), (entt::storage<entt::entity, int>::size_type{1}));
ASSERT_EQ(pool.capacity(), 1u);
const auto it = pool.cbegin();
pool.reserve(entt::storage<entt::entity, int>::size_type{2});
pool.reserve(2u);
ASSERT_EQ(pool.capacity(), (entt::storage<entt::entity, int>::size_type{2}));
ASSERT_EQ(pool.capacity(), 2u);
// this should crash with asan enabled if we break the constraint
const auto entity = *it;

View File

@@ -28,12 +28,12 @@ TEST(SingleComponentView, Functionalities) {
ASSERT_NE(cview.begin(), cview.end());
ASSERT_NE(view.rbegin(), view.rend());
ASSERT_NE(cview.rbegin(), cview.rend());
ASSERT_EQ(view.size(), typename decltype(view)::size_type{1});
ASSERT_EQ(view.size(), 1u);
ASSERT_FALSE(view.empty());
registry.emplace<char>(e0);
ASSERT_EQ(view.size(), typename decltype(view)::size_type{2});
ASSERT_EQ(view.size(), 2u);
view.get<char>(e0) = '1';
view.get(e1) = '2';
@@ -67,7 +67,7 @@ TEST(SingleComponentView, ElementAccess) {
const auto e1 = registry.create();
registry.emplace<int>(e1);
for(typename decltype(view)::size_type i{}; i < view.size(); ++i) {
for(auto i = 0u; i < view.size(); ++i) {
ASSERT_EQ(view[i], i ? e0 : e1);
ASSERT_EQ(cview[i], i ? e0 : e1);
}
@@ -102,7 +102,7 @@ TEST(SingleComponentView, Empty) {
auto view = registry.view<int>();
ASSERT_EQ(view.size(), entt::registry::size_type{0});
ASSERT_EQ(view.size(), 0u);
ASSERT_EQ(view.begin(), view.end());
ASSERT_EQ(view.rbegin(), view.rend());
}
@@ -414,7 +414,7 @@ TEST(MultiComponentView, Empty) {
auto view = registry.view<char, int, float>();
ASSERT_EQ(view.size_hint(), entt::registry::size_type{1});
ASSERT_EQ(view.size_hint(), 1u);
ASSERT_EQ(view.begin(), view.end());
ASSERT_EQ(view.rbegin(), view.rend());
}

View File

@@ -45,7 +45,7 @@ TEST(Scheduler, Functionalities) {
bool updated = false;
bool aborted = false;
ASSERT_EQ(scheduler.size(), entt::scheduler<int>::size_type{});
ASSERT_EQ(scheduler.size(), 0u);
ASSERT_TRUE(scheduler.empty());
scheduler.attach<foo_process>(
@@ -53,7 +53,7 @@ TEST(Scheduler, Functionalities) {
[&aborted](){ aborted = true; }
);
ASSERT_NE(scheduler.size(), entt::scheduler<int>::size_type{});
ASSERT_NE(scheduler.size(), 0u);
ASSERT_FALSE(scheduler.empty());
scheduler.update(0);
@@ -62,12 +62,12 @@ TEST(Scheduler, Functionalities) {
ASSERT_TRUE(updated);
ASSERT_TRUE(aborted);
ASSERT_NE(scheduler.size(), entt::scheduler<int>::size_type{});
ASSERT_NE(scheduler.size(), 0u);
ASSERT_FALSE(scheduler.empty());
scheduler.clear();
ASSERT_EQ(scheduler.size(), entt::scheduler<int>::size_type{});
ASSERT_EQ(scheduler.size(), 0u);
ASSERT_TRUE(scheduler.empty());
}

View File

@@ -23,7 +23,7 @@ TEST(Resource, Functionalities) {
constexpr auto hs1 = entt::hashed_string{"res1"};
constexpr auto hs2 = entt::hashed_string{"res2"};
ASSERT_EQ(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_EQ(cache.size(), 0u);
ASSERT_TRUE(cache.empty());
ASSERT_FALSE(cache.contains(hs1));
ASSERT_FALSE(cache.contains(hs2));
@@ -31,7 +31,7 @@ TEST(Resource, Functionalities) {
ASSERT_FALSE(cache.load<broken_loader>(hs1, 42));
ASSERT_FALSE(cache.reload<broken_loader>(hs1, 42));
ASSERT_EQ(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_EQ(cache.size(), 0u);
ASSERT_TRUE(cache.empty());
ASSERT_FALSE(cache.contains(hs1));
ASSERT_FALSE(cache.contains(hs2));
@@ -39,7 +39,7 @@ TEST(Resource, Functionalities) {
ASSERT_TRUE(cache.load<loader>(hs1, 42));
ASSERT_TRUE(cache.reload<loader>(hs1, 42));
ASSERT_NE(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_NE(cache.size(), 0u);
ASSERT_FALSE(cache.empty());
ASSERT_TRUE(cache.contains(hs1));
ASSERT_FALSE(cache.contains(hs2));
@@ -48,7 +48,7 @@ TEST(Resource, Functionalities) {
ASSERT_TRUE(cache.load<loader>(hs1, 42));
ASSERT_TRUE(cache.load<loader>(hs2, 42));
ASSERT_NE(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_NE(cache.size(), 0u);
ASSERT_FALSE(cache.empty());
ASSERT_TRUE(cache.contains(hs1));
ASSERT_TRUE(cache.contains(hs2));
@@ -64,14 +64,14 @@ TEST(Resource, Functionalities) {
ASSERT_TRUE(cache.load<loader>(hs1, 42));
ASSERT_NO_THROW(cache.clear());
ASSERT_EQ(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_EQ(cache.size(), 0u);
ASSERT_TRUE(cache.empty());
ASSERT_FALSE(cache.contains(hs1));
ASSERT_FALSE(cache.contains(hs2));
ASSERT_TRUE(cache.load<loader>(hs1, 42));
ASSERT_NE(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_NE(cache.size(), 0u);
ASSERT_FALSE(cache.empty());
ASSERT_TRUE(cache.handle(hs1));
ASSERT_FALSE(cache.handle(hs2));
@@ -80,7 +80,7 @@ TEST(Resource, Functionalities) {
ASSERT_EQ(&cache.handle(hs1).get(), &static_cast<const resource &>(cache.handle(hs1)));
ASSERT_NO_THROW(cache.clear());
ASSERT_EQ(cache.size(), entt::resource_cache<resource>::size_type{});
ASSERT_EQ(cache.size(), 0u);
ASSERT_TRUE(cache.empty());
ASSERT_TRUE(cache.temp<loader>(42));