X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76c6fcbc315d53676d220bac80b5198849020804..c0b0635cf69537ca32377bad5650b39402cb21b6:/tests/strings/strings.cpp diff --git a/tests/strings/strings.cpp b/tests/strings/strings.cpp index 9053cf47b1..1aa6be1ba8 100644 --- a/tests/strings/strings.cpp +++ b/tests/strings/strings.cpp @@ -155,10 +155,12 @@ void StringTestCase::Constructors() #if wxUSE_WCHAR_T void StringTestCase::ConstructorsWithConversion() { - // Déj`a in UTF-8 and wchar_t: - const char utf8[] = {0x44,0xC3,0xA9,0x6A,0xC3,0xA0,0}; + // the string "Déjà" in UTF-8 and wchar_t: + const unsigned char utf8Buf[] = {0x44,0xC3,0xA9,0x6A,0xC3,0xA0,0}; const wchar_t wchar[] = {0x44,0xE9,0x6A,0xE0,0}; - const char utf8sub[] = {0x44,0xC3,0xA9,0x6A,0}; // "Dej" + const unsigned char utf8subBuf[] = {0x44,0xC3,0xA9,0x6A,0}; // just "Déj" + const char *utf8 = (char *)utf8Buf; + const char *utf8sub = (char *)utf8subBuf; wxString s1(utf8, wxConvUTF8); wxString s2(wchar, wxConvUTF8); @@ -338,8 +340,8 @@ DoTokenizerGetPosition(const wxChar *s, const wxChar *delims, int pos, ...) void StringTestCase::TokenizerGetPosition() { DoTokenizerGetPosition(_T("foo"), _T("_"), 3, 0); - DoTokenizerGetPosition(_T("foo_bar"), _T("_"), 3, 7, 0); - DoTokenizerGetPosition(_T("foo_bar_"), _T("_"), 3, 7,8, 0); + DoTokenizerGetPosition(_T("foo_bar"), _T("_"), 4, 7, 0); + DoTokenizerGetPosition(_T("foo_bar_"), _T("_"), 4, 8, 0); } void StringTestCase::Replace()