From: Tomasz Kamiński Date: Tue, 29 Jul 2025 12:59:35 +0000 (+0200) Subject: libsdc++: Test using range_format::map as format_kind. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=689ee39f7bbb632a9ca7d1dc18192bd1921e54a8;p=thirdparty%2Fgcc.git libsdc++: Test using range_format::map as format_kind. This adderess TODO from the test file. libstdc++-v3/ChangeLog: * testsuite/std/format/ranges/format_kind.cc: New test. Signed-off-by: Tomasz Kamiński --- diff --git a/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc b/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc index 14b9ff20c21..1450fbaebc5 100644 --- a/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc +++ b/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc @@ -75,7 +75,9 @@ void test_override() CustFormat setf{1, 2, 3}; VERIFY( std::format("{}", setf) == "{1, 2, 3}" ); - // TODO test map once formatter for pair is implenented + CustFormat, std::range_format::map> mapf + {{1, 11}, {2, 22}, {3, 33}}; + VERIFY( std::format("{}", mapf) == "{1: 11, 2: 22, 3: 33}" ); CustFormat stringf{'a', 'b', 'c', 'd'}; VERIFY( std::format("{}", stringf) == "abcd" );