Use error handler to report errors
This commit is contained in:
@@ -1906,4 +1906,7 @@ TEST(FormatTest, FormatStringErrors) {
|
||||
EXPECT_ERROR("{1}{}",
|
||||
"cannot switch from manual to automatic argument indexing",
|
||||
int, int);
|
||||
EXPECT_ERROR("{}{1}",
|
||||
"cannot switch from automatic to manual argument indexing",
|
||||
int, int);
|
||||
}
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ TEST(PrintfTest, InvalidArgIndex) {
|
||||
format_error, "argument index out of range");
|
||||
|
||||
EXPECT_THROW_MSG(fmt::sprintf("%2$", 42),
|
||||
format_error, "invalid format string");
|
||||
format_error, "argument index out of range");
|
||||
EXPECT_THROW_MSG(fmt::sprintf(format("%{}$d", BIG_NUM), 42),
|
||||
format_error, "number is too big");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user