test: comment expected NOLINT for deprecated feature
This commit is contained in:
@@ -62,7 +62,7 @@ TEST_F(Any, SBO) {
|
||||
entt::any any{'c'};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::owner);
|
||||
ASSERT_EQ(any.type(), entt::type_id<char>());
|
||||
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
|
||||
@@ -74,7 +74,7 @@ TEST_F(Any, NoSBO) {
|
||||
entt::any any{instance};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::owner);
|
||||
ASSERT_EQ(any.type(), entt::type_id<fat>());
|
||||
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
|
||||
@@ -85,7 +85,7 @@ TEST_F(Any, Empty) {
|
||||
entt::any any{};
|
||||
|
||||
ASSERT_FALSE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::owner);
|
||||
ASSERT_EQ(any.type(), entt::type_id<void>());
|
||||
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
|
||||
@@ -96,7 +96,7 @@ TEST_F(Any, SBOInPlaceTypeConstruction) {
|
||||
entt::any any{std::in_place_type<int>, 42};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::owner);
|
||||
ASSERT_EQ(any.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
|
||||
@@ -105,7 +105,7 @@ TEST_F(Any, SBOInPlaceTypeConstruction) {
|
||||
auto other = any.as_ref();
|
||||
|
||||
ASSERT_TRUE(other);
|
||||
ASSERT_FALSE(other.owner()); // NOLINT
|
||||
ASSERT_FALSE(other.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(other.policy(), entt::any_policy::ref);
|
||||
ASSERT_EQ(other.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<int>(other), 42);
|
||||
@@ -117,7 +117,7 @@ TEST_F(Any, SBOAsRefConstruction) {
|
||||
entt::any any{entt::forward_as_any(value)};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::ref);
|
||||
ASSERT_EQ(any.type(), entt::type_id<int>());
|
||||
|
||||
@@ -136,7 +136,7 @@ TEST_F(Any, SBOAsRefConstruction) {
|
||||
any.emplace<int &>(value);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::ref);
|
||||
ASSERT_EQ(any.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<int>(&any), &value);
|
||||
@@ -144,7 +144,7 @@ TEST_F(Any, SBOAsRefConstruction) {
|
||||
auto other = any.as_ref();
|
||||
|
||||
ASSERT_TRUE(other);
|
||||
ASSERT_FALSE(other.owner()); // NOLINT
|
||||
ASSERT_FALSE(other.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(other.policy(), entt::any_policy::ref);
|
||||
ASSERT_EQ(other.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<int>(other), 42);
|
||||
@@ -156,7 +156,7 @@ TEST_F(Any, SBOAsConstRefConstruction) {
|
||||
entt::any any{entt::forward_as_any(value)};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::cref);
|
||||
ASSERT_EQ(any.type(), entt::type_id<int>());
|
||||
|
||||
@@ -175,7 +175,7 @@ TEST_F(Any, SBOAsConstRefConstruction) {
|
||||
any.emplace<const int &>(value);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::any_policy::cref);
|
||||
ASSERT_EQ(any.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<const int>(&any), &value);
|
||||
@@ -183,7 +183,7 @@ TEST_F(Any, SBOAsConstRefConstruction) {
|
||||
auto other = any.as_ref();
|
||||
|
||||
ASSERT_TRUE(other);
|
||||
ASSERT_FALSE(other.owner()); // NOLINT
|
||||
ASSERT_FALSE(other.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(other.policy(), entt::any_policy::cref);
|
||||
ASSERT_EQ(other.type(), entt::type_id<int>());
|
||||
ASSERT_EQ(entt::any_cast<int>(other), 42);
|
||||
|
||||
@@ -70,7 +70,7 @@ TYPED_TEST(ToEntity, Functionalities) {
|
||||
constexpr auto page_size = entt::storage_type_t<value_type>::traits_type::page_size;
|
||||
const value_type value{42};
|
||||
|
||||
ASSERT_EQ(entt::to_entity(storage, value_type{42}), null);
|
||||
ASSERT_EQ(entt::to_entity(registry, value_type{42}), null); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(entt::to_entity(storage, value), null);
|
||||
|
||||
const auto entity = registry.create();
|
||||
@@ -86,7 +86,7 @@ TYPED_TEST(ToEntity, Functionalities) {
|
||||
registry.emplace<value_type>(other);
|
||||
registry.emplace<value_type>(next);
|
||||
|
||||
ASSERT_EQ(entt::to_entity(storage, registry.get<value_type>(entity)), entity);
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(entity)), entity); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(entt::to_entity(storage, registry.get<value_type>(other)), other);
|
||||
ASSERT_EQ(entt::to_entity(storage, registry.get<value_type>(next)), next);
|
||||
|
||||
@@ -103,49 +103,6 @@ TYPED_TEST(ToEntity, Functionalities) {
|
||||
ASSERT_EQ(entt::to_entity(storage, value), null);
|
||||
}
|
||||
|
||||
TYPED_TEST(ToEntityDeprecated, Functionalities) {
|
||||
using value_type = typename TestFixture::type;
|
||||
using traits_type = entt::component_traits<value_type>;
|
||||
|
||||
entt::registry registry;
|
||||
const entt::entity null = entt::null;
|
||||
constexpr auto page_size = entt::storage_type_t<value_type>::traits_type::page_size;
|
||||
const value_type value{42};
|
||||
|
||||
ASSERT_EQ(entt::to_entity(registry, value_type{42}), null); // NOLINT
|
||||
ASSERT_EQ(entt::to_entity(registry, value), null); // NOLINT
|
||||
|
||||
const auto entity = registry.create();
|
||||
auto &&storage = registry.storage<value_type>();
|
||||
storage.emplace(entity);
|
||||
|
||||
while(storage.size() < (page_size - (1u + traits_type::in_place_delete))) {
|
||||
storage.emplace(registry.create(), value);
|
||||
}
|
||||
|
||||
const auto other = registry.create();
|
||||
const auto next = registry.create();
|
||||
|
||||
registry.emplace<value_type>(other);
|
||||
registry.emplace<value_type>(next);
|
||||
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(entity)), entity); // NOLINT
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(other)), other); // NOLINT
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(next)), next); // NOLINT
|
||||
|
||||
ASSERT_EQ(®istry.get<value_type>(entity) + page_size - (1u + traits_type::in_place_delete), ®istry.get<value_type>(other));
|
||||
|
||||
registry.destroy(other);
|
||||
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(entity)), entity); // NOLINT
|
||||
ASSERT_EQ(entt::to_entity(registry, registry.get<value_type>(next)), next); // NOLINT
|
||||
|
||||
ASSERT_EQ(®istry.get<value_type>(entity) + page_size - 1u, ®istry.get<value_type>(next));
|
||||
|
||||
ASSERT_EQ(entt::to_entity(registry, value_type{42}), null); // NOLINT
|
||||
ASSERT_EQ(entt::to_entity(registry, value), null); // NOLINT
|
||||
}
|
||||
|
||||
TEST(SighHelper, Functionalities) {
|
||||
using namespace entt::literals;
|
||||
|
||||
|
||||
@@ -1868,7 +1868,7 @@ TYPED_TEST(SparseSet, SortAsDisjoint) {
|
||||
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
|
||||
lhs.sort_as(rhs); // NOLINT
|
||||
lhs.sort_as(rhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
}
|
||||
@@ -1891,7 +1891,7 @@ TYPED_TEST(SparseSet, SortAsOverlap) {
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
|
||||
lhs.sort_as(rhs); // NOLINT
|
||||
lhs.sort_as(rhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
auto begin = lhs.begin();
|
||||
auto end = lhs.end();
|
||||
@@ -1920,7 +1920,7 @@ TYPED_TEST(SparseSet, SortAsOrdered) {
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
|
||||
rhs.sort_as(lhs); // NOLINT
|
||||
rhs.sort_as(lhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
}
|
||||
@@ -1943,7 +1943,7 @@ TYPED_TEST(SparseSet, SortAsReverse) {
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
|
||||
rhs.sort_as(lhs); // NOLINT
|
||||
rhs.sort_as(lhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
auto begin = rhs.begin();
|
||||
auto end = rhs.end();
|
||||
@@ -1975,7 +1975,7 @@ TYPED_TEST(SparseSet, SortAsUnordered) {
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
|
||||
rhs.sort_as(lhs); // NOLINT
|
||||
rhs.sort_as(lhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
auto begin = rhs.begin();
|
||||
auto end = rhs.end();
|
||||
@@ -2008,7 +2008,7 @@ TYPED_TEST(SparseSet, SortAsInvalid) {
|
||||
ASSERT_TRUE(std::equal(std::rbegin(lhs_entity), std::rend(lhs_entity), lhs.begin(), lhs.end()));
|
||||
ASSERT_TRUE(std::equal(std::rbegin(rhs_entity), std::rend(rhs_entity), rhs.begin(), rhs.end()));
|
||||
|
||||
rhs.sort_as(lhs); // NOLINT
|
||||
rhs.sort_as(lhs); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
auto begin = rhs.begin();
|
||||
auto end = rhs.end();
|
||||
@@ -2041,7 +2041,7 @@ ENTT_DEBUG_TYPED_TEST(SparseSetDeathTest, SortAs) {
|
||||
lhs.push(entity);
|
||||
lhs.erase(entity);
|
||||
|
||||
ASSERT_DEATH(lhs.sort_as(rhs), ""); // NOLINT
|
||||
ASSERT_DEATH(lhs.sort_as(rhs), ""); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
} break;
|
||||
case entt::deletion_policy::swap_only: {
|
||||
entity_type entity[3u]{entity_type{3}, entity_type{42}, entity_type{9}};
|
||||
@@ -2051,7 +2051,7 @@ ENTT_DEBUG_TYPED_TEST(SparseSetDeathTest, SortAs) {
|
||||
lhs.erase(entity[0u]);
|
||||
lhs.bump(entity[0u]);
|
||||
|
||||
ASSERT_DEATH(lhs.sort_as(rhs), ""); // NOLINT
|
||||
ASSERT_DEATH(lhs.sort_as(rhs), ""); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,13 +153,13 @@ TEST(StorageEntity, Emplace) {
|
||||
ASSERT_EQ(pool.emplace(traits_type::construct(1, 1)), entt::entity{4});
|
||||
ASSERT_EQ(pool.emplace(traits_type::construct(6, 3)), traits_type::construct(6, 3));
|
||||
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{1}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{2}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{4}), pool.in_use()); // NOLINT
|
||||
ASSERT_GE(pool.index(entt::entity{5}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(traits_type::construct(6, 3)), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{1}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{2}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{4}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_GE(pool.index(entt::entity{5}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(traits_type::construct(6, 3)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_EQ(pool.emplace(traits_type::construct(5, 42)), traits_type::construct(5, 42));
|
||||
ASSERT_EQ(pool.emplace(traits_type::construct(5, 43)), entt::entity{7});
|
||||
@@ -186,12 +186,12 @@ TEST(StorageEntity, TryEmplace) {
|
||||
ASSERT_EQ(*pool.push(traits_type::construct(1, 1)), entt::entity{3});
|
||||
ASSERT_EQ(*pool.push(traits_type::construct(5, 3)), traits_type::construct(5, 3));
|
||||
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{1}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{2}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT
|
||||
ASSERT_GE(pool.index(entt::entity{4}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(traits_type::construct(5, 3)), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{1}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{2}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_GE(pool.index(entt::entity{4}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(traits_type::construct(5, 3)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_EQ(*pool.push(traits_type::construct(4, 42)), traits_type::construct(4, 42));
|
||||
ASSERT_EQ(*pool.push(traits_type::construct(4, 43)), entt::entity{6});
|
||||
@@ -205,12 +205,12 @@ TEST(StorageEntity, TryEmplace) {
|
||||
ASSERT_EQ(pool.current(entity[1u]), 4);
|
||||
ASSERT_EQ(pool.current(entt::entity{2}), 1);
|
||||
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT
|
||||
ASSERT_GE(pool.index(traits_type::construct(1, 1)), pool.in_use()); // NOLINT
|
||||
ASSERT_GE(pool.index(traits_type::construct(2, 1)), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(traits_type::construct(4, 42)), pool.in_use()); // NOLINT
|
||||
ASSERT_GE(pool.index(traits_type::construct(5, 4)), pool.in_use()); // NOLINT
|
||||
ASSERT_LT(pool.index(entt::entity{0}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_GE(pool.index(traits_type::construct(1, 1)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_GE(pool.index(traits_type::construct(2, 1)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(entt::entity{3}), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_LT(pool.index(traits_type::construct(4, 42)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_GE(pool.index(traits_type::construct(5, 4)), pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_EQ(*pool.push(entt::null), traits_type::construct(2, 1));
|
||||
ASSERT_EQ(*pool.push(traits_type::construct(1, 3)), traits_type::construct(1, 3));
|
||||
@@ -251,13 +251,13 @@ TEST(StorageEntity, Insert) {
|
||||
|
||||
ASSERT_FALSE(pool.empty());
|
||||
ASSERT_EQ(pool.size(), 2u);
|
||||
ASSERT_EQ(pool.in_use(), 2u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 2u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
pool.erase(std::begin(entity), std::end(entity));
|
||||
|
||||
ASSERT_FALSE(pool.empty());
|
||||
ASSERT_EQ(pool.size(), 2u);
|
||||
ASSERT_EQ(pool.in_use(), 0u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 0u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
pool.insert(entity, entity + 1u);
|
||||
|
||||
@@ -266,7 +266,7 @@ TEST(StorageEntity, Insert) {
|
||||
|
||||
ASSERT_FALSE(pool.empty());
|
||||
ASSERT_EQ(pool.size(), 2u);
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
}
|
||||
|
||||
TEST(StorageEntity, Pack) {
|
||||
@@ -276,7 +276,7 @@ TEST(StorageEntity, Pack) {
|
||||
pool.push(entity, entity + 3u);
|
||||
std::swap(entity[0u], entity[1u]);
|
||||
|
||||
const auto len = pool.pack(entity + 1u, entity + 3u); // NOLINT
|
||||
const auto len = pool.pack(entity + 1u, entity + 3u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
auto it = pool.each().cbegin().base();
|
||||
|
||||
ASSERT_NE(it, pool.cbegin());
|
||||
@@ -299,17 +299,17 @@ TEST(StorageEntity, InUse) {
|
||||
|
||||
pool.emplace(entt::entity{0});
|
||||
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(pool.free_list(), 1u);
|
||||
|
||||
pool.in_use(0u); // NOLINT
|
||||
pool.in_use(0u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_EQ(pool.in_use(), 0u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 0u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(pool.free_list(), 0u);
|
||||
|
||||
pool.in_use(1u); // NOLINT
|
||||
pool.in_use(1u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT
|
||||
ASSERT_EQ(pool.in_use(), 1u); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(pool.free_list(), 1u);
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ ENTT_DEBUG_TEST(StorageEntityDeathTest, InUse) {
|
||||
|
||||
pool.emplace(entt::entity{0});
|
||||
|
||||
ASSERT_DEATH(pool.in_use(2u), ""); // NOLINT
|
||||
ASSERT_DEATH(pool.in_use(2u), ""); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
}
|
||||
|
||||
TEST(StorageEntity, Iterable) {
|
||||
@@ -348,7 +348,7 @@ TEST(StorageEntity, Iterable) {
|
||||
ASSERT_NE(begin, end);
|
||||
|
||||
ASSERT_NE(begin.base(), pool.begin());
|
||||
ASSERT_EQ(begin.base(), pool.end() - pool.in_use()); // NOLINT
|
||||
ASSERT_EQ(begin.base(), pool.end() - pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(end.base(), pool.end());
|
||||
|
||||
ASSERT_EQ(std::get<0>(*begin.operator->().operator->()), entt::entity{42});
|
||||
@@ -392,7 +392,7 @@ TEST(StorageEntity, ConstIterable) {
|
||||
ASSERT_NE(begin, end);
|
||||
|
||||
ASSERT_NE(begin.base(), pool.begin());
|
||||
ASSERT_EQ(begin.base(), pool.end() - pool.in_use()); // NOLINT
|
||||
ASSERT_EQ(begin.base(), pool.end() - pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(end.base(), pool.end());
|
||||
|
||||
ASSERT_EQ(std::get<0>(*begin.operator->().operator->()), entt::entity{42});
|
||||
@@ -460,7 +460,7 @@ TEST(StorageEntity, ReverseIterable) {
|
||||
ASSERT_NE(begin, end);
|
||||
|
||||
ASSERT_EQ(begin.base(), pool.rbegin());
|
||||
ASSERT_EQ(end.base(), pool.rbegin() + pool.in_use()); // NOLINT
|
||||
ASSERT_EQ(end.base(), pool.rbegin() + pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_NE(end.base(), pool.rend());
|
||||
|
||||
ASSERT_EQ(std::get<0>(*begin.operator->().operator->()), entt::entity{1});
|
||||
@@ -504,7 +504,7 @@ TEST(StorageEntity, ReverseConstIterable) {
|
||||
ASSERT_NE(begin, end);
|
||||
|
||||
ASSERT_EQ(begin.base(), pool.rbegin());
|
||||
ASSERT_EQ(end.base(), pool.rbegin() + pool.in_use()); // NOLINT
|
||||
ASSERT_EQ(end.base(), pool.rbegin() + pool.in_use()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_NE(end.base(), pool.rend());
|
||||
|
||||
ASSERT_EQ(std::get<0>(*begin.operator->().operator->()), entt::entity{1});
|
||||
|
||||
@@ -120,7 +120,7 @@ TEST_F(MetaAny, SBO) {
|
||||
entt::meta_any any{'c'};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::owner);
|
||||
ASSERT_FALSE(any.try_cast<std::size_t>());
|
||||
ASSERT_EQ(any.cast<char>(), 'c');
|
||||
@@ -134,7 +134,7 @@ TEST_F(MetaAny, NoSBO) {
|
||||
entt::meta_any any{instance};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::owner);
|
||||
ASSERT_FALSE(any.try_cast<std::size_t>());
|
||||
ASSERT_EQ(any.cast<fat_t>(), instance);
|
||||
@@ -180,7 +180,7 @@ TEST_F(MetaAny, SBOAsRefConstruction) {
|
||||
auto any = entt::forward_as_meta(value);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::ref);
|
||||
ASSERT_EQ(any.type(), entt::resolve<int>());
|
||||
|
||||
@@ -217,7 +217,7 @@ TEST_F(MetaAny, SBOAsConstRefConstruction) {
|
||||
auto any = entt::forward_as_meta(value);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::cref);
|
||||
ASSERT_EQ(any.type(), entt::resolve<int>());
|
||||
|
||||
@@ -450,7 +450,7 @@ TEST_F(MetaAny, NoSBOAsRefConstruction) {
|
||||
auto any = entt::forward_as_meta(instance);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::ref);
|
||||
ASSERT_EQ(any.type(), entt::resolve<fat_t>());
|
||||
|
||||
@@ -485,7 +485,7 @@ TEST_F(MetaAny, NoSBOAsConstRefConstruction) {
|
||||
auto any = entt::forward_as_meta(instance);
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_FALSE(any.owner()); // NOLINT
|
||||
ASSERT_FALSE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::cref);
|
||||
ASSERT_EQ(any.type(), entt::resolve<fat_t>());
|
||||
|
||||
@@ -723,7 +723,7 @@ TEST_F(MetaAny, VoidInPlaceTypeConstruction) {
|
||||
entt::meta_any any{std::in_place_type<void>};
|
||||
|
||||
ASSERT_TRUE(any);
|
||||
ASSERT_TRUE(any.owner()); // NOLINT
|
||||
ASSERT_TRUE(any.owner()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(any.policy(), entt::meta_any_policy::owner);
|
||||
ASSERT_FALSE(any.try_cast<char>());
|
||||
ASSERT_EQ(any.data(), nullptr);
|
||||
|
||||
@@ -477,7 +477,7 @@ TEST(AssociativeContainer, StdMap) {
|
||||
auto view = any.as_associative_container();
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::resolve<char>());
|
||||
ASSERT_EQ(view.value_type(), (entt::resolve<std::pair<const int, char>>()));
|
||||
@@ -521,7 +521,7 @@ TEST(AssociativeContainer, StdSet) {
|
||||
auto view = any.as_associative_container();
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::meta_type{});
|
||||
ASSERT_EQ(view.value_type(), entt::resolve<int>());
|
||||
@@ -568,7 +568,7 @@ TEST(AssociativeContainer, DenseMap) {
|
||||
map.emplace(4, '3');
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::resolve<char>());
|
||||
ASSERT_EQ(view.value_type(), (entt::resolve<std::pair<const int, char>>()));
|
||||
@@ -616,7 +616,7 @@ TEST(AssociativeContainer, DenseSet) {
|
||||
set.emplace(4);
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::meta_type{});
|
||||
ASSERT_EQ(view.value_type(), entt::resolve<int>());
|
||||
@@ -659,7 +659,7 @@ TEST(KeyValueAssociativeContainer, Constness) {
|
||||
auto view = any.as_associative_container();
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT
|
||||
ASSERT_FALSE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::resolve<char>());
|
||||
ASSERT_EQ(view.value_type(), (entt::resolve<std::pair<const int, char>>()));
|
||||
@@ -702,7 +702,7 @@ TEST(KeyOnlyAssociativeContainer, Constness) {
|
||||
auto view = any.as_associative_container();
|
||||
|
||||
ASSERT_TRUE(view);
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT
|
||||
ASSERT_TRUE(view.key_only()); // NOLINT(clang-diagnostic-deprecated-declarations)
|
||||
ASSERT_EQ(view.key_type(), entt::resolve<int>());
|
||||
ASSERT_EQ(view.mapped_type(), entt::meta_type{});
|
||||
ASSERT_EQ(view.value_type(), (entt::resolve<int>()));
|
||||
|
||||
Reference in New Issue
Block a user