Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion tests/std/include/test_header_units_and_modules.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,24 @@ void test_flat_set() {
using namespace std;
puts("Testing <flat_set>.");

// FIXME! ADD TEST COVERAGE HERE!
[[maybe_unused]] constexpr sorted_unique_t unique_tag = sorted_unique;
[[maybe_unused]] constexpr sorted_equivalent_t equivalent_tag = sorted_equivalent;

constexpr auto simple_truth = [](const auto&) { return true; };

flat_set<int> fs;
fs.emplace(42);
fs.emplace(42);
assert(fs.size() == 1);
assert(erase_if(fs, simple_truth) == 1);
assert(fs.empty());

flat_multiset<int> fms;
fms.emplace(42);
fms.emplace(42);
assert(fms.size() == 2);
assert(erase_if(fms, simple_truth) == 2);
assert(fms.empty());
}
#endif // TEST_STANDARD >= 23

Expand Down