Add a map formatter

This commit is contained in:
Victor Zverovich
2021-12-18 07:12:53 -08:00
parent be51ee1ceb
commit 121002d700
2 changed files with 54 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ TEST(ranges_test, format_vector2) {
TEST(ranges_test, format_map) {
auto m = std::map<std::string, int>{{"one", 1}, {"two", 2}};
EXPECT_EQ(fmt::format("{}", m), "[(\"one\", 1), (\"two\", 2)]");
EXPECT_EQ(fmt::format("{}", m), "{\"one\": 1, \"two\": 2}");
}
TEST(ranges_test, format_pair) {