diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-10-17 11:37:56 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-10-17 11:40:14 +0200 |
commit | 17523de685d0c4b06f9be02c02788583e9fd221e (patch) | |
tree | e51518f6749bbff7100d56694c259fc45e3dff03 | |
parent | cd1a12dc552e9d34c7481c83b07a6f6af0e8762b (diff) |
Skeleton of the unit test for updates.
-rw-r--r-- | extensions/CppunitTest_extensions_test_update.mk | 51 | ||||
-rw-r--r-- | extensions/Makefile | 39 | ||||
-rw-r--r-- | extensions/Module_extensions.mk | 32 | ||||
-rw-r--r-- | extensions/prj/build.lst | 2 | ||||
-rw-r--r-- | extensions/qa/update/test_update.cxx | 62 |
5 files changed, 185 insertions, 1 deletions
diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk new file mode 100644 index 000000000000..b5703c01cd5b --- /dev/null +++ b/extensions/CppunitTest_extensions_test_update.mk @@ -0,0 +1,51 @@ +# +# 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 or as specified alternatively below. 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. +# +# Major Contributor(s): +# Copyright (C) 2011 Jan Holesovsky <kendy@suse.cz> (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# 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. +# + +$(eval $(call gb_CppunitTest_CppunitTest,extensions_test_update)) + +$(eval $(call gb_CppunitTest_add_exception_objects,extensions_test_update, \ + extensions/qa/update/test_update \ +)) + +$(eval $(call gb_CppunitTest_add_linked_libs,extensions_test_update, \ + cppu \ + cppuhelper \ + sal \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_CppunitTest_set_include,extensions_test_update,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_CppunitTest_add_api,extensions_test_update,\ + offapi \ + udkapi \ +)) + +# vim:set shiftwidth=4 softtabstop=4 noexpandtab: diff --git a/extensions/Makefile b/extensions/Makefile new file mode 100644 index 000000000000..8d71119918b6 --- /dev/null +++ b/extensions/Makefile @@ -0,0 +1,39 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk new file mode 100644 index 000000000000..673274817a64 --- /dev/null +++ b/extensions/Module_extensions.mk @@ -0,0 +1,32 @@ +# 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 or as specified alternatively below. 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. +# +# Major Contributor(s): +# Copyright (C) 2011 Jan Holesovsky <kendy@suse.cz> (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# 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. + +$(eval $(call gb_Module_Module,extensions)) + +$(eval $(call gb_Module_add_check_targets,extensions,\ + CppunitTest_extensions_test_update \ +)) + +# vim:set shiftwidth=4 softtabstop=4 noexpandtab: diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index fd883a262398..45bea6a46e3f 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -1,4 +1,4 @@ -ex extensions : officecfg TRANSLATIONS:translations DESKTOP:rdbmaker svx SANE:sane TWAIN:twain np_sdk offapi stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL +ex extensions : officecfg TRANSLATIONS:translations DESKTOP:rdbmaker svx SANE:sane TWAIN:twain np_sdk offapi stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt CPPUNIT:cppunit NULL ex extensions usr1 - all ex_mkout NULL ex extensions\inc nmake - all ex_inc NULL diff --git a/extensions/qa/update/test_update.cxx b/extensions/qa/update/test_update.cxx new file mode 100644 index 000000000000..b1a02a00fc9b --- /dev/null +++ b/extensions/qa/update/test_update.cxx @@ -0,0 +1,62 @@ +/* + * 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 or as specified alternatively below. 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. + * + * Major Contributor(s): + * Copyright (C) 2011 Jan Holesovsky <kendy@suse.cz> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * 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 <sal/config.h> +#include <sal/precppunit.hxx> + +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/plugin/TestPlugIn.h> + +namespace testupdate { + +class test : public CppUnit::TestFixture +{ +public: + void setUp() {} + + void tearDown() {} + +protected: + // setup & test checkForUpdates() method + void testUpdateCheck() + { + //CPPUNIT_FAIL( "This has to be populated with the real test..." ); + } + + CPPUNIT_TEST_SUITE(test); + CPPUNIT_TEST(testUpdateCheck); + CPPUNIT_TEST_SUITE_END(); +}; + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testupdate::test, "update"); +} // namespace testupdate + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |