Skip to content

Commit

Permalink
check capacity remains the same
Browse files Browse the repository at this point in the history
  • Loading branch information
rghouzra authored Dec 4, 2024
1 parent 4bb47fa commit 973a7f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/ChunkContainer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ TEST(ChunkContainer, resize)
TEST(ChunkContainer, clear_method)
{
ChunkContainer<int, 8> chk;

auto init_cp = chk.capacity();

// populate the ct
chk.resize(20, 42);

Expand All @@ -255,7 +256,9 @@ TEST(ChunkContainer, clear_method)
chk.clear();

EXPECT_THAT(chk.size(), Eq(0u));

// check capacity still the same
EXPECT_THAT(chk.capacity(), Eq(init_cp));

chk.resize(10, -42);
EXPECT_THAT(chk.size(), Eq(10u));
EXPECT_THAT(chk, Each(Eq(-42)));
Expand Down

0 comments on commit 973a7f3

Please sign in to comment.