Bump version to 5.0-14
[LibreOffice.git] / package / qa / cppunit / test_package.cxx
blob4dd34636c9f46d23d1f5a036f83a0b344ec8ebf0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #include <comphelper/processfactory.hxx>
11 #include <unotest/filters-test.hxx>
12 #include <unotest/bootstrapfixturebase.hxx>
13 #include "com/sun/star/packages/zip/ZipFileAccess.hpp"
15 using namespace ::com::sun::star;
17 namespace
19 class PackageTest
20 : public test::FiltersTest
21 , public test::BootstrapFixtureBase
23 public:
24 PackageTest() {}
26 virtual bool load(const OUString &,
27 const OUString &rURL, const OUString &,
28 SfxFilterFlags, SotClipboardFormatId, unsigned int) SAL_OVERRIDE;
30 void test();
32 CPPUNIT_TEST_SUITE(PackageTest);
33 CPPUNIT_TEST(test);
34 CPPUNIT_TEST_SUITE_END();
37 bool PackageTest::load(const OUString &,
38 const OUString &rURL, const OUString &,
39 SfxFilterFlags, SotClipboardFormatId, unsigned int)
41 try
43 uno::Reference<css::packages::zip::XZipFileAccess2> xZip(
44 css::packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), rURL));
45 return xZip.is();
47 catch(...)
49 return false;
53 void PackageTest::test()
55 testDir(OUString(),
56 getURLFromSrc("/package/qa/cppunit/data/"),
57 OUString());
60 CPPUNIT_TEST_SUITE_REGISTRATION(PackageTest);
63 CPPUNIT_PLUGIN_IMPLEMENT();
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */