- wxWCharBuffer wbuf(conv.cMB2WC(buf));
-#if wxUSE_UNICODE
- CPPUNIT_ASSERT_EQUAL( data, wbuf );
-#else // !wxUSE_UNICODE
- CPPUNIT_ASSERT
- (
- memcmp(wbuf, L"Hello\0UTF", data.length()*sizeof(wchar_t)) == 0
- );
-#endif // wxUSE_UNICODE/!wxUSE_UNICODE
+ wxString dataReadBack(buf, conv, len);
+ CPPUNIT_ASSERT_EQUAL( data, dataReadBack );