test: use transparent comparators

This commit is contained in:
Michele Caini
2024-05-19 00:14:58 +02:00
parent ca303e24ff
commit 77606c2d20
2 changed files with 4 additions and 4 deletions

View File

@@ -317,7 +317,7 @@ TEST(NonOwningGroup, SortAsAPool) {
ASSERT_EQ(group.get<const int>(entity), --ival);
}
registry.sort<unsigned int>(std::less<unsigned int>{});
registry.sort<unsigned int>(std::less<>{});
const entt::sparse_set &other = *group.storage<unsigned int>();
group.sort_as(other.begin(), other.end());

View File

@@ -2150,7 +2150,7 @@ TEST(Registry, SortSingle) {
ASSERT_EQ(registry.get<int>(entity), --val);
}
registry.sort<int>(std::less<int>{});
registry.sort<int>(std::less<>{});
for(auto entity: registry.view<int>()) {
ASSERT_EQ(registry.get<int>(entity), val++);
@@ -2177,7 +2177,7 @@ TEST(Registry, SortMulti) {
ASSERT_EQ(registry.get<int>(entity), --ival);
}
registry.sort<unsigned int>(std::less<unsigned int>{});
registry.sort<unsigned int>(std::less<>{});
registry.sort<int, unsigned int>();
for(auto entity: registry.view<unsigned int>()) {
@@ -2199,7 +2199,7 @@ TEST(Registry, SortEmpty) {
ASSERT_LT(registry.storage<test::empty>().data()[0], registry.storage<test::empty>().data()[1]);
ASSERT_LT(registry.storage<test::empty>().data()[1], registry.storage<test::empty>().data()[2]);
registry.sort<test::empty>(std::less<entt::entity>{});
registry.sort<test::empty>(std::less<>{});
ASSERT_GT(registry.storage<test::empty>().data()[0], registry.storage<test::empty>().data()[1]);
ASSERT_GT(registry.storage<test::empty>().data()[1], registry.storage<test::empty>().data()[2]);