From bfffa6d7cee18d0814bc38f1d053a0d0b27f972c Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 30 Apr 2013 00:31:58 +0200 Subject: [PATCH] Add unit test for pdfimport image import. Change-Id: Ifd51f0c25418085ba8a6e8d331ac5c6d8139d18a --- sdext/source/pdfimport/test/tests.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index ec3681011626..a90010fdbaee 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -82,7 +82,8 @@ namespace m_bPageEnded(false), m_bRedCircleSeen(false), m_bGreenStrokeSeen(false), - m_bDashedLineSeen(false) + m_bDashedLineSeen(false), + m_bImageSeen(false) {} ~TestSink() @@ -111,6 +112,7 @@ namespace CPPUNIT_ASSERT_MESSAGE( "red circle seen in input", m_bRedCircleSeen ); CPPUNIT_ASSERT_MESSAGE( "green stroke seen in input", m_bGreenStrokeSeen ); CPPUNIT_ASSERT_MESSAGE( "dashed line seen in input", m_bDashedLineSeen ); + CPPUNIT_ASSERT_MESSAGE( "image seen in input", m_bImageSeen ); } private: @@ -377,6 +379,7 @@ namespace xBitmap[0].Name.compareToAscii( "URL" ) == 0 ); CPPUNIT_ASSERT_MESSAGE( "drawImage got InputStream param", xBitmap[1].Name.compareToAscii( "InputStream" ) == 0 ); + m_bImageSeen = true; } virtual void drawColorMaskedImage(const uno::Sequence& xBitmap, @@ -450,6 +453,7 @@ namespace bool m_bRedCircleSeen; bool m_bGreenStrokeSeen; bool m_bDashedLineSeen; + bool m_bImageSeen; }; class PDFITest : public test::BootstrapFixture