Skip to content

Commit

Permalink
table: refine tests with exceptions enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed May 3, 2024
1 parent 739bc80 commit 7a60574
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/entt/entity/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,10 @@ TEST(Table, ThrowingAllocator) {
table.get_allocator().template throw_counter<int>(0u);

ASSERT_THROW(table.reserve(1u), test::throwing_allocator_exception);
ASSERT_EQ(table.capacity(), 0u);

table.get_allocator().template throw_counter<int>(0u);
table.get_allocator().template throw_counter<char>(0u);

ASSERT_THROW(table.emplace(), test::throwing_allocator_exception);
ASSERT_TRUE(table.empty());

table.get_allocator().template throw_counter<int>(0u);

ASSERT_THROW(table.emplace(3, 'c'), test::throwing_allocator_exception);
ASSERT_TRUE(table.empty());
}

0 comments on commit 7a60574

Please sign in to comment.