Add fmt::bytes

This commit is contained in:
Victor Zverovich
2019-12-24 10:11:47 -08:00
parent dea7fde8b7
commit f219dcd59b
3 changed files with 27 additions and 4 deletions

View File

@@ -1766,6 +1766,12 @@ TEST(FormatTest, Dynamic) {
EXPECT_EQ("42 and abc1 and 1.5", result);
}
TEST(FormatTest, Bytes) {
auto s = fmt::format("{:10}", fmt::bytes("ёжик"));
EXPECT_EQ("ёжик ", s);
EXPECT_EQ(10, s.size());
}
TEST(FormatTest, JoinArg) {
using fmt::join;
int v1[3] = {1, 2, 3};