mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 03:54:10 +02:00
Implement dynamic precision in printf.
This commit is contained in:
@@ -263,6 +263,11 @@ TEST(PrintfTest, IgnorePrecisionForNonNumericArg) {
|
||||
EXPECT_PRINTF("abc", "%.5s", "abc");
|
||||
}
|
||||
|
||||
TEST(PrintfTest, DynamicPrecision) {
|
||||
EXPECT_EQ("00042", str(fmt::sprintf("%.*d", 5, 42)));
|
||||
// TODO: more tests
|
||||
}
|
||||
|
||||
// TODO: test length and type specifier
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user