summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-06 09:42:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-07 00:47:20 +0200
commite0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (patch)
tree1afe391a2b4bf9eda13de043658941060cb401c2 /i18npool
parent9e3da252c361b3e2b04a2df7a3ae2a5177b37713 (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 'i18npool')
-rw-r--r--i18npool/qa/cppunit/test_characterclassification.cxx84
-rw-r--r--i18npool/qa/cppunit/test_defaultnumberingprovider.cxx56
-rw-r--r--i18npool/qa/cppunit/test_textsearch.cxx18
3 files changed, 79 insertions, 79 deletions
diff --git a/i18npool/qa/cppunit/test_characterclassification.cxx b/i18npool/qa/cppunit/test_characterclassification.cxx
index 78397029b71f..a7689aa1559f 100644
--- a/i18npool/qa/cppunit/test_characterclassification.cxx
+++ b/i18npool/qa/cppunit/test_characterclassification.cxx
@@ -85,33 +85,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSigma)
{
{
// From upper case
- OUString sTest(u"ὈΔΥΣΣΕΎΣ");
+ OUString sTest(u"ὈΔΥΣΣΕΎΣ"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ὀδυσσεύς"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ὀδυσσεύς"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
{
// From lower case
- OUString sTest(u"ὀδυσσεύς");
+ OUString sTest(u"ὀδυσσεύς"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ὀδυσσεύς"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ὀδυσσεύς"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ὈΔΥΣΣΕΎΣ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ὈΔΥΣΣΕΎΣ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase);
}
{
// From title case
- OUString sTest(u"Ὀδυσσεύς");
+ OUString sTest(u"Ὀδυσσεύς"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ὀδυσσεύς"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ὀδυσσεύς"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ὈΔΥΣΣΕΎΣ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ὈΔΥΣΣΕΎΣ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ὀδυσσεύς"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ὀδυσσεύς"_ustr, sLowerCase);
}
}
@@ -119,33 +119,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf96343)
{
{
// From upper case
- OUString sTest(u"ꙊꙌꙖ");
+ OUString sTest(u"ꙊꙌꙖ"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ꙋꙍꙗ"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ꙋꙍꙗ"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
{
// From lower case
- OUString sTest(u"ꙋꙍꙗ");
+ OUString sTest(u"ꙋꙍꙗ"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ꙋꙍꙗ"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ꙋꙍꙗ"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ꙊꙌꙖ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ꙊꙌꙖ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase);
}
{
// From title case
- OUString sTest(u"Ꙋꙍꙗ");
+ OUString sTest(u"Ꙋꙍꙗ"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ꙋꙍꙗ"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ꙋꙍꙗ"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ꙊꙌꙖ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ꙊꙌꙖ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ꙋꙍꙗ"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ꙋꙍꙗ"_ustr, sLowerCase);
}
}
@@ -153,33 +153,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf134766)
{
{
// From upper case
- OUString sTest(u"QꞋORBꞋAL");
+ OUString sTest(u"QꞋORBꞋAL"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"qꞌorbꞌal"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"qꞌorbꞌal"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
{
// From lower case
- OUString sTest(u"qꞌorbꞌal");
+ OUString sTest(u"qꞌorbꞌal"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Qꞌorbꞌal"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Qꞌorbꞌal"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"QꞋORBꞋAL"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"QꞋORBꞋAL"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase);
}
{
// From title case
- OUString sTest(u"Qꞌorbꞌal");
+ OUString sTest(u"Qꞌorbꞌal"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Qꞌorbꞌal"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Qꞌorbꞌal"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"QꞋORBꞋAL"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"QꞋORBꞋAL"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"qꞌorbꞌal"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"qꞌorbꞌal"_ustr, sLowerCase);
}
}
@@ -187,33 +187,33 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testTdf97152)
{
{
// From upper case
- OUString sTest(u"ͲͰϽϾϿͿϏϹ");
+ OUString sTest(u"ͲͰϽϾϿͿϏϹ"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ͳͱͻͼͽϳϗϲ"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ͳͱͻͼͽϳϗϲ"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
{
// From lower case
- OUString sTest(u"ͳͱͻͼͽϳϗϲ");
+ OUString sTest(u"ͳͱͻͼͽϳϗϲ"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ͳͱͻͼͽϳϗϲ"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ͳͱͻͼͽϳϗϲ"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ͲͰϽϾϿͿϏϹ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ͲͰϽϾϿͿϏϹ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sUpperCase, 0, sUpperCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", sTest, sLowerCase);
}
{
// From title case
- OUString sTest(u"Ͳͱͻͼͽϳϗϲ");
+ OUString sTest(u"Ͳͱͻͼͽϳϗϲ"_ustr);
OUString sTitleCase = m_xCC->toTitle(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", OUString(u"Ͳͱͻͼͽϳϗϲ"), sTitleCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be title", u"Ͳͱͻͼͽϳϗϲ"_ustr, sTitleCase);
OUString sUpperCase = m_xCC->toUpper(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", OUString(u"ͲͰϽϾϿͿϏϹ"), sUpperCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", u"ͲͰϽϾϿͿϏϹ"_ustr, sUpperCase);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"ͳͱͻͼͽϳϗϲ"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"ͳͱͻͼͽϳϗϲ"_ustr, sLowerCase);
}
}
@@ -221,18 +221,18 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSurrogatePairs)
{
{
// No case mapping
- OUString sTest(u"\U0001F600");
+ OUString sTest(u"\U0001F600"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"\U0001F600"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"\U0001F600"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
{
// Case mapping
- OUString sTest(u"\U00010400");
+ OUString sTest(u"\U00010400"_ustr);
OUString sLowerCase = m_xCC->toLower(sTest, 0, sTest.getLength(), {});
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", OUString(u"\U00010428"), sLowerCase);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be lower", u"\U00010428"_ustr, sLowerCase);
OUString sUpperCase = m_xCC->toUpper(sLowerCase, 0, sLowerCase.getLength(), {});
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be upper", sTest, sUpperCase);
}
@@ -240,8 +240,8 @@ CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testSurrogatePairs)
CPPUNIT_TEST_FIXTURE(TestCharacterClassification, testAdlam)
{
- OUString sUpper(u"𞤀𞤁𞤂𞤃𞤄𞤅𞤆𞤇𞤈𞤉𞤊𞤋𞤌𞤍𞤎𞤏𞤐𞤑𞤒𞤓𞤔𞤕𞤖𞤗𞤘𞤙𞤚𞤛𞤜𞤝𞤞𞤟𞤠𞤡");
- OUString sLower(u"𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃");
+ OUString sUpper(u"𞤀𞤁𞤂𞤃𞤄𞤅𞤆𞤇𞤈𞤉𞤊𞤋𞤌𞤍𞤎𞤏𞤐𞤑𞤒𞤓𞤔𞤕𞤖𞤗𞤘𞤙𞤚𞤛𞤜𞤝𞤞𞤟𞤠𞤡"_ustr);
+ OUString sLower(u"𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃"_ustr);
OUString sTitle = sLower; // Adlam doesn’t have title case?
{
// From upper case
diff --git a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
index 1bf0ab521079..69ac73d41a89 100644
--- a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
+++ b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
@@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting)
OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
// Without the accompanying fix in place, this test would have failed with a
// lang.IllegalArgumentException, support for NUMBER_HANGUL_KO was missing.
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual);
// 10 -> "십"
aProperties = {
@@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc2ed"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc2ed"_ustr, aActual);
// 100 -> "백"
aProperties = {
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ubc31"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ubc31"_ustr, aActual);
}
CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
@@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
// Without the accompanying fix in place, this test would have failed with a
// lang.IllegalArgumentException, support for NUMBER_LEGAL_KO was missing.
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ud558\ub098"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ud558\ub098"_ustr, aActual);
// 2 -> "둘"
aProperties = {
@@ -241,7 +241,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(2)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ub458"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ub458"_ustr, aActual);
// 3 -> "셋"
aProperties = {
@@ -250,7 +250,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(3)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc14b"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc14b"_ustr, aActual);
// 4 -> "넷"
aProperties = {
@@ -259,7 +259,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(4)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ub137"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ub137"_ustr, aActual);
// 5 -> "다섯"
aProperties = {
@@ -268,7 +268,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(5)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ub2e4\uc12f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ub2e4\uc12f"_ustr, aActual);
// 6 -> "여섯
aProperties = {
comphelper::makePropertyValue(
@@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(6)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\uc12f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc5ec\uc12f"_ustr, aActual);
// 7 -> "일곱"
aProperties = {
comphelper::makePropertyValue(
@@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(7)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uacf1"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c\uacf1"_ustr, aActual);
// 8 -> "여덟"
aProperties = {
@@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(8)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\ub35f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub35f"_ustr, aActual);
// 9 -> "아홉"
aProperties = {
@@ -302,7 +302,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(9)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud649"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc544\ud649"_ustr, aActual);
// 10 -> "열"
aProperties = {
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5f4"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc5f4"_ustr, aActual);
// 21 -> "스물하나"
aProperties = {
@@ -320,7 +320,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(21)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc2a4\ubb3c\ud558\ub098"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc2a4\ubb3c\ud558\ub098"_ustr, aActual);
// 32 -> "서른둘"
aProperties = {
@@ -329,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(32)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc11c\ub978\ub458"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc11c\ub978\ub458"_ustr, aActual);
// 43 -> "마흔셋"
aProperties = {
@@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(43)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\ub9c8\ud754\uc14b"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\ub9c8\ud754\uc14b"_ustr, aActual);
// 54 -> "쉰넷"
aProperties = {
@@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(54)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc270\ub137"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc270\ub137"_ustr, aActual);
// 65 -> "예순다섯"
aProperties = {
@@ -356,7 +356,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(65)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc608\uc21c\ub2e4\uc12f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc608\uc21c\ub2e4\uc12f"_ustr, aActual);
// 76 -> "일흔여섯"
aProperties = {
@@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(76)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\ud754\uc5ec\uc12f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c\ud754\uc5ec\uc12f"_ustr, aActual);
// 87 -> "여든일곱"
aProperties = {
@@ -374,7 +374,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(87)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc5ec\ub4e0\uc77c\uacf1"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc5ec\ub4e0\uc77c\uacf1"_ustr, aActual);
// 98 -> "아흔여덟"
aProperties = {
@@ -383,7 +383,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(98)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud754\uc5ec\ub35f"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc5ec\ub35f"_ustr, aActual);
// 99 -> "아흔아홉"
aProperties = {
@@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(99)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc544\ud754\uc544\ud649"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc544\ud754\uc544\ud649"_ustr, aActual);
}
CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
@@ -409,7 +409,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
// Without the accompanying fix in place, this test would have failed with a
// lang.IllegalArgumentException, support for NUMBER_DIGITAL_KO was missing.
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c"_ustr, aActual);
// 10 -> "일영"
aProperties = {
@@ -418,7 +418,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uc601"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601"_ustr, aActual);
// 100 -> "일영영"
aProperties = {
@@ -427,7 +427,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\uc77c\uc601\uc601"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\uc77c\uc601\uc601"_ustr, aActual);
}
CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
@@ -444,7 +444,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
OUString aActual = xFormatter->makeNumberingString(aProperties, aLocale);
// Without the accompanying fix in place, this test would have failed with a
// lang.IllegalArgumentException, support for NUMBER_DIGITAL2_KO was missing.
- CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\u4e00"_ustr, aActual);
// 10 -> "一零"
aProperties = {
@@ -453,7 +453,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(10)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00\u96f6"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6"_ustr, aActual);
// 100 -> "一零零"
aProperties = {
@@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
comphelper::makePropertyValue("Value", static_cast<sal_Int32>(100)),
};
aActual = xFormatter->makeNumberingString(aProperties, aLocale);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\u4e00\u96f6\u96f6"), aActual);
+ CPPUNIT_ASSERT_EQUAL(u"\u4e00\u96f6\u96f6"_ustr, aActual);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/i18npool/qa/cppunit/test_textsearch.cxx b/i18npool/qa/cppunit/test_textsearch.cxx
index f224e58c3809..2efb2b9cdc37 100644
--- a/i18npool/qa/cppunit/test_textsearch.cxx
+++ b/i18npool/qa/cppunit/test_textsearch.cxx
@@ -294,7 +294,7 @@ void TestTextSearch::testWildcardSearch()
void TestTextSearch::testApostropheSearch()
{
// A) find typographic apostrophes also by using ASCII apostrophe in searchString
- OUString str( u"It\u2019s an apostrophe." );
+ OUString str( u"It\u2019s an apostrophe."_ustr );
sal_Int32 startPos = 0, endPos = str.getLength();
// set options
@@ -355,7 +355,7 @@ void TestTextSearch::testApostropheSearch()
CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(2), aRes.endOffset[0] );
// C) search typographic apostrophe in a text with ASCII apostrophes (no result)
- aOptions.searchString = OUString(u"\u2019");
+ aOptions.searchString = u"\u2019"_ustr;
m_xSearch->setOptions( aOptions );
aRes = m_xSearch->searchForward( str, startPos, endPos );
@@ -380,9 +380,9 @@ void TestTextSearch::testApostropheSearch()
CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(2), aRes.endOffset[0] );
// E) search mixed apostrophes in a text with mixed apostrophes:
- aOptions.searchString = OUString(u"'\u2019");
+ aOptions.searchString = u"'\u2019"_ustr;
m_xSearch->setOptions( aOptions );
- str = u"test: \u2019'";
+ str = u"test: \u2019'"_ustr;
// search forward
aRes = m_xSearch->searchForward( str, startPos, str.getLength());
@@ -393,7 +393,7 @@ void TestTextSearch::testApostropheSearch()
CPPUNIT_ASSERT( aRes.subRegExpressions > 0 );
// F) search mixed apostrophes in a text with ASCII apostrophes:
- str = u"test: ''";
+ str = u"test: ''"_ustr;
// search forward
aRes = m_xSearch->searchForward( str, startPos, str.getLength());
@@ -406,7 +406,7 @@ void TestTextSearch::testApostropheSearch()
void TestTextSearch::testTdf138410()
{
- OUString str(u"\u0643\u064f\u062a\u064f\u0628 \u0643\u062a\u0628");
+ OUString str(u"\u0643\u064f\u062a\u064f\u0628 \u0643\u062a\u0628"_ustr);
sal_Int32 startPos = 0, endPos = str.getLength();
util::SearchOptions aOptions;
@@ -419,7 +419,7 @@ void TestTextSearch::testTdf138410()
// text or not, and whether IGNORE_DIACRITICS_CTL is set or not.
// set options
- aOptions.searchString = u"\u0643";
+ aOptions.searchString = u"\u0643"_ustr;
aOptions.transliterateFlags = 0;
m_xSearch->setOptions(aOptions);
@@ -457,7 +457,7 @@ void TestTextSearch::testTdf138410()
// not.
// set options
- aOptions.searchString = u"\u0643\u064f";
+ aOptions.searchString = u"\u0643\u064f"_ustr;
aOptions.transliterateFlags = 0;
m_xSearch->setOptions(aOptions);
@@ -494,7 +494,7 @@ void TestTextSearch::testTdf138410()
// set.
// set options
- aOptions.searchString = u"\u064f";
+ aOptions.searchString = u"\u064f"_ustr;
aOptions.transliterateFlags = 0;
m_xSearch->setOptions(aOptions);