LCOV - code coverage report
Current view: top level - filter/qa/cppunit - filters-pict-test.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 14 14 100.0 %
Date: 2012-08-25 Functions: 11 12 91.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 36 76 47.4 %

           Branch data     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                 :            : 
      10                 :            : #include <unotest/filters-test.hxx>
      11                 :            : #include <test/bootstrapfixture.hxx>
      12                 :            : #include <svtools/FilterConfigItem.hxx>
      13                 :            : #include <tools/stream.hxx>
      14                 :            : #include <vcl/graph.hxx>
      15                 :            : 
      16                 :            : #include <osl/file.hxx>
      17                 :            : #include <osl/process.h>
      18                 :            : 
      19                 :            : extern "C"
      20                 :            : {
      21                 :            :     SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
      22                 :            :         GraphicImport(SvStream & rStream, Graphic & rGraphic,
      23                 :            :         FilterConfigItem*, sal_Bool);
      24                 :            : }
      25                 :            : 
      26                 :            : using namespace ::com::sun::star;
      27                 :            : 
      28                 :            : /* Implementation of Filters test */
      29                 :            : 
      30 [ +  - ][ -  + ]:          6 : class PictFilterTest
      31                 :            :     : public test::FiltersTest
      32                 :            :     , public test::BootstrapFixture
      33                 :            : {
      34                 :            : public:
      35         [ +  - ]:          3 :     PictFilterTest() : BootstrapFixture(true, false) {}
      36                 :            : 
      37                 :            :     virtual bool load(const rtl::OUString &, const rtl::OUString &rURL, const rtl::OUString &);
      38                 :            : 
      39                 :            :     /**
      40                 :            :      * Ensure CVEs remain unbroken
      41                 :            :      */
      42                 :            :     void testCVEs();
      43                 :            : 
      44 [ +  - ][ +  - ]:          6 :     CPPUNIT_TEST_SUITE(PictFilterTest);
         [ +  - ][ +  - ]
                 [ #  # ]
      45 [ +  - ][ +  - ]:          3 :     CPPUNIT_TEST(testCVEs);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      46 [ +  - ][ +  - ]:          6 :     CPPUNIT_TEST_SUITE_END();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      47                 :            : };
      48                 :            : 
      49                 :          9 : bool PictFilterTest::load(const rtl::OUString &,
      50                 :            :     const rtl::OUString &rURL, const rtl::OUString &)
      51                 :            : {
      52 [ +  - ][ +  - ]:          9 :     SvFileStream aFileStream(rURL, STREAM_READ);
                 [ +  - ]
      53         [ +  - ]:          9 :     Graphic aGraphic;
      54 [ +  - ][ +  - ]:          9 :     return GraphicImport(aFileStream, aGraphic, NULL, 0);
                 [ +  - ]
      55                 :            : }
      56                 :            : 
      57                 :          3 : void PictFilterTest::testCVEs()
      58                 :            : {
      59                 :            :     testDir(rtl::OUString(),
      60                 :            :         getURLFromSrc("/filter/qa/cppunit/data/pict/"),
      61 [ +  - ][ +  - ]:          3 :         rtl::OUString());
      62                 :          3 : }
      63                 :            : 
      64                 :          3 : CPPUNIT_TEST_SUITE_REGISTRATION(PictFilterTest);
      65                 :            : 
      66 [ +  - ][ +  - ]:         12 : CPPUNIT_PLUGIN_IMPLEMENT();
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
      67                 :            : 
      68                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10