mirror of
https://github.com/fmtlib/fmt.git
synced 2026-09-13 22:32:36 +08:00
Test dynamic width in nested_formatter
This commit is contained in:
parent
cbb264122a
commit
bc82c408a6
@ -2083,6 +2083,7 @@ TEST(format_test, nested_formatter) {
|
||||
EXPECT_EQ(fmt::format("{:.{}f}", point{1.234, 5.678}, 2), "(1.23, 5.68)");
|
||||
EXPECT_EQ(fmt::format("{:>20.{}f}", point{1.234, 5.678}, 2),
|
||||
" (1.23, 5.68)");
|
||||
EXPECT_EQ(fmt::format("{:>{}.2f}", point{1, 2}, 20), " (1.00, 2.00)");
|
||||
EXPECT_EQ(fmt::format("{:.{}f}", point{1.2344, 67.8901}, 3),
|
||||
"(1.234, 67.890)");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user