added wxString::[w]char_str() to 2.8 for forward compatibility with wx3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,6 +53,7 @@ private:
|
||||
#endif // wxLongLong_t
|
||||
CPPUNIT_TEST( ToDouble );
|
||||
CPPUNIT_TEST( WriteBuf );
|
||||
CPPUNIT_TEST( CharStr );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
void String();
|
||||
@@ -76,6 +77,7 @@ private:
|
||||
#endif // wxLongLong_t
|
||||
void ToDouble();
|
||||
void WriteBuf();
|
||||
void CharStr();
|
||||
|
||||
DECLARE_NO_COPY_CLASS(StringTestCase)
|
||||
};
|
||||
@@ -630,3 +632,15 @@ void StringTestCase::WriteBuf()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool IsFoo(/* non-const */ char *s)
|
||||
{
|
||||
return strcmp(s, "foo") == 0;
|
||||
}
|
||||
|
||||
void StringTestCase::CharStr()
|
||||
{
|
||||
wxString s(_T("foo"));
|
||||
|
||||
CPPUNIT_ASSERT( IsFoo(s.char_str()) );
|
||||
}
|
||||
|
Reference in New Issue
Block a user