LCOV - code coverage report
Current view: top level - libreoffice/lotuswordpro/qa/cppunit - test_lotuswordpro.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 21 21 100.0 %
Date: 2012-12-27 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             :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       4             :  *
       5             :  * The contents of this file are subject to the Mozilla Public License Version
       6             :  * 1.1 (the "License"); you may not use this file except in compliance with
       7             :  * the License or as specified alternatively below. You may obtain a copy of
       8             :  * the License at http://www.mozilla.org/MPL/
       9             :  *
      10             :  * Software distributed under the License is distributed on an "AS IS" basis,
      11             :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12             :  * for the specific language governing rights and limitations under the
      13             :  * License.
      14             :  *
      15             :  * Major Contributor(s):
      16             :  * Copyright (C) 2011 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
      17             :  *  (initial developer)
      18             :  *
      19             :  * All Rights Reserved.
      20             :  *
      21             :  * For minor contributions see the git repository.
      22             :  *
      23             :  * Alternatively, the contents of this file may be used under the terms of
      24             :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      25             :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      26             :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      27             :  * instead of those above.
      28             :  */
      29             : 
      30             : #include <unotest/filters-test.hxx>
      31             : #include <test/bootstrapfixture.hxx>
      32             : #include <com/sun/star/document/XFilter.hpp>
      33             : 
      34             : #include <osl/file.hxx>
      35             : #include <osl/process.h>
      36             : 
      37             : using namespace ::com::sun::star;
      38             : 
      39             : namespace
      40             : {
      41           2 :     class LotusWordProTest
      42             :         : public test::FiltersTest
      43             :         , public test::BootstrapFixture
      44             :     {
      45             :     public:
      46           1 :         LotusWordProTest() : BootstrapFixture(true, false) {}
      47             : 
      48             :         virtual void setUp();
      49             : 
      50             :         virtual bool load(const rtl::OUString &,
      51             :             const rtl::OUString &rURL, const rtl::OUString &,
      52             :             unsigned int, unsigned int, unsigned int);
      53             : 
      54             :         void test();
      55             : 
      56           2 :         CPPUNIT_TEST_SUITE(LotusWordProTest);
      57           1 :         CPPUNIT_TEST(test);
      58           2 :         CPPUNIT_TEST_SUITE_END();
      59             :     private:
      60             :         uno::Reference<document::XFilter> m_xFilter;
      61             :     };
      62             : 
      63           1 :     void LotusWordProTest::setUp()
      64             :     {
      65           1 :         test::BootstrapFixture::setUp();
      66             : 
      67           1 :         m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
      68           1 :             "com.sun.star.comp.Writer.LotusWordProImportFilter"),
      69           1 :             uno::UNO_QUERY_THROW);
      70           1 :     }
      71             : 
      72           6 :     bool LotusWordProTest::load(const rtl::OUString &,
      73             :         const rtl::OUString &rURL, const rtl::OUString &,
      74             :         unsigned int, unsigned int, unsigned int)
      75             :     {
      76           6 :         uno::Sequence< beans::PropertyValue > aDescriptor(1);
      77           6 :         aDescriptor[0].Name = "URL";
      78           6 :         aDescriptor[0].Value <<= rURL;
      79           6 :         return m_xFilter->filter(aDescriptor);
      80             :     }
      81             : 
      82           1 :     void LotusWordProTest::test()
      83             :     {
      84             :         testDir(rtl::OUString(),
      85             :             getURLFromSrc("/lotuswordpro/qa/cppunit/data/"),
      86           1 :             rtl::OUString());
      87           1 :     }
      88             : 
      89           1 :     CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
      90             : }
      91             : 
      92           4 : CPPUNIT_PLUGIN_IMPLEMENT();
      93             : 
      94             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10