Skip to content

Commit 88d94e6

Browse files
committed
Revert "[libc++][format] Add tests for flat_(|multi)map formatting (llvm#124418)"
This reverts commit 3bf8e67.
1 parent 71e623d commit 88d94e6

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <concepts>
2525
#include <deque>
2626
#include <filesystem>
27-
#include <flat_map>
2827
#include <format>
2928
#include <forward_list>
3029
#include <list>
@@ -243,13 +242,6 @@ void test_P2286() {
243242
assert_is_formattable<std::multiset<int>, CharT>();
244243
assert_is_formattable<std::multimap<int, int>, CharT>();
245244

246-
#if TEST_STD_VER >= 23
247-
// assert_is_formattable<std::flat_set<int>, CharT>();
248-
assert_is_formattable<std::flat_map<int, int>, CharT>();
249-
// assert_is_formattable<std::flat_multiset<int>, CharT>();
250-
assert_is_formattable<std::flat_multimap<int, int>, CharT>();
251-
#endif // TEST_STD_VER >= 2
252-
253245
assert_is_formattable<std::unordered_set<int>, CharT>();
254246
assert_is_formattable<std::unordered_map<int, int>, CharT>();
255247
assert_is_formattable<std::unordered_multiset<int>, CharT>();

libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.functions.tests.h

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#define TEST_STD_UTILITIES_FORMAT_FORMAT_RANGE_FORMAT_RANGE_FMTMAP_FORMAT_FUNCTIONS_TESTS_H
1111

1212
#include <algorithm>
13-
#include <deque>
14-
#include <flat_map>
1513
#include <format>
1614
#include <map>
1715
#include <unordered_map>
@@ -243,7 +241,10 @@ void test_char_to_wchar(TestFunction check, ExceptionTest check_exception) {
243241
// Bool
244242
//
245243
template <class CharT, class TestFunction, class ExceptionTest>
246-
void test_bool(TestFunction check, ExceptionTest check_exception, auto&& input) {
244+
void test_bool(TestFunction check, ExceptionTest check_exception) {
245+
// duplicates are stored in order of insertion
246+
std::multimap<bool, int> input{{true, 42}, {false, 0}, {true, 1}};
247+
247248
check(SV("{false: 0, true: 42, true: 1}"), SV("{}"), input);
248249
check(SV("{false: 0, true: 42, true: 1}^42"), SV("{}^42"), input);
249250
check(SV("{false: 0, true: 42, true: 1}^42"), SV("{:}^42"), input);
@@ -338,17 +339,6 @@ void test_bool(TestFunction check, ExceptionTest check_exception, auto&& input)
338339
"The argument index value is too large for the number of arguments supplied", SV("{:^^{}:#>{}}"), input, 41);
339340
}
340341

341-
template <class CharT, class TestFunction, class ExceptionTest>
342-
void test_bool(TestFunction check, ExceptionTest check_exception) {
343-
// duplicates are stored in order of insertion
344-
test_bool<CharT>(check, check_exception, std::multimap<bool, int>{{true, 42}, {false, 0}, {true, 1}});
345-
#if TEST_STD_VER >= 23
346-
test_bool<CharT>(check,
347-
check_exception,
348-
std::flat_multimap<bool, int, std::less<bool>, std::deque<bool>>{{true, 42}, {false, 0}, {true, 1}});
349-
#endif
350-
}
351-
352342
//
353343
// Integral
354344
//
@@ -452,9 +442,6 @@ void test_int(TestFunction check, ExceptionTest check_exception, auto&& input) {
452442
template <class CharT, class TestFunction, class ExceptionTest>
453443
void test_int(TestFunction check, ExceptionTest check_exception) {
454444
test_int<CharT>(check, check_exception, std::map<int, int>{{1, -1}, {42, -42}, {-42, 42}});
455-
#if TEST_STD_VER >= 23
456-
test_int<CharT>(check, check_exception, std::flat_map<int, int>{{1, -1}, {42, -42}, {-42, 42}});
457-
#endif
458445
}
459446

460447
//

0 commit comments

Comments
 (0)