Replace some uses of OUStringChar with string literals

(At least MSVC++ 14.14, aka Visual Studio 2017 version 15.7, apparently requires
`"\xDFFF"` to be written with a `u` prefix in the concatenated string literal

  u"\xD800" "\U000103FF" "\xDFFF" "A"

to avoid "error C2022: '57343': too big for character", so prefix all the
individual string literals in such concatenations, even if that should be
redundant.)

Change-Id: Ief69e6c7ae71fe2c4c9c56c38fab0bc782ceb82c
Reviewed-on: https://gerrit.libreoffice.org/81142
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-10-19 21:07:23 +02:00
parent a2b46aa93f
commit ad936dea08

View File

@@ -181,11 +181,10 @@ void Test::test_Uri() {
// Check surrogate handling:
aText1 = OUStringChar(u'\xD800') + // %ED%A0%80
OUStringChar(u'\xD800') + // %F0%90%8F%BF
OUStringChar(u'\xDFFF') +
OUStringChar(u'\xDFFF') + // %ED%BF%BF
"A"; // A
aText1 = u"\xD800" // %ED%A0%80
u"\U000103FF" // 0xD800,0xDFFF -> %F0%90%8F%BF
u"\xDFFF" // %ED%BF%BF
u"A"; // A
aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 11",
@@ -207,11 +206,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8));
aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A";
aText2 = "%ED%A0%80" +
OUStringChar(u'\xD800') +
OUStringChar(u'\xDFFF') +
"%ED%BF%BF"
"A";
aText2 = u"%ED%A0%80" u"\U000103FF" u"%ED%BF%BF" u"A";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 14",
aText2,
@@ -247,8 +242,7 @@ void Test::test_Uri() {
// Check IURI handling:
aText1 = "%30%C3%BF";
aText2 = "%30" +
OUStringChar(u'\x00FF');
aText2 = u"%30\u00FF";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 18",
aText2,