compilation fix for Borland
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -155,12 +155,14 @@ void StringTestCase::Constructors()
 | 
				
			|||||||
#if wxUSE_WCHAR_T
 | 
					#if wxUSE_WCHAR_T
 | 
				
			||||||
void StringTestCase::ConstructorsWithConversion()
 | 
					void StringTestCase::ConstructorsWithConversion()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // D<>j`a in UTF-8 and wchar_t:
 | 
					    // the string "D<EFBFBD>j<EFBFBD>" in UTF-8 and wchar_t:
 | 
				
			||||||
    const unsigned char utf8[] = {0x44,0xC3,0xA9,0x6A,0xC3,0xA0,0};
 | 
					    const unsigned char utf8Buf[] = {0x44,0xC3,0xA9,0x6A,0xC3,0xA0,0};
 | 
				
			||||||
    const wchar_t wchar[] = {0x44,0xE9,0x6A,0xE0,0};
 | 
					    const wchar_t wchar[] = {0x44,0xE9,0x6A,0xE0,0};
 | 
				
			||||||
    const unsigned char utf8sub[] = {0x44,0xC3,0xA9,0x6A,0}; // "Dej"
 | 
					    const unsigned char utf8subBuf[] = {0x44,0xC3,0xA9,0x6A,0}; // just "D<EFBFBD>j"
 | 
				
			||||||
 | 
					    const char *utf8 = (char *)utf8Buf;
 | 
				
			||||||
 | 
					    const char *utf8sub = (char *)utf8subBuf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxString s1((char *)utf8, wxConvUTF8);
 | 
					    wxString s1(utf8, wxConvUTF8);
 | 
				
			||||||
    wxString s2(wchar, wxConvUTF8);
 | 
					    wxString s2(wchar, wxConvUTF8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_UNICODE
 | 
					#if wxUSE_UNICODE
 | 
				
			||||||
@@ -171,8 +173,8 @@ void StringTestCase::ConstructorsWithConversion()
 | 
				
			|||||||
    CPPUNIT_ASSERT( s2 == utf8 );
 | 
					    CPPUNIT_ASSERT( s2 == utf8 );
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxString sub((char *)utf8sub, wxConvUTF8); // "Dej" substring
 | 
					    wxString sub(utf8sub, wxConvUTF8); // "Dej" substring
 | 
				
			||||||
    wxString s3((char *)utf8, wxConvUTF8, 4);
 | 
					    wxString s3(utf8, wxConvUTF8, 4);
 | 
				
			||||||
    wxString s4(wchar, wxConvUTF8, 3);
 | 
					    wxString s4(wchar, wxConvUTF8, 3);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    CPPUNIT_ASSERT( s3 == sub );
 | 
					    CPPUNIT_ASSERT( s3 == sub );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user