summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-14 23:46:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-15 09:21:48 +0100
commita04d91ea3b11a37b8717999aeeb72239077b4619 (patch)
tree6c2167b59fa80f9d569f1acc3fbea57f7e9a26eb /comphelper
parent80ebe51e60cf67b36946764816b53a5d962bafdb (diff)
restore cppunit test (yet again)
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/CppunitTest_comphelper_test.mk56
-rw-r--r--comphelper/Module_comphelper.mk4
-rw-r--r--comphelper/qa/string/test_string.cxx14
-rw-r--r--comphelper/qa/string/test_string_noadditional.cxx33
4 files changed, 65 insertions, 42 deletions
diff --git a/comphelper/CppunitTest_comphelper_test.mk b/comphelper/CppunitTest_comphelper_test.mk
new file mode 100644
index 000000000000..92c32fe11997
--- /dev/null
+++ b/comphelper/CppunitTest_comphelper_test.mk
@@ -0,0 +1,56 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+# 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.
+#
+# The Initial Developer of the Original Code is
+# Caolán McNamara, Red Hat, Inc. <caolanm@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# 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,comphelper_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,comphelper_test, \
+ comphelper/qa/string/test_string \
+))
+
+$(eval $(call gb_CppunitTest_add_api,comphelper_test, \
+ udkapi \
+ offapi \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,comphelper_test, \
+ comphelper \
+ cppuhelper \
+ cppu \
+ sal \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,comphelper_test,\
+ -I$(realpath $(SRCDIR)/comphelper/inc/pch) \
+ -I$(realpath $(SRCDIR)/comphelper/inc) \
+ $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/Module_comphelper.mk b/comphelper/Module_comphelper.mk
index e1220edb9e77..08e3f17c92e4 100644
--- a/comphelper/Module_comphelper.mk
+++ b/comphelper/Module_comphelper.mk
@@ -37,4 +37,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\
JunitTest_comphelper_complex \
))
+$(eval $(call gb_Module_add_check_targets,comphelper,\
+ CppunitTest_comphelper_test \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index c448ebb9fb45..eefe7a96f2c4 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -27,20 +27,14 @@
************************************************************************/
#include "precompiled_comphelper.hxx"
-#include "sal/config.h"
+#include "sal/cppunit.h"
-#include "comphelper/string.hxx"
+#include <comphelper/string.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/i18n/CharType.hpp>
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
-
-#include "rtl/string.h"
-#include "rtl/ustring.h"
+#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
-#include "sal/types.h"
namespace {
@@ -298,4 +292,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(TestString);
}
+CPPUNIT_PLUGIN_IMPLEMENT();
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/qa/string/test_string_noadditional.cxx b/comphelper/qa/string/test_string_noadditional.cxx
deleted file mode 100644
index 9f3bfe5061ab..000000000000
--- a/comphelper/qa/string/test_string_noadditional.cxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#include <cppunit/plugin/TestPlugIn.h>
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */