From 678e35c4ac17219556ce0426043bd4ad905d5cee Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 14 Mar 2013 12:08:28 +0000 Subject: xmloff: native code unit testing harness. Change-Id: I5b9133deea2aa7630752128128f1a222bef99eb1 --- xmloff/qa/unit/uxmloff.cxx | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 xmloff/qa/unit/uxmloff.cxx (limited to 'xmloff/qa/unit') 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 +#include + +#include +#include "SchXMLExport.hxx" +#include +#include + +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: */ -- cgit