diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-05 15:27:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-05 17:01:58 +0200 |
commit | 27c48894cf45fc34f24ae5e1e8bd7a33ab544359 (patch) | |
tree | f3fce1a1e5dc76d932f5f2d973b63563dea1713f /vcl/qa | |
parent | 32e49998b2edde7a6a8fecddf5da71f3aa5815c2 (diff) |
Upcoming loplugin:elidestringvar: vcl
Change-Id: Id746bbb3caeb7555e2a89b13fa6dcb089778002a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95597
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/FontFeatureTest.cxx | 17 | ||||
-rw-r--r-- | vcl/qa/cppunit/app/test_IconThemeInfo.cxx | 15 | ||||
-rw-r--r-- | vcl/qa/cppunit/pdfexport/pdfexport.cxx | 3 |
3 files changed, 14 insertions, 21 deletions
diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx index e4040f35bf39..bd8595902449 100644 --- a/vcl/qa/cppunit/FontFeatureTest.cxx +++ b/vcl/qa/cppunit/FontFeatureTest.cxx @@ -68,15 +68,14 @@ void FontFeatureTest::testGetFontFeatures() CPPUNIT_ASSERT_EQUAL(size_t(53), rDefaultFontFeatures.size()); - OUString aExpectedFeaturesString = "c2sc case dlig fina frac hlig liga lnum " - "locl onum pnum sa01 sa02 sa03 sa04 sa05 " - "sa06 sa07 sa08 salt sinf smcp ss01 ss02 " - "ss03 sups tnum zero ingl cpsp lith litt " - "itlc para algn arti circ dash dbls foot " - "frsp grkn hang lng minu nfsp name quot " - "texm thou vari caps ligc "; - - CPPUNIT_ASSERT_EQUAL(aExpectedFeaturesString, aFeaturesString); + CPPUNIT_ASSERT_EQUAL(OUString("c2sc case dlig fina frac hlig liga lnum " + "locl onum pnum sa01 sa02 sa03 sa04 sa05 " + "sa06 sa07 sa08 salt sinf smcp ss01 ss02 " + "ss03 sups tnum zero ingl cpsp lith litt " + "itlc para algn arti circ dash dbls foot " + "frsp grkn hang lng minu nfsp name quot " + "texm thou vari caps ligc "), + aFeaturesString); // Check C2SC feature { diff --git a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx index d2e466d89f94..a68df2f78b9e 100644 --- a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx +++ b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx @@ -54,8 +54,7 @@ class IconThemeInfoTest : public CppUnit::TestFixture void IconThemeInfoTest::UpperCaseDisplayNameIsReturnedForNonDefaultId() { - OUString const id("katze"); - OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id); + OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName("katze"); CPPUNIT_ASSERT_EQUAL_MESSAGE("theme id is properly uppercased", OUString("Katze"), displayName); } @@ -69,16 +68,14 @@ IconThemeInfoTest::ImagesZipIsNotValid() void IconThemeInfoTest::ImagesColibreZipIsValid() { - OUString const id("file://images_colibre.zip"); - bool valid = vcl::IconThemeInfo::UrlCanBeParsed(id); + bool valid = vcl::IconThemeInfo::UrlCanBeParsed("file://images_colibre.zip"); CPPUNIT_ASSERT_EQUAL_MESSAGE("images_colibre.zip is a valid theme name", true, valid); } void IconThemeInfoTest::ThemeIdIsDetectedFromFileNameWithUnderscore() { - OUString const fname("images_colibre.zip"); - OUString sname = vcl::IconThemeInfo::FileNameToThemeId(fname); + OUString sname = vcl::IconThemeInfo::FileNameToThemeId("images_colibre.zip"); CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme id is returned for 'images_colibre.zip'", OUString("colibre"), sname); } @@ -86,9 +83,8 @@ void IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined1() { bool thrown = false; - OUString const fname("images_colibre"); try { - vcl::IconThemeInfo::FileNameToThemeId(fname); + vcl::IconThemeInfo::FileNameToThemeId("images_colibre"); } catch (std::runtime_error&) { thrown = true; @@ -100,9 +96,8 @@ void IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2() { bool thrown = false; - OUString const fname("image_colibre.zip"); try { - vcl::IconThemeInfo::FileNameToThemeId(fname); + vcl::IconThemeInfo::FileNameToThemeId("image_colibre.zip"); } catch (std::runtime_error&) { thrown = true; diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 45eb62921bcb..754f86af2bd0 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1170,12 +1170,11 @@ void PdfExportTest::testTdf115117_1a() int nChars = FPDFText_CountChars(pPdfTextPage); CPPUNIT_ASSERT_EQUAL(44, nChars); - OUString aExpectedText = "ti ti test ti\r\nti test fi fl ffi ffl test fi"; std::vector<sal_uInt32> aChars(nChars); for (int i = 0; i < nChars; i++) aChars[i] = FPDFText_GetUnicode(pPdfTextPage, i); OUString aActualText(aChars.data(), aChars.size()); - CPPUNIT_ASSERT_EQUAL(aExpectedText, aActualText); + CPPUNIT_ASSERT_EQUAL(OUString("ti ti test ti\r\nti test fi fl ffi ffl test fi"), aActualText); FPDFText_ClosePage(pPdfTextPage); #endif |