More tests.

This commit is contained in:
Victor Zverovich 2014-06-23 07:17:58 -07:00
parent 1a75ed01cd
commit 8a8be2267d

View File

@ -265,6 +265,10 @@ TEST(PrintfTest, IgnorePrecisionForNonNumericArg) {
TEST(PrintfTest, DynamicPrecision) {
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
}