]> git.saurik.com Git - wxWidgets.git/commitdiff
strWC used in the tests was supposed to be a wide string, not a narrow one
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 13 Jun 2007 14:21:40 +0000 (14:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 13 Jun 2007 14:21:40 +0000 (14:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/crt.cpp

index ee9c19d92bd559a8254169e8afb86e09a35c0b21..68b752c295d5abf11dbcc26f4fe53d8225776bfa 100644 (file)
 
 #include "wx/textfile.h"
 
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+static const char *strMB = "hello, world";
+static const wchar_t *strWC = L"hello, world";
+static const wxString strWX("hello, world");
+
 // ----------------------------------------------------------------------------
 // test class
 // ----------------------------------------------------------------------------
@@ -130,10 +138,6 @@ void CrtTestCase::Strcmp()
 
 void CrtTestCase::Strspn()
 {
-    const char *strMB = "hello, world";
-    const char *strWC = "hello, world";
-    const wxString strWX("hello, world");
-
     CPPUNIT_ASSERT( wxStrspn(strMB, "xyz") == 0 );
     CPPUNIT_ASSERT( wxStrspn(strWC, "xyz") == 0 );
     CPPUNIT_ASSERT( wxStrspn(strWX, "xyz") == 0 );
@@ -156,10 +160,6 @@ void CrtTestCase::Strspn()
 
 void CrtTestCase::Strcspn()
 {
-    const char *strMB = "hello, world";
-    const char *strWC = "hello, world";
-    const wxString strWX("hello, world");
-
     CPPUNIT_ASSERT( wxStrcspn(strMB, strWX) == 0 );
     CPPUNIT_ASSERT( wxStrcspn(strWC, strMB) == 0 );
     CPPUNIT_ASSERT( wxStrcspn(strWX, strWC) == 0 );
@@ -176,3 +176,4 @@ void CrtTestCase::Strcspn()
     CPPUNIT_ASSERT( wxStrcspn(strWC, "xy") == strWX.length() );
     CPPUNIT_ASSERT( wxStrcspn(strWX, "xy") == strWX.length() );
 }
+