X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7b9ab6200402e1cb0cfd1ecfa751b681341b6a1..8669431addfb4e91de06493bd708496bc45cbe9e:/tests/streams/sstream.cpp diff --git a/tests/streams/sstream.cpp b/tests/streams/sstream.cpp index a6d7890183..4e58062e84 100644 --- a/tests/streams/sstream.cpp +++ b/tests/streams/sstream.cpp @@ -80,7 +80,7 @@ strStream::strStream() m_str.reserve(LEN); for ( size_t n = 0; n < LEN; n++ ) { - m_str += wxChar(_T('A') + n % (_T('Z') - _T('A') + 1)); + m_str += wxChar(wxT('A') + n % (wxT('Z') - wxT('A') + 1)); } } @@ -106,14 +106,8 @@ void strStream::CheckString(const wxString& text) { wxStringOutputStream sos; - size_t len = text.length(); -#if wxUSE_UNICODE - const wxCharBuffer textMB(wxConvLibc.cWC2MB(text.wc_str(), len + 1, &len)); -#else - const char *textMB = text.c_str(); -#endif - - sos.Write(textMB, len); + const wxScopedCharBuffer buf(text.mb_str()); + sos.Write(buf, buf.length()); CPPUNIT_ASSERT_EQUAL( text, sos.GetString() ); }