LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/filter/qa/cppunit - filters-tga-test.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 14 14 100.0 %
Date: 2013-07-09 Functions: 11 12 91.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  */
      12             : 
      13             : #include <unotest/filters-test.hxx>
      14             : #include <test/bootstrapfixture.hxx>
      15             : #include <vcl/FilterConfigItem.hxx>
      16             : #include <tools/stream.hxx>
      17             : #include <vcl/graph.hxx>
      18             : 
      19             : #include <osl/file.hxx>
      20             : #include <osl/process.h>
      21             : 
      22             : #ifdef LIBO_MERGELIBS
      23             : #define GraphicImport itgGraphicImport
      24             : #endif
      25             : 
      26             : extern "C"
      27             : {
      28             :     SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
      29             :         GraphicImport(SvStream & rStream, Graphic & rGraphic,
      30             :         FilterConfigItem*, sal_Bool);
      31             : }
      32             : 
      33             : using namespace ::com::sun::star;
      34             : 
      35             : /* Implementation of Filters test */
      36             : 
      37           2 : class TgaFilterTest
      38             :     : public test::FiltersTest
      39             :     , public test::BootstrapFixture
      40             : {
      41             : public:
      42           1 :     TgaFilterTest() : BootstrapFixture(true, false) {}
      43             : 
      44             :     virtual bool load(const OUString &,
      45             :         const OUString &rURL, const OUString &,
      46             :         unsigned int, unsigned int, unsigned int);
      47             : 
      48             :     /**
      49             :      * Ensure CVEs remain unbroken
      50             :      */
      51             :     void testCVEs();
      52             : 
      53           2 :     CPPUNIT_TEST_SUITE(TgaFilterTest);
      54           1 :     CPPUNIT_TEST(testCVEs);
      55           2 :     CPPUNIT_TEST_SUITE_END();
      56             : };
      57             : 
      58           3 : bool TgaFilterTest::load(const OUString &,
      59             :     const OUString &rURL, const OUString &,
      60             :     unsigned int, unsigned int, unsigned int)
      61             : {
      62           3 :     SvFileStream aFileStream(rURL, STREAM_READ);
      63           6 :     Graphic aGraphic;
      64           6 :     return GraphicImport(aFileStream, aGraphic, NULL, 0);
      65             : }
      66             : 
      67           1 : void TgaFilterTest::testCVEs()
      68             : {
      69             :     testDir(OUString(),
      70             :         getURLFromSrc("/filter/qa/cppunit/data/tga/"),
      71           1 :         OUString());
      72           1 : }
      73             : 
      74           1 : CPPUNIT_TEST_SUITE_REGISTRATION(TgaFilterTest);
      75             : 
      76           4 : CPPUNIT_PLUGIN_IMPLEMENT();
      77             : 
      78             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10