diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-05 13:16:36 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-12 15:35:33 +0000 |
commit | 8887de72c184bec6225a952ec90433ae1b7a5b26 (patch) | |
tree | f3d90d221b5eba49aa14ff713c7d11216935b233 /smoketest/libtest.cxx | |
parent | 6ea685090806a2a2f39b8d5ec6a749eaf9b1856e (diff) |
liblibo: create initial liblibreoffice.
bootstrap libreoffice, start a dummy test-harness: can't use CppUnit
or link to any URE / LibreOffice libraries.
Change-Id: I855b640557f93959749e966a2d8e5e577fd84574
Diffstat (limited to 'smoketest/libtest.cxx')
-rw-r--r-- | smoketest/libtest.cxx | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx new file mode 100644 index 000000000000..39ab01bb2cf6 --- /dev/null +++ b/smoketest/libtest.cxx @@ -0,0 +1,54 @@ +/* -*- 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/. + */ + +// yuck / FIXME ... +#include "../desktop/inc/liblibreoffice.h" + +#include <sal/types.h> +#include <rtl/ustring.hxx> +#include <rtl/bootstrap.hxx> +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" + +class Test: public CppUnit::TestFixture { +public: + virtual void setUp(); + virtual void tearDown(); + +private: + CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); + + void test(); +}; + +void Test::setUp() +{ +} +void Test::tearDown() +{ +} + +void Test::test() +{ + rtl::OUString aArgSoffice; + rtl::Bootstrap::get( rtl::OUString( "arg-soffice" ), aArgSoffice ); + OString aInstall = OUStringToOString( aArgSoffice, RTL_TEXTENCODING_UTF8 ); + fprintf( stderr, "liblibreoffice test: '%s'\n", aInstall.getStr() ); + lo_initialize( aInstall.getStr() ); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Test); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |