Show value if comparison fails in VarArgTestCase

Use string comparison instead of wxStrcmp() to view the actual value of
the string if it doesn't have the expected value.
This commit is contained in:
Vadim Zeitlin
2017-11-25 12:58:33 +01:00
parent 01cd702ee3
commit 4e4617a9e6

View File

@@ -206,12 +206,12 @@ void VarArgTestCase::Sscanf()
wxSscanf(input, "%d %s", &i, &str);
CPPUNIT_ASSERT( i == 42 );
CPPUNIT_ASSERT( wxStrcmp(str, "test") == 0 );
CPPUNIT_ASSERT( wxString(str) == "test" );
i = 0;
wxSscanf(input, L"%d %s", &i, &wstr);
CPPUNIT_ASSERT( i == 42 );
CPPUNIT_ASSERT( wxStrcmp(wstr, "test") == 0 );
CPPUNIT_ASSERT( wxString(wstr) == "test" );
}
void VarArgTestCase::RepeatedPrintf()