diff options
Diffstat (limited to 'sal/qa/rtl/uri/rtl_testuri.cxx')
-rw-r--r-- | sal/qa/rtl/uri/rtl_testuri.cxx | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index 3310ec25bba6..aea0d50c6c54 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -44,7 +44,6 @@ void Test::test_Uri() { rtl_UriCharClass const eFirstCharClass = rtl_UriCharClassNone; rtl_UriCharClass const eLastCharClass = rtl_UriCharClassUnoParamValue; - OUStringBuffer aBuffer; OUString aText1; OUString aText2; @@ -182,12 +181,11 @@ void Test::test_Uri() { // Check surrogate handling: - aBuffer.append(u'\xD800'); // %ED%A0%80 - aBuffer.append(u'\xD800'); // %F0%90%8F%BF - aBuffer.append(u'\xDFFF'); - aBuffer.append(u'\xDFFF'); // %ED%BF%BF - aBuffer.append('A'); // A - aText1 = aBuffer.makeStringAndClear(); + aText1 = OUStringLiteral1(u'\xD800') + // %ED%A0%80 + OUStringLiteral1(u'\xD800') + // %F0%90%8F%BF + OUStringLiteral1(u'\xDFFF') + + OUStringLiteral1(u'\xDFFF') + // %ED%BF%BF + "A"; // A aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 11", @@ -209,12 +207,11 @@ void Test::test_Uri() { RTL_TEXTENCODING_UTF8)); aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A"; - aBuffer.append("%ED%A0%80"); - aBuffer.append(u'\xD800'); - aBuffer.append(u'\xDFFF'); - aBuffer.append("%ED%BF%BF"); - aBuffer.append('A'); - aText2 = aBuffer.makeStringAndClear(); + aText2 = "%ED%A0%80" + + OUStringLiteral1(u'\xD800') + + OUStringLiteral1(u'\xDFFF') + + "%ED%BF%BF" + "A"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 14", aText2, @@ -250,9 +247,8 @@ void Test::test_Uri() { // Check IURI handling: aText1 = "%30%C3%BF"; - aBuffer.append("%30"); - aBuffer.append(u'\x00FF'); - aText2 = aBuffer.makeStringAndClear(); + aText2 = "%30" + + OUStringLiteral1(u'\x00FF'); CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 18", aText2, |