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
This commit is contained in:
@@ -24,6 +24,14 @@
|
|||||||
|
|
||||||
#include "wx/textfile.h"
|
#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
|
// test class
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -130,10 +138,6 @@ void CrtTestCase::Strcmp()
|
|||||||
|
|
||||||
void CrtTestCase::Strspn()
|
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(strMB, "xyz") == 0 );
|
||||||
CPPUNIT_ASSERT( wxStrspn(strWC, "xyz") == 0 );
|
CPPUNIT_ASSERT( wxStrspn(strWC, "xyz") == 0 );
|
||||||
CPPUNIT_ASSERT( wxStrspn(strWX, "xyz") == 0 );
|
CPPUNIT_ASSERT( wxStrspn(strWX, "xyz") == 0 );
|
||||||
@@ -156,10 +160,6 @@ void CrtTestCase::Strspn()
|
|||||||
|
|
||||||
void CrtTestCase::Strcspn()
|
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(strMB, strWX) == 0 );
|
||||||
CPPUNIT_ASSERT( wxStrcspn(strWC, strMB) == 0 );
|
CPPUNIT_ASSERT( wxStrcspn(strWC, strMB) == 0 );
|
||||||
CPPUNIT_ASSERT( wxStrcspn(strWX, strWC) == 0 );
|
CPPUNIT_ASSERT( wxStrcspn(strWX, strWC) == 0 );
|
||||||
@@ -176,3 +176,4 @@ void CrtTestCase::Strcspn()
|
|||||||
CPPUNIT_ASSERT( wxStrcspn(strWC, "xy") == strWX.length() );
|
CPPUNIT_ASSERT( wxStrcspn(strWC, "xy") == strWX.length() );
|
||||||
CPPUNIT_ASSERT( wxStrcspn(strWX, "xy") == strWX.length() );
|
CPPUNIT_ASSERT( wxStrcspn(strWX, "xy") == strWX.length() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user