[Libreoffice-commits] core.git: sal/qa
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 20 10:10:40 UTC 2019
sal/qa/rtl/uri/rtl_testuri.cxx | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
New commits:
commit ad936dea0829fa15ef2d55e180cd55327f282512
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Oct 19 21:07:23 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Oct 20 12:09:50 2019 +0200
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 at redhat.com>
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index b69013e1ed36..fc7e1d30a751 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -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,
More information about the Libreoffice-commits
mailing list