test: minor changes

This commit is contained in:
Michele Caini
2021-05-11 12:05:44 +02:00
parent 30827120f6
commit 9af318a767

View File

@@ -7,11 +7,6 @@
TEST(Entity, Null) {
using traits_type = entt::entt_traits<entt::entity>;
entt::registry registry{};
const auto entity = registry.create();
registry.emplace<int>(entity, 42);
ASSERT_FALSE(entt::entity{} == entt::null);
ASSERT_TRUE(entt::entity{traits_type::entity_mask} == entt::null);
ASSERT_TRUE(entt::entity{~typename traits_type::entity_type{}} == entt::null);
@@ -19,6 +14,11 @@ TEST(Entity, Null) {
ASSERT_TRUE(entt::null == entt::null);
ASSERT_FALSE(entt::null != entt::null);
entt::registry registry{};
auto entity = registry.create();
registry.emplace<int>(entity, 42);
ASSERT_FALSE(entity == entt::null);
ASSERT_FALSE(entt::null == entity);
@@ -26,4 +26,5 @@ TEST(Entity, Null) {
ASSERT_TRUE(entt::null != entity);
ASSERT_FALSE(registry.valid(entt::null));
ASSERT_DEATH((entity = registry.create(entt::null)), "");
}