thousands -> group_digits

This commit is contained in:
Victor Zverovich
2021-09-05 06:47:18 -07:00
parent c4d0f96a6d
commit 3940de5952
2 changed files with 8 additions and 8 deletions

View File

@@ -1595,9 +1595,9 @@ TEST(format_test, bytes) {
EXPECT_EQ(10, s.size());
}
TEST(format_test, thousands) {
EXPECT_EQ(fmt::format("{}", fmt::thousands(10000000)), "10,000,000");
EXPECT_EQ(fmt::format("{:8}", fmt::thousands(1000)), " 1,000");
TEST(format_test, group_digits_view) {
EXPECT_EQ(fmt::format("{}", fmt::group_digits(10000000)), "10,000,000");
EXPECT_EQ(fmt::format("{:8}", fmt::group_digits(1000)), " 1,000");
}
enum test_enum { foo, bar };