From 536c5365634ffb5d310e32ea5bb2c40a66acfcf4 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 27 Feb 2024 10:22:29 +0100 Subject: [PATCH] test: minor changes --- test/entt/entity/view.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/entt/entity/view.cpp b/test/entt/entity/view.cpp index 7ac530ebf..18caa4a8f 100644 --- a/test/entt/entity/view.cpp +++ b/test/entt/entity/view.cpp @@ -1343,6 +1343,7 @@ TEST(MultiComponentView, StableType) { TEST(MultiComponentView, StableTypeWithExcludedComponent) { entt::registry registry; auto view = registry.view(entt::exclude); + const entt::entity tombstone = entt::tombstone; const auto entity = registry.create(); const auto other = registry.create(); @@ -1362,20 +1363,17 @@ TEST(MultiComponentView, StableTypeWithExcludedComponent) { ASSERT_TRUE(view.contains(other)); for(auto entt: view) { - constexpr entt::entity tombstone = entt::tombstone; ASSERT_NE(entt, tombstone); ASSERT_EQ(entt, other); } for(auto [entt, comp]: view.each()) { - constexpr entt::entity tombstone = entt::tombstone; ASSERT_NE(entt, tombstone); ASSERT_EQ(entt, other); ASSERT_EQ(comp.value, 4); } - view.each([other](const auto entt, auto &&...) { - constexpr entt::entity tombstone = entt::tombstone; + view.each([other, tombstone](const auto entt, auto &&...) { ASSERT_NE(entt, tombstone); ASSERT_EQ(entt, other); });