LCOV - code coverage report
Current view: top level - filter/qa/cppunit - filters-psd-test.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 14 14 100.0 %
Date: 2014-11-03 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             : 
      10             : #include <unotest/filters-test.hxx>
      11             : #include <test/bootstrapfixture.hxx>
      12             : #include <vcl/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 bool SAL_CALL
      22             :         GraphicImport(SvStream & rStream, Graphic & rGraphic,
      23             :         FilterConfigItem*);
      24             : }
      25             : 
      26             : using namespace ::com::sun::star;
      27             : 
      28             : /* Implementation of Filters test */
      29             : 
      30           4 : class PsdFilterTest
      31             :     : public test::FiltersTest
      32             :     , public test::BootstrapFixture
      33             : {
      34             : public:
      35           2 :     PsdFilterTest() : BootstrapFixture(true, false) {}
      36             : 
      37             :     virtual bool load(const OUString &,
      38             :         const OUString &rURL, const OUString &,
      39             :         unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
      40             : 
      41             :     /**
      42             :      * Ensure CVEs remain unbroken
      43             :      */
      44             :     void testCVEs();
      45             : 
      46           4 :     CPPUNIT_TEST_SUITE(PsdFilterTest);
      47           2 :     CPPUNIT_TEST(testCVEs);
      48           4 :     CPPUNIT_TEST_SUITE_END();
      49             : };
      50             : 
      51           4 : bool PsdFilterTest::load(const OUString &,
      52             :     const OUString &rURL, const OUString &,
      53             :     unsigned int, unsigned int, unsigned int)
      54             : {
      55           4 :     SvFileStream aFileStream(rURL, STREAM_READ);
      56           8 :     Graphic aGraphic;
      57           8 :     return GraphicImport(aFileStream, aGraphic, NULL);
      58             : }
      59             : 
      60           2 : void PsdFilterTest::testCVEs()
      61             : {
      62             :     testDir(OUString(),
      63             :         getURLFromSrc("/filter/qa/cppunit/data/psd/"),
      64           2 :         OUString());
      65           2 : }
      66             : 
      67           2 : CPPUNIT_TEST_SUITE_REGISTRATION(PsdFilterTest);
      68             : 
      69           8 : CPPUNIT_PLUGIN_IMPLEMENT();
      70             : 
      71             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10