Replacements for some wcsxxx funcs for systems without them like osx 10.2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -222,6 +222,21 @@ void StringTestCase::Conversion()
|
||||
#endif
|
||||
}
|
||||
|
||||
// in case wcscmp is missing
|
||||
//
|
||||
static int wx_wcscmp(const wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
for (;;) {
|
||||
if (*s1 != *s2)
|
||||
return *s1 - *s2;
|
||||
if (*s1 == 0)
|
||||
break;
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
StringTestCase::DoTestConversion(const char *s,
|
||||
const wchar_t *ws,
|
||||
@@ -240,7 +255,7 @@ StringTestCase::DoTestConversion(const char *s,
|
||||
wxWCharBuffer wbuf(wxString(s).wc_str(conv));
|
||||
|
||||
if ( ws )
|
||||
CPPUNIT_ASSERT( wcscmp(wbuf, ws) == 0 );
|
||||
CPPUNIT_ASSERT( wx_wcscmp(wbuf, ws) == 0 );
|
||||
else
|
||||
CPPUNIT_ASSERT( !*wbuf );
|
||||
}
|
||||
|
Reference in New Issue
Block a user