abort with a descriptive message on bad HintFmt usage
Change-Id: Ic2f05572042343a8160fd971394372f5f2706fc4
This commit is contained in:
@@ -15,9 +15,9 @@ TEST(HintFmt, arg_count)
|
||||
ASSERT_EQ(HintFmt("%1%", "hello").str(), ANSI_MAGENTA "hello" ANSI_NORMAL);
|
||||
|
||||
// Argument counts are detected at construction.
|
||||
ASSERT_THROW(HintFmt("%s %s", 1), boost::io::too_few_args);
|
||||
ASSERT_DEATH(HintFmt("%s %s", 1), "HintFmt received incorrect");
|
||||
|
||||
ASSERT_THROW(HintFmt("%s", 1, 2), boost::io::too_many_args);
|
||||
ASSERT_DEATH(HintFmt("%s", 1, 2), "HintFmt received incorrect");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user