From 6ae12db5a3209669d1f309fd037cbc43581ca020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20T=C3=BCz=C3=BCn?= Date: Sat, 4 Nov 2023 23:42:35 +0300 Subject: [PATCH] Added test inserting existing value to full flat_set --- test/test_flat_set.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/test_flat_set.cpp b/test/test_flat_set.cpp index 19e6d0398..8ea8bae0e 100644 --- a/test/test_flat_set.cpp +++ b/test/test_flat_set.cpp @@ -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) {