Check that missing format string arguments are detected
We now assert if not enough arguments are given to a vararg function, as we can actually do it when checking it all at once, unlike before when we only checked for the matching format specifier for each argument, so add a test verifying that this works as expected.
This commit is contained in:
parent
ac4767c47f
commit
21549149f0
1 changed files with 1 additions and 0 deletions
|
|
@ -232,6 +232,7 @@ TEST_CASE("ArgsValidation", "[wxString][vararg][error]")
|
|||
#endif
|
||||
|
||||
// but these are not:
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("%d + %d = %d", 2, 2) );
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("%i", "foo") );
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("%s", (void*)&written) );
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("%d", ptr) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue