[Libreoffice-commits] core.git: vcl/qa
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 17 01:41:28 UTC 2021
vcl/qa/cppunit/GraphicDescriptorTest.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 3885ef7df0e2a648579100e338920054dbadf6e2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Feb 15 12:49:12 2021 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Feb 17 02:40:34 2021 +0100
vcl: add TIF case to GraphicDescriptorTest
Change-Id: I2e2724fda545e67777c1101b33cc10483f73b3a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111009
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index cb6c6d25d80a..32466a4efcd7 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -32,12 +32,14 @@ class GraphicDescriptorTest : public test::BootstrapFixtureBase
void testDetectPNG();
void testDetectJPG();
void testDetectGIF();
+ void testDetectTIF();
void testDetectBMP();
CPPUNIT_TEST_SUITE(GraphicDescriptorTest);
CPPUNIT_TEST(testDetectPNG);
CPPUNIT_TEST(testDetectJPG);
CPPUNIT_TEST(testDetectGIF);
+ CPPUNIT_TEST(testDetectTIF);
CPPUNIT_TEST(testDetectBMP);
CPPUNIT_TEST_SUITE_END();
};
@@ -104,6 +106,20 @@ void GraphicDescriptorTest::testDetectGIF()
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
}
+void GraphicDescriptorTest::testDetectTIF()
+{
+ SvMemoryStream aStream;
+ createBitmapAndExportForType(aStream, u"tif");
+
+ GraphicDescriptor aDescriptor(aStream, nullptr);
+ aDescriptor.Detect(true);
+
+ CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::TIF, aDescriptor.GetFileFormat());
+
+ CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
+}
+
void GraphicDescriptorTest::testDetectBMP()
{
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
More information about the Libreoffice-commits
mailing list