From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sat, 9 Dec 2006 15:58:32 +0000 (+0000)
Subject: Unicode compilation fixes
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b51abd73805c271dbba5af48db9519030702c751

Unicode compilation fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
index 889b28262c..992a05a8bf 100644
--- a/tests/filename/filenametest.cpp
+++ b/tests/filename/filenametest.cpp
@@ -149,7 +149,7 @@ void FileNameTestCase::TestConstruction()
         // if the test is run from root directory or its direct subdirectory
         CPPUNIT_ASSERT_MESSAGE
         (
-            wxString::Format("Normalize(%s) failed", fni.fullname).c_str(),
+            (const char *)wxString::Format(_T("Normalize(%s) failed"), fni.fullname).mb_str(),
             fn.Normalize(wxPATH_NORM_ALL, _T("/foo/bar/baz"), fni.format)
         );
 
@@ -274,7 +274,7 @@ void FileNameTestCase::TestNormalize()
         // be sure this normalization does not fail
         CPPUNIT_ASSERT_MESSAGE
         (
-            wxString::Format("Normalize(%s) failed", tests[i].original).c_str(),
+            (const char *)wxString::Format(_T("Normalize(%s) failed"), tests[i].original).mb_str(),
             fn.Normalize(tests[i].flags, cwd, wxPATH_UNIX)
         );
 
diff --git a/tests/strings/vsnprintf.cpp b/tests/strings/vsnprintf.cpp
index 640cc307a6..fc77afe626 100644
--- a/tests/strings/vsnprintf.cpp
+++ b/tests/strings/vsnprintf.cpp
@@ -253,7 +253,7 @@ void VsnprintfTestCase::S()
     CMP3("abcde", "%.5s", wxT("abcdefghi"));
 
     // do the same tests but with Unicode characters:
-#if wxUSE_UNICODE
+#if wxUSE_UNICODE && !defined(__VISUALC__) // FIXME: this doesn't compile with VC7
     #define ALPHA     "\x3B1"
     #define BETA      "\x3B2"
     #define GAMMA     "\x3B3"