test: ASSERT_NO_THROW -> ASSERT_NO_FATAL_FAILURE
This commit is contained in:
@@ -30,7 +30,7 @@ TEST(DenseMap, Functionalities) {
|
||||
entt::dense_map<int, int, entt::identity, transparent_equal_to> map;
|
||||
const auto &cmap = map;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = map.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = map.get_allocator());
|
||||
|
||||
ASSERT_TRUE(map.empty());
|
||||
ASSERT_EQ(map.size(), 0u);
|
||||
|
||||
@@ -28,7 +28,7 @@ TEST(DenseSet, Functionalities) {
|
||||
entt::dense_set<int, entt::identity, transparent_equal_to> set;
|
||||
const auto &cset = set;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = set.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = set.get_allocator());
|
||||
|
||||
ASSERT_TRUE(set.empty());
|
||||
ASSERT_EQ(set.size(), 0u);
|
||||
|
||||
@@ -39,8 +39,8 @@ TEST(IterableAdaptor, Functionalities) {
|
||||
entt::iterable_adaptor iterable{vec.begin(), vec.end()};
|
||||
decltype(iterable) other{};
|
||||
|
||||
ASSERT_NO_THROW(other = iterable);
|
||||
ASSERT_NO_THROW(std::swap(other, iterable));
|
||||
ASSERT_NO_FATAL_FAILURE(other = iterable);
|
||||
ASSERT_NO_FATAL_FAILURE(std::swap(other, iterable));
|
||||
|
||||
ASSERT_EQ(iterable.begin(), vec.begin());
|
||||
ASSERT_EQ(iterable.end(), vec.end());
|
||||
|
||||
@@ -196,7 +196,7 @@ TEST(NonOwningGroup, Each) {
|
||||
auto citerable = cgroup.each();
|
||||
|
||||
ASSERT_NE(citerable.begin(), citerable.end());
|
||||
ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_NO_FATAL_FAILURE(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_EQ(decltype(iterable.end()){}, iterable.end());
|
||||
|
||||
auto it = iterable.begin();
|
||||
@@ -840,7 +840,7 @@ TEST(OwningGroup, Each) {
|
||||
auto citerable = cgroup.each();
|
||||
|
||||
ASSERT_NE(citerable.begin(), citerable.end());
|
||||
ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_NO_FATAL_FAILURE(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_EQ(decltype(iterable.end()){}, iterable.end());
|
||||
|
||||
auto it = iterable.begin();
|
||||
|
||||
@@ -225,7 +225,7 @@ TEST(Registry, Functionalities) {
|
||||
|
||||
entt::registry registry;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = registry.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = registry.get_allocator());
|
||||
|
||||
ASSERT_EQ(registry.size(), 0u);
|
||||
ASSERT_EQ(registry.alive(), 0u);
|
||||
|
||||
@@ -18,7 +18,7 @@ struct boxed_int {
|
||||
TEST(SparseSet, Functionalities) {
|
||||
entt::sparse_set set;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = set.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = set.get_allocator());
|
||||
ASSERT_EQ(set.type(), entt::type_id<void>());
|
||||
|
||||
set.reserve(42);
|
||||
@@ -78,7 +78,7 @@ TEST(SparseSet, Functionalities) {
|
||||
ASSERT_FALSE(set.contains(entt::entity{0}));
|
||||
ASSERT_FALSE(set.contains(entt::entity{42}));
|
||||
|
||||
ASSERT_NO_THROW(set.bind(entt::any{}));
|
||||
ASSERT_NO_FATAL_FAILURE(set.bind(entt::any{}));
|
||||
}
|
||||
|
||||
TEST(SparseSet, Contains) {
|
||||
|
||||
@@ -94,7 +94,7 @@ TEST(Storage, Functionalities) {
|
||||
entt::storage<int> pool;
|
||||
constexpr auto page_size = entt::component_traits<int>::page_size;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = pool.get_allocator());
|
||||
ASSERT_EQ(pool.type(), entt::type_id<int>());
|
||||
|
||||
pool.reserve(42);
|
||||
@@ -272,7 +272,7 @@ TEST(Storage, EmptyType) {
|
||||
entt::storage<empty_stable_type> pool;
|
||||
pool.emplace(entt::entity{99});
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = pool.get_allocator());
|
||||
ASSERT_EQ(pool.type(), entt::type_id<empty_stable_type>());
|
||||
ASSERT_TRUE(pool.contains(entt::entity{99}));
|
||||
|
||||
@@ -1805,7 +1805,7 @@ TEST(Storage, ThrowingAllocator) {
|
||||
|
||||
ASSERT_THROW(pool.emplace(entt::entity{0}, 0), typename pool_allocator_type::exception_type);
|
||||
ASSERT_FALSE(pool.contains(entt::entity{0}));
|
||||
ASSERT_NO_THROW(pool.compact());
|
||||
ASSERT_NO_FATAL_FAILURE(pool.compact());
|
||||
ASSERT_TRUE(pool.empty());
|
||||
|
||||
pool.emplace(entt::entity{0}, 0);
|
||||
|
||||
@@ -519,7 +519,7 @@ TEST(SighStorageMixin, ThrowingAllocator) {
|
||||
|
||||
ASSERT_THROW(pool.emplace(entt::entity{0}, 0), typename pool_allocator_type::exception_type);
|
||||
ASSERT_FALSE(pool.contains(entt::entity{0}));
|
||||
ASSERT_NO_THROW(pool.compact());
|
||||
ASSERT_NO_FATAL_FAILURE(pool.compact());
|
||||
ASSERT_TRUE(pool.empty());
|
||||
|
||||
pool.emplace(entt::entity{0}, 0);
|
||||
|
||||
@@ -193,7 +193,7 @@ TEST(SingleComponentView, Each) {
|
||||
auto citerable = cview.each();
|
||||
|
||||
ASSERT_NE(citerable.begin(), citerable.end());
|
||||
ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_NO_FATAL_FAILURE(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_EQ(decltype(iterable.end()){}, iterable.end());
|
||||
|
||||
auto it = iterable.begin();
|
||||
@@ -714,7 +714,7 @@ TEST(MultiComponentView, Each) {
|
||||
auto citerable = cview.each();
|
||||
|
||||
ASSERT_NE(citerable.begin(), citerable.end());
|
||||
ASSERT_NO_THROW(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_NO_FATAL_FAILURE(iterable.begin()->operator=(*iterable.begin()));
|
||||
ASSERT_EQ(decltype(iterable.end()){}, iterable.end());
|
||||
|
||||
auto it = iterable.begin();
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST(ResourceCache, Functionalities) {
|
||||
|
||||
entt::resource_cache<int> cache;
|
||||
|
||||
ASSERT_NO_THROW([[maybe_unused]] auto alloc = cache.get_allocator());
|
||||
ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = cache.get_allocator());
|
||||
|
||||
ASSERT_TRUE(cache.empty());
|
||||
ASSERT_EQ(cache.size(), 0u);
|
||||
|
||||
Reference in New Issue
Block a user