vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
New commits: commit 3584fd0d110b4138ec32cf55ddd07e3fb8d81333 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu May 18 11:09:51 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu May 18 15:30:46 2023 +0200 CppunitTest_vcl_filters_test: just pass the file name as parameter Otherwise these files would be flagged as unused Change-Id: I3203ef7820a6e5b31d48578d9184b5822836f27c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151940 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx index 66153f463f78..6bbe34c50d2b 100644 --- a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx +++ b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx @@ -57,7 +57,7 @@ public: private: void testRoundtrip(bool lossy); - void testRead(bool lossy, bool alpha); + void testRead(std::u16string_view rName, bool lossy, bool alpha); }; bool WebpFilterTest::load(const OUString&, const OUString& rURL, const OUString&, SfxFilterFlags, @@ -156,20 +156,19 @@ void WebpFilterTest::testRoundtrip(bool lossy) vcl::getImportFormatShortName(aDetector.getMetadata().mnFormat)); } -void WebpFilterTest::testReadAlphaLossless() { testRead(false, true); } +void WebpFilterTest::testReadAlphaLossless() { testRead(u"alpha_lossless.webp", false, true); } -void WebpFilterTest::testReadAlphaLossy() { testRead(true, true); } +void WebpFilterTest::testReadAlphaLossy() { testRead(u"alpha_lossy.webp", true, true); } -void WebpFilterTest::testReadNoAlphaLossless() { testRead(false, false); } +void WebpFilterTest::testReadNoAlphaLossless() { testRead(u"noalpha_lossless.webp", false, false); } -void WebpFilterTest::testReadNoAlphaLossy() { testRead(true, false); } +void WebpFilterTest::testReadNoAlphaLossy() { testRead(u"noalpha_lossy.webp", true, false); } -void WebpFilterTest::testRead(bool lossy, bool alpha) +void WebpFilterTest::testRead(std::u16string_view rName, bool lossy, bool alpha) { // Read a file created in GIMP and check it's read correctly. - OUString file = m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/webp/") - + (alpha ? u"alpha" : u"noalpha") + "_" + (lossy ? u"lossy" : u"lossless") - + ".webp"; + OUString file + = m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/webp/") + rName; SvFileStream aFileStream(file, StreamMode::READ); Graphic aGraphic; GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();