Use grouping() from locale for specifier 'n'

This commit is contained in:
daniel
2019-11-03 00:28:52 +01:00
committed by Victor Zverovich
parent ffd05e65ed
commit f1559e1d56
6 changed files with 95 additions and 18 deletions

View File

@@ -1475,11 +1475,7 @@ TEST(FormatterTest, FormatOct) {
}
TEST(FormatterTest, FormatIntLocale) {
EXPECT_EQ("123", format("{:n}", 123));
EXPECT_EQ("1,234", format("{:n}", 1234));
EXPECT_EQ("1,234,567", format("{:n}", 1234567));
EXPECT_EQ("4,294,967,295",
format("{:n}", max_value<uint32_t>()));
EXPECT_EQ("1234", format("{:n}", 1234));
}
struct ConvertibleToLongLong {