From af9c764aa16404608ffd7b9664006683e28f13bd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Jun 2007 14:21:40 +0000 Subject: [PATCH] strWC used in the tests was supposed to be a wide string, not a narrow one git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/strings/crt.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/strings/crt.cpp b/tests/strings/crt.cpp index ee9c19d92b..68b752c295 100644 --- a/tests/strings/crt.cpp +++ b/tests/strings/crt.cpp @@ -24,6 +24,14 @@ #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() ); } + -- 2.45.2