From 0bb7676889d2a2031d68595f72bf2680dd415470 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Oct 2014 19:36:51 +0000 Subject: [PATCH] Disable surrogate-related unit test for MSW. This test can't work when the in-memory representation is UTF-16, as we can't convert surrogates to anything else in this case. This fixes the unit tests broken since r76622, see #16298. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/strings/unicode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/strings/unicode.cpp b/tests/strings/unicode.cpp index edec58bc19..dd5844c855 100644 --- a/tests/strings/unicode.cpp +++ b/tests/strings/unicode.cpp @@ -395,10 +395,14 @@ void UnicodeTestCase::ConversionUTF16() conv.cMB2WC("\x01\0\0B\0C" /* A macron BC */, 6, &len); CPPUNIT_ASSERT_EQUAL( 3, len ); + // When using UTF-16 internally (i.e. MSW), we don't have any surrogate + // support, so the length of the string below is 2, not 1. +#if SIZEOF_WCHAR_T == 4 // Another one: verify that the length of the resulting string is computed // correctly when there is a surrogate in the input. wxMBConvUTF16BE().cMB2WC("\xd8\x03\xdc\x01\0" /* OLD TURKIC LETTER YENISEI A */, wxNO_LEN, &len); CPPUNIT_ASSERT_EQUAL( 1, len ); +#endif // UTF-32 internal representation } void UnicodeTestCase::ConversionUTF32()