diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-06 09:42:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-07 00:47:20 +0200 |
commit | e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (patch) | |
tree | 1afe391a2b4bf9eda13de043658941060cb401c2 /sal/qa | |
parent | 9e3da252c361b3e2b04a2df7a3ae2a5177b37713 (diff) |
loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/math/test-rtl-math.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/textenc/rtl_textcvt.cxx | 24 | ||||
-rw-r--r-- | sal/qa/rtl/uri/rtl_testuri.cxx | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx index d6851b76aafa..bab2774a414c 100644 --- a/sal/qa/rtl/math/test-rtl-math.cxx +++ b/sal/qa/rtl/math/test-rtl-math.cxx @@ -332,7 +332,7 @@ public: rtl_math_StringFormat_Automatic, 2, u'٫', aGroups, u'٬', true); - CPPUNIT_ASSERT_EQUAL( OUString(u"1٬23٬456٫78"), aRes); + CPPUNIT_ASSERT_EQUAL( u"1٬23٬456٫78"_ustr, aRes); fVal = 4503599627370495.0; aRes = rtl::math::doubleToUString( fVal, diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx index 37ba5e658462..b2d4591065dd 100644 --- a/sal/qa/rtl/textenc/rtl_textcvt.cxx +++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx @@ -2741,7 +2741,7 @@ void Test::testInvalidUtf7() { | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_FLUSH), &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); - CPPUNIT_ASSERT_EQUAL(OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + CPPUNIT_ASSERT_EQUAL(u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(1), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2766,7 +2766,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(4), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD\uFFFD\uFFFD\uFFFD"), + u"\uFFFD\uFFFD\uFFFD\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(4), converted); @@ -2790,7 +2790,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(2), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2833,7 +2833,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(3), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2876,7 +2876,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(2), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD."), OUString(buf, sal_Int32(size))); + u"\uFFFD."_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(3), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2900,7 +2900,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(2), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(6), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2923,7 +2923,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(4), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2946,7 +2946,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(4), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2970,7 +2970,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(5), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -2994,7 +2994,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(6), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -3017,7 +3017,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(1), converted); rtl_destroyTextToUnicodeConverter(converter); @@ -3041,7 +3041,7 @@ void Test::testInvalidUtf8() { &info, &converted); CPPUNIT_ASSERT_EQUAL(sal_Size(1), size); CPPUNIT_ASSERT_EQUAL( - OUString(u"\uFFFD"), OUString(buf, sal_Int32(size))); + u"\uFFFD"_ustr, OUString(buf, sal_Int32(size))); CPPUNIT_ASSERT_EQUAL(RTL_TEXTTOUNICODE_INFO_INVALID, info); CPPUNIT_ASSERT_EQUAL(sal_Size(4), converted); rtl_destroyTextToUnicodeConverter(converter); diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index 0b529112adea..6389f0222418 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -180,7 +180,7 @@ void Test::test_Uri() { aText1 = u"\xD800" // %ED%A0%80 u"\U000103FF" // 0xD800,0xDFFF -> %F0%90%8F%BF u"\xDFFF" // %ED%BF%BF - u"A"; // A + u"A"_ustr; // A aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A"; CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 11", @@ -202,7 +202,7 @@ void Test::test_Uri() { RTL_TEXTENCODING_UTF8)); aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A"; - aText2 = u"%ED%A0%80" u"\U000103FF" u"%ED%BF%BF" u"A"; + aText2 = u"%ED%A0%80" u"\U000103FF" u"%ED%BF%BF" u"A"_ustr; CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 14", aText2, @@ -238,7 +238,7 @@ void Test::test_Uri() { // Check IURI handling: aText1 = "%30%C3%BF"; - aText2 = u"%30\u00FF"; + aText2 = u"%30\u00FF"_ustr; CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 18", aText2, |