]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/strings/strings.cpp
provide both const char* and const wchar_t* implicit conversion of wxCStrData regardl...
[wxWidgets.git] / tests / strings / strings.cpp
index ca6a5cd709bfb518c8569b596947498f251e7a9c..aabd41bd34fe7b883f68c4dcbc6eaf1e3eeccd20 100644 (file)
@@ -679,21 +679,17 @@ void StringTestCase::DoCStrDataTernaryOperator(bool cond)
 
     wxString s("foo");
 
-    // FIXME-UTF8: when wxCStrData can handle both conversions, this should
-    //             be changed to always test all versions, both MB and WC
-#if wxUSE_UNICODE
     const wchar_t *wcStr = L"foo";
     CPPUNIT_ASSERT( CheckStr(s, (cond ? s.c_str() : wcStr)) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? s.c_str() : L"bar")) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? wcStr : s.c_str())) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? L"bar" : s.c_str())) );
-#else
+
     const char *mbStr = "foo";
     CPPUNIT_ASSERT( CheckStr(s, (cond ? s.c_str() : mbStr)) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? s.c_str() : "foo")) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? mbStr : s.c_str())) );
     CPPUNIT_ASSERT( CheckStr(s, (cond ? "foo" : s.c_str())) );
-#endif
 
     wxString empty("");
     CPPUNIT_ASSERT( CheckStr(empty, (cond ? empty.c_str() : wxEmptyString)) );
@@ -713,15 +709,11 @@ void StringTestCase::CStrDataImplicitConversion()
 {
     wxString s("foo");
 
-    // FIXME-UTF8: when wxCStrData can handle both conversions, this should
-    //             be changed to always test all versions, both MB and WC
-#if wxUSE_UNICODE
     CPPUNIT_ASSERT( CheckStrConstWChar(s, s.c_str()) );
     CPPUNIT_ASSERT( CheckStrConstWChar(s, s) );
-#else
+
     CPPUNIT_ASSERT( CheckStrConstChar(s, s.c_str()) );
     CPPUNIT_ASSERT( CheckStrConstChar(s, s) );
-#endif
 }
 
 void StringTestCase::ExplicitConversion()