summaryrefslogtreecommitdiff
path: root/test/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-12 15:19:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-15 12:18:44 +0100
commitdb5a5ffa82f835c81cf9a411d24f4cb0b1bb8fa5 (patch)
tree0e320d48ea2ce24a87f33095d2959919333c0b5c /test/inc
parent528a225ddb1d429eeb048626d5e9e045118bad2e (diff)
split bootstrapfixture and move test-filters class for sot test
sot is below vcl, but is a filters test, we can split bootstrapfixture into a vcl needing bit and and non-vcl bit and filters test api can be standalone and combined with whichever bit in order to form pre and post vcl filters test
Diffstat (limited to 'test/inc')
-rw-r--r--test/inc/test/bootstrapfixture.hxx22
-rw-r--r--test/inc/test/filters-test.hxx80
2 files changed, 2 insertions, 100 deletions
diff --git a/test/inc/test/bootstrapfixture.hxx b/test/inc/test/bootstrapfixture.hxx
index 3c7a91f4180e..3b9a40f515d0 100644
--- a/test/inc/test/bootstrapfixture.hxx
+++ b/test/inc/test/bootstrapfixture.hxx
@@ -40,6 +40,7 @@
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include "unotest/bootstrapfixturebase.hxx"
#include "test/testdllapi.hxx"
namespace test {
@@ -51,34 +52,15 @@ namespace test {
// NB. this class is instantiated multiple times during a
// run of unit tests ...
-class OOO_DLLPUBLIC_TEST BootstrapFixture : public CppUnit::TestFixture
+class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase
{
bool m_bNeedUCB;
bool m_bAssertOnDialog;
- ::rtl::OUString m_aSrcRootURL;
- ::rtl::OUString m_aSrcRootPath;
-
-protected:
-
- com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> m_xContext;
- com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> m_xSFactory;
- com::sun::star::uno::Reference<com::sun::star::lang::XMultiComponentFactory> m_xFactory;
public:
BootstrapFixture( bool bAssertOnDialog = true, bool bNeedUCB = true );
virtual ~BootstrapFixture();
- com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
- getComponentContext() { return m_xContext; }
- com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
- getMultiServiceFactory() { return m_xSFactory; }
-
- ::rtl::OUString getSrcRootURL() { return m_aSrcRootURL; }
- ::rtl::OUString getSrcRootPath() { return m_aSrcRootPath; }
-
- // return a URL to a given c-str path from the source directory
- ::rtl::OUString getURLFromSrc( const char *pPath );
-
virtual void setUp();
virtual void tearDown();
};
diff --git a/test/inc/test/filters-test.hxx b/test/inc/test/filters-test.hxx
deleted file mode 100644
index 0cc77c09f4f4..000000000000
--- a/test/inc/test/filters-test.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Caolán McNamara <caolanm@redhat.com>
- * Portions created by the Initial Developer are Copyright (C) 2011 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Caolán McNamara <caolanm@redhat.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#include <rtl/ustring.hxx>
-#include <test/bootstrapfixture.hxx>
-#include "test/testdllapi.hxx"
-
-namespace test {
-
-enum filterStatus
-{
- fail = 0,
- pass = 1,
- indeterminate = 2
-};
-
-/*
- * NOTE, any files beginning with CVE- will be assumed to be encrypted using
- * arcfour with key 0x435645, this is to silence panicky virus/malware-checkers
- *
- * e.g. m[de]crypt --bare -a arcfour -o hex -k 435645 -s 3
- */
-/* Implementation of Filters test */
-class OOO_DLLPUBLIC_TEST FiltersTest : public test::BootstrapFixture
-{
-public:
- FiltersTest(bool bAssertOnDialog = true, bool bNeedUCB = true)
- : BootstrapFixture(bAssertOnDialog, bNeedUCB)
- {}
-
- void testDir(
- //filter name
- const rtl::OUString &rFilter,
- //root dir of test files, must contain pass, fail, indeterminate
- const rtl::OUString &rURL,
- //additional filter data for SfxFilter
- const rtl::OUString &rUserData);
-
- virtual bool load(
- const rtl::OUString &rFilter,
- const rtl::OUString &rURL,
- const rtl::OUString &rUserData) = 0;
-
-protected:
- void recursiveScan(
- const rtl::OUString &rFilter,
- const rtl::OUString &rURL,
- const rtl::OUString &rUserData,
- filterStatus nExpected);
-};
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */