diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-14 12:08:28 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-14 13:26:42 +0000 |
commit | 678e35c4ac17219556ce0426043bd4ad905d5cee (patch) | |
tree | 6bfa1687229746e6a2f30f0421a0e10542bfeedc /xmloff/qa/unit | |
parent | 533be98148ff40f6205e2ac3b489748cae14ef0d (diff) |
xmloff: native code unit testing harness.
Change-Id: I5b9133deea2aa7630752128128f1a222bef99eb1
Diffstat (limited to 'xmloff/qa/unit')
-rw-r--r-- | xmloff/qa/unit/uxmloff.cxx | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx new file mode 100644 index 000000000000..7e04437c3a3b --- /dev/null +++ b/xmloff/qa/unit/uxmloff.cxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <sal/config.h> +#include <test/bootstrapfixture.hxx> + +#include <xmloff/xmlexp.hxx> +#include "SchXMLExport.hxx" +#include <comphelper/processfactory.hxx> +#include <com/sun/star/util/MeasureUnit.hpp> + +using namespace ::com::sun::star; + +namespace { + +class Test : public test::BootstrapFixture { +public: + Test(); + + virtual void setUp(); + virtual void tearDown(); + + void testSomething(); + + CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST(testSomething); + CPPUNIT_TEST_SUITE_END(); +private: + SvXMLExport *pExport; +}; + + +Test::Test() + : pExport( NULL ) +{ +} + +void Test::setUp() +{ + BootstrapFixture::setUp(); + + pExport = new SchXMLExport(/* util::MeasureUnit::CM, */ + comphelper::getProcessComponentContext()); +} + +void Test::tearDown() +{ + delete pExport; + BootstrapFixture::tearDown(); +} + +void Test::testSomething() +{ + OUString s1("A"); + OUString s2("B"); + CPPUNIT_ASSERT_MESSAGE("these strings are supposed to be different!", s1 != s2); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Test); + +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |