test: minor changes

This commit is contained in:
Michele Caini
2023-10-29 16:36:43 +01:00
parent bb70e8b14e
commit 678131429b
2 changed files with 5 additions and 13 deletions

View File

@@ -1664,9 +1664,10 @@ TYPED_TEST(Storage, ReferencesGuaranteed) {
}
TEST(Storage, UpdateFromDestructor) {
auto test = [](const auto target) {
constexpr auto size = 10u;
constexpr auto size = 10u;
const entt::entity entity[3u]{entt::entity{9u}, entt::entity{8u}, entt::entity{0u}};
for(auto target: entity) {
entt::storage<update_from_destructor> pool;
for(std::size_t next{}; next < size; ++next) {
@@ -1687,11 +1688,7 @@ TEST(Storage, UpdateFromDestructor) {
for(std::size_t next{}; next < size; ++next) {
ASSERT_FALSE(pool.contains(entt::entity(next)));
}
};
test(entt::entity{9u});
test(entt::entity{8u});
test(entt::entity{0u});
}
}
TEST(Storage, CreateFromConstructor) {

View File

@@ -240,13 +240,8 @@ TEST(SigH, CollectorVoid) {
ASSERT_FALSE(sigh.empty());
ASSERT_EQ(cnt, 2);
auto test = [&cnt]() {
++cnt;
return true;
};
cnt = 0;
sigh.collect(std::move(test), 42);
sigh.collect([&cnt]() { ++cnt; return true; }, 42);
ASSERT_EQ(cnt, 1);
}