From 31b2a2129c8267a5faada999a1655dde6e077eba Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 12 Jan 2024 10:34:41 +0100 Subject: [PATCH] test: drop a bunch of NOLINT --- test/entt/resource/resource.cpp | 7 +++++-- test/entt/resource/resource_cache.cpp | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/test/entt/resource/resource.cpp b/test/entt/resource/resource.cpp index dee1408ba..d9bbdf088 100644 --- a/test/entt/resource/resource.cpp +++ b/test/entt/resource/resource.cpp @@ -3,6 +3,7 @@ #include #include #include +#include "../common/linter.hpp" struct base { virtual ~base() = default; @@ -85,9 +86,10 @@ TEST(Resource, ConstNonConstAndAllInBetween) { entt::resource copy{resource}; entt::resource move{std::move(other)}; + test::is_initialized(other); ASSERT_TRUE(resource); - ASSERT_FALSE(other); // NOLINT + ASSERT_FALSE(other); ASSERT_TRUE(copy); ASSERT_EQ(copy, resource); @@ -101,8 +103,9 @@ TEST(Resource, ConstNonConstAndAllInBetween) { copy = resource; move = std::move(resource); + test::is_initialized(resource); - ASSERT_FALSE(resource); // NOLINT + ASSERT_FALSE(resource); ASSERT_FALSE(other); ASSERT_TRUE(copy); diff --git a/test/entt/resource/resource_cache.cpp b/test/entt/resource/resource_cache.cpp index 711a636b7..5da128fd9 100644 --- a/test/entt/resource/resource_cache.cpp +++ b/test/entt/resource/resource_cache.cpp @@ -94,15 +94,15 @@ TEST(ResourceCache, Copy) { using namespace entt::literals; entt::resource_cache cache; - cache.load("resource"_hs, 42u); // NOLINT + cache.load("resource"_hs, 3u); entt::resource_cache other{cache}; ASSERT_TRUE(cache.contains("resource"_hs)); ASSERT_TRUE(other.contains("resource"_hs)); - cache.load("foo"_hs, 99u); // NOLINT - cache.load("bar"_hs, 77u); // NOLINT + cache.load("foo"_hs, 2u); + cache.load("bar"_hs, 1u); other.load("quux"_hs, 0u); other = cache; @@ -111,16 +111,16 @@ TEST(ResourceCache, Copy) { ASSERT_TRUE(other.contains("bar"_hs)); ASSERT_FALSE(other.contains("quux"_hs)); - ASSERT_EQ(other["resource"_hs], 42u); - ASSERT_EQ(other["foo"_hs], 99u); - ASSERT_EQ(other["bar"_hs], 77u); + ASSERT_EQ(other["resource"_hs], 3u); + ASSERT_EQ(other["foo"_hs], 2u); + ASSERT_EQ(other["bar"_hs], 1u); } TEST(ResourceCache, Move) { using namespace entt::literals; entt::resource_cache cache; - cache.load("resource"_hs, 42u); // NOLINT + cache.load("resource"_hs, 3u); entt::resource_cache other{std::move(cache)}; @@ -128,8 +128,8 @@ TEST(ResourceCache, Move) { ASSERT_TRUE(other.contains("resource"_hs)); cache = other; - cache.load("foo"_hs, 99u); // NOLINT - cache.load("bar"_hs, 77u); // NOLINT + cache.load("foo"_hs, 2u); + cache.load("bar"_hs, 1u); other.load("quux"_hs, 0u); other = std::move(cache); @@ -139,9 +139,9 @@ TEST(ResourceCache, Move) { ASSERT_TRUE(other.contains("bar"_hs)); ASSERT_FALSE(other.contains("quux"_hs)); - ASSERT_EQ(other["resource"_hs], 42u); - ASSERT_EQ(other["foo"_hs], 99u); - ASSERT_EQ(other["bar"_hs], 77u); + ASSERT_EQ(other["resource"_hs], 3u); + ASSERT_EQ(other["foo"_hs], 2u); + ASSERT_EQ(other["bar"_hs], 1u); } TEST(ResourceCache, Iterator) {