LCOV - code coverage report
Current view: top level - lotuswordpro/qa/cppunit - test_lotuswordpro.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 21 21 100.0 %
Date: 2014-11-03 Functions: 12 13 92.3 %
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 <com/sun/star/document/XFilter.hpp>
      13             : 
      14             : #include <osl/file.hxx>
      15             : #include <osl/process.h>
      16             : 
      17             : using namespace ::com::sun::star;
      18             : 
      19             : namespace
      20             : {
      21           4 :     class LotusWordProTest
      22             :         : public test::FiltersTest
      23             :         , public test::BootstrapFixture
      24             :     {
      25             :     public:
      26           2 :         LotusWordProTest() : BootstrapFixture(true, false) {}
      27             : 
      28             :         virtual void setUp() SAL_OVERRIDE;
      29             : 
      30             :         virtual bool load(const OUString &,
      31             :             const OUString &rURL, const OUString &,
      32             :             unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
      33             : 
      34             :         void test();
      35             : 
      36           4 :         CPPUNIT_TEST_SUITE(LotusWordProTest);
      37           2 :         CPPUNIT_TEST(test);
      38           4 :         CPPUNIT_TEST_SUITE_END();
      39             :     private:
      40             :         uno::Reference<document::XFilter> m_xFilter;
      41             :     };
      42             : 
      43           2 :     void LotusWordProTest::setUp()
      44             :     {
      45           2 :         test::BootstrapFixture::setUp();
      46             : 
      47           6 :         m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
      48           2 :             "com.sun.star.comp.Writer.LotusWordProImportFilter"),
      49           2 :             uno::UNO_QUERY_THROW);
      50           2 :     }
      51             : 
      52          12 :     bool LotusWordProTest::load(const OUString &,
      53             :         const OUString &rURL, const OUString &,
      54             :         unsigned int, unsigned int, unsigned int)
      55             :     {
      56          12 :         uno::Sequence< beans::PropertyValue > aDescriptor(1);
      57          12 :         aDescriptor[0].Name = "URL";
      58          12 :         aDescriptor[0].Value <<= rURL;
      59          12 :         return m_xFilter->filter(aDescriptor);
      60             :     }
      61             : 
      62           2 :     void LotusWordProTest::test()
      63             :     {
      64             :         testDir(OUString(),
      65             :             getURLFromSrc("/lotuswordpro/qa/cppunit/data/"),
      66           2 :             OUString());
      67           2 :     }
      68             : 
      69           2 :     CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
      70             : }
      71             : 
      72           8 : CPPUNIT_PLUGIN_IMPLEMENT();
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10