mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
More tests.
This commit is contained in:
@ -265,6 +265,10 @@ TEST(PrintfTest, IgnorePrecisionForNonNumericArg) {
|
|||||||
|
|
||||||
TEST(PrintfTest, DynamicPrecision) {
|
TEST(PrintfTest, DynamicPrecision) {
|
||||||
EXPECT_EQ("00042", str(fmt::sprintf("%.*d", 5, 42)));
|
EXPECT_EQ("00042", str(fmt::sprintf("%.*d", 5, 42)));
|
||||||
|
EXPECT_THROW_MSG(fmt::sprintf("%.*d", 5.0, 42), FormatError,
|
||||||
|
"precision is not integer");
|
||||||
|
EXPECT_THROW_MSG(fmt::sprintf("%.*d"), FormatError,
|
||||||
|
"argument index is out of range in format");
|
||||||
// TODO: more tests
|
// TODO: more tests
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user