// provide an overload of cppunit assertEquals(T, T) which can be used to
// compare wxStrings directly with C strings
+inline void
+assertEquals(const char *expected,
+ const char *actual,
+ CppUnit::SourceLine sourceLine,
+ const std::string& message)
+{
+ assertEquals(wxString(expected), wxString(actual), sourceLine, message);
+}
+
inline void
assertEquals(const char *expected,
const wxString& actual,
CPPUNIT_ASSERT_EQUAL( ',', *wxStrpbrk(strWX.c_str(), s.mb_str()) );
CPPUNIT_ASSERT_EQUAL( L',', *wxStrpbrk(strWX.c_str(), s.wc_str()) );
- CPPUNIT_ASSERT_EQUAL( (char *)NULL, wxStrpbrk(strWX, "xyz") );
- CPPUNIT_ASSERT_EQUAL( (wchar_t *)NULL, wxStrpbrk(strWX.c_str(), L"xyz") );
+ CPPUNIT_ASSERT( !wxStrpbrk(strWX, "xyz") );
+ CPPUNIT_ASSERT( !wxStrpbrk(strWX.c_str(), L"xyz") );
}
void CrtTestCase::Strnlen()
// but assigning it to wxCharBuffer makes a full copy
wxCharBuffer buf(sbuf);
CPPUNIT_ASSERT( buf.data() != literal );
- CPPUNIT_ASSERT_EQUAL( literal, buf );
+ CPPUNIT_ASSERT_EQUAL( literal, buf.data() );
wxCharBuffer buf2 = sbuf;
CPPUNIT_ASSERT( buf2.data() != literal );
- CPPUNIT_ASSERT_EQUAL( literal, buf );
+ CPPUNIT_ASSERT_EQUAL( literal, buf.data() );
}