summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-01-27 16:45:22 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-27 23:24:42 +0100
commitaa2064c5c5f23f6f4b7bc44e12345b37f66995bc (patch)
treea5073b6d0b0c5846575671975341f0e0b393d98d /editeng
parent686582b4890f458b6b8ee0e1ab19d9ad64793c85 (diff)
Improve loplugin:stringliteralvar
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/qa/unit/core-test.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 35094ca07af2..32136c944091 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -501,8 +501,7 @@ void Test::testAutocorrect()
{
OUString sInput("T\x01");
sal_Unicode const cNextChar('"');
- const sal_Unicode EXPECTED[] = { 'T', 0x01, 0x0201d };
- OUString sExpected(EXPECTED, SAL_N_ELEMENTS(EXPECTED));
+ static constexpr OUStringLiteral sExpected = u"T\x01\u201d";
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
@@ -510,7 +509,7 @@ void Test::testAutocorrect()
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
fprintf(stderr, "text is %x\n", aFoo.getResult()[aFoo.getResult().getLength() - 1]);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", sExpected, aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", OUString(sExpected), aFoo.getResult());
}
}