Skip to content

Commit

Permalink
Added test inserting existing value to full flat_set
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailtzn committed Nov 4, 2023
1 parent cf3da78 commit 6ae12db
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/test_flat_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,35 @@ namespace
CHECK(std::is_sorted(data.begin(), data.end()));
}

//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_existing_value_when_full)
{
DataNDC data;

data.insert(N0);
data.insert(N1);
data.insert(N2);
data.insert(N3);
data.insert(N4);
data.insert(N5);
data.insert(N6);
data.insert(N7);
data.insert(N8);
data.insert(N9);

CHECK_NO_THROW(data.insert(N0));
CHECK_NO_THROW(data.insert(N1));
CHECK_NO_THROW(data.insert(N2));
CHECK_NO_THROW(data.insert(N3));
CHECK_NO_THROW(data.insert(N4));
CHECK_NO_THROW(data.insert(N5));
CHECK_NO_THROW(data.insert(N6));
CHECK_NO_THROW(data.insert(N7));
CHECK_NO_THROW(data.insert(N8));
CHECK_NO_THROW(data.insert(N9));

CHECK(std::is_sorted(data.begin(), data.end()));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_emplace_default_value)
{
Expand Down

0 comments on commit 6ae12db

Please sign in to comment.