Branch data 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. You may obtain a copy of the License at
8 : : * 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 : : * The Initial Developer of the Original Code is
16 : : * Caolán McNamara <caolanm@redhat.com>
17 : : * Portions created by the Initial Developer are Copyright (C) 2012 the
18 : : * Initial Developer. All Rights Reserved.
19 : : *
20 : : * Contributor(s):
21 : : * Caolán McNamara <caolanm@redhat.com>
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 <svtools/FilterConfigItem.hxx>
33 : : #include <tools/stream.hxx>
34 : : #include <vcl/graph.hxx>
35 : :
36 : : #include <osl/file.hxx>
37 : : #include <osl/process.h>
38 : :
39 : : extern "C"
40 : : {
41 : : SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
42 : : GraphicImport(SvStream & rStream, Graphic & rGraphic,
43 : : FilterConfigItem*, sal_Bool);
44 : : }
45 : :
46 : : using namespace ::com::sun::star;
47 : :
48 : : /* Implementation of Filters test */
49 : :
50 [ + - ][ - + ]: 6 : class TiffFilterTest
51 : : : public test::FiltersTest
52 : : , public test::BootstrapFixture
53 : : {
54 : : public:
55 [ + - ]: 3 : TiffFilterTest() : BootstrapFixture(true, false) {}
56 : :
57 : : virtual bool load(const rtl::OUString &, const rtl::OUString &rURL, const rtl::OUString &);
58 : :
59 : : /**
60 : : * Ensure CVEs remain unbroken
61 : : */
62 : : void testCVEs();
63 : :
64 [ + - ][ + - ]: 6 : CPPUNIT_TEST_SUITE(TiffFilterTest);
[ + - ][ + - ]
[ # # ]
65 [ + - ][ + - ]: 3 : CPPUNIT_TEST(testCVEs);
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ]
66 [ + - ][ + - ]: 6 : CPPUNIT_TEST_SUITE_END();
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
67 : : };
68 : :
69 : 30 : bool TiffFilterTest::load(const rtl::OUString &,
70 : : const rtl::OUString &rURL, const rtl::OUString &)
71 : : {
72 [ + - ][ + - ]: 30 : SvFileStream aFileStream(rURL, STREAM_READ);
[ + - ]
73 [ + - ]: 30 : Graphic aGraphic;
74 [ + - ][ + - ]: 30 : return GraphicImport(aFileStream, aGraphic, NULL, 0);
[ + - ]
75 : : }
76 : :
77 : 3 : void TiffFilterTest::testCVEs()
78 : : {
79 : : testDir(rtl::OUString(),
80 : : getURLFromSrc("/filter/qa/cppunit/data/tiff/"),
81 [ + - ][ + - ]: 3 : rtl::OUString());
82 : 3 : }
83 : :
84 : 3 : CPPUNIT_TEST_SUITE_REGISTRATION(TiffFilterTest);
85 : :
86 [ + - ][ + - ]: 12 : CPPUNIT_PLUGIN_IMPLEMENT();
[ + - ][ + - ]
[ + - ][ # # ]
87 : :
88 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|