summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-05-18 11:09:51 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-05-18 15:30:46 +0200
commit3584fd0d110b4138ec32cf55ddd07e3fb8d81333 (patch)
tree0948a62c42897d9d51e227226690f3afff1914e1 /vcl
parent5a4d78d9a9b45c7fa387b66f5e310447ec813034 (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx17
1 files changed, 8 insertions, 9 deletions
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();