aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/std
diff options
context:
space:
mode:
authorTomasz Kamiński <tkaminsk@redhat.com>2025-07-29 14:59:35 +0200
committerTomasz Kamiński <tkaminsk@redhat.com>2025-07-29 16:08:46 +0200
commit689ee39f7bbb632a9ca7d1dc18192bd1921e54a8 (patch)
tree4704cb78edd16d296cd0f5d4076ca212ec8946c1 /libstdc++-v3/testsuite/std
parentb267361f23c98ab9d9ca2b0fcf23b57117a84752 (diff)
downloadgcc-689ee39f7bbb632a9ca7d1dc18192bd1921e54a8.zip
gcc-689ee39f7bbb632a9ca7d1dc18192bd1921e54a8.tar.gz
gcc-689ee39f7bbb632a9ca7d1dc18192bd1921e54a8.tar.bz2
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 <tkaminsk@redhat.com>
Diffstat (limited to 'libstdc++-v3/testsuite/std')
-rw-r--r--libstdc++-v3/testsuite/std/format/ranges/format_kind.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc b/libstdc++-v3/testsuite/std/format/ranges/format_kind.cc
index 14b9ff2..1450fba 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<int, std::range_format::set> setf{1, 2, 3};
VERIFY( std::format("{}", setf) == "{1, 2, 3}" );
- // TODO test map once formatter for pair is implenented
+ CustFormat<std::pair<int, int>, std::range_format::map> mapf
+ {{1, 11}, {2, 22}, {3, 33}};
+ VERIFY( std::format("{}", mapf) == "{1: 11, 2: 22, 3: 33}" );
CustFormat<char, std::range_format::string> stringf{'a', 'b', 'c', 'd'};
VERIFY( std::format("{}", stringf) == "abcd" );