test: linter directives on deprecated type (no waste of time here)

This commit is contained in:
Michele Caini
2024-10-11 19:06:52 +02:00
parent aecdb84606
commit 6b20a3d3ea

View File

@@ -36,7 +36,8 @@ TEST(Observer, Functionalities) {
}
TEST(Observer, AllOf) {
constexpr auto collector = entt::basic_collector<>::group<int, char>(entt::exclude<float>).group<int, double>();
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
constexpr auto collector = entt::collector.group<int, char>(entt::exclude<float>).group<int, double>();
entt::registry registry;
entt::observer observer{registry, collector};
@@ -82,7 +83,8 @@ TEST(Observer, AllOf) {
}
TEST(Observer, AllOfFiltered) {
constexpr auto collector = entt::basic_collector<>::group<int>().where<char>(entt::exclude<double>);
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
constexpr auto collector = entt::collector.group<int>().where<char>(entt::exclude<double>);
entt::registry registry;
entt::observer observer{registry, collector};
@@ -127,7 +129,8 @@ TEST(Observer, AllOfFiltered) {
TEST(Observer, Observe) {
entt::registry registry;
entt::observer observer{registry, entt::basic_collector<>::update<int>().update<char>()};
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
entt::observer observer{registry, entt::collector.update<int>().update<char>()};
const auto entity = registry.create();
ASSERT_TRUE(observer.empty());
@@ -160,7 +163,8 @@ TEST(Observer, Observe) {
}
TEST(Observer, ObserveFiltered) {
constexpr auto collector = entt::basic_collector<>::update<int>().where<char>(entt::exclude<double>);
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
constexpr auto collector = entt::collector.update<int>().where<char>(entt::exclude<double>);
entt::registry registry;
entt::observer observer{registry, collector};
@@ -206,7 +210,8 @@ TEST(Observer, AllOfObserve) {
entt::observer observer{};
const auto entity = registry.create();
observer.connect(registry, entt::basic_collector<>::group<int>().update<char>());
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
observer.connect(registry, entt::collector.group<int>().update<char>());
ASSERT_TRUE(observer.empty());
@@ -238,7 +243,8 @@ TEST(Observer, AllOfObserve) {
TEST(Observer, CrossRulesCornerCase) {
entt::registry registry;
entt::observer observer{registry, entt::basic_collector<>::group<int>().group<char>()};
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
entt::observer observer{registry, entt::collector.group<int>().group<char>()};
const auto entity = registry.create();
registry.emplace<int>(entity);
@@ -254,7 +260,8 @@ TEST(Observer, CrossRulesCornerCase) {
TEST(Observer, Each) {
entt::registry registry;
entt::observer observer{registry, entt::basic_collector<>::group<int>()};
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
entt::observer observer{registry, entt::collector.group<int>()};
const auto entity = registry.create();
registry.emplace<int>(entity);
@@ -277,7 +284,8 @@ TEST(Observer, Each) {
}
TEST(Observer, MultipleFilters) {
constexpr auto collector = entt::basic_collector<>::update<int>().where<char>().update<double>().where<float>();
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
constexpr auto collector = entt::collector.update<int>().where<char>().update<double>().where<float>();
entt::registry registry;
entt::observer observer{registry, collector};
@@ -331,8 +339,10 @@ TEST(Observer, MultipleFilters) {
}
TEST(Observer, GroupCornerCase) {
constexpr auto add_collector = entt::basic_collector<>::group<int>(entt::exclude<char>);
constexpr auto remove_collector = entt::basic_collector<>::group<int, char>();
// NOLINTBEGIN(readability-static-accessed-through-instance)
constexpr auto add_collector = entt::collector.group<int>(entt::exclude<char>);
constexpr auto remove_collector = entt::collector.group<int, char>();
// NOLINTEND(readability-static-accessed-through-instance)
entt::registry registry;
entt::observer add_observer{registry, add_collector};