diff options
author | Radu Ioan <ioan.radu.g@gmail.com> | 2012-08-17 11:18:41 +0300 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-25 01:19:37 +0000 |
commit | ffc05d9abfccac4d1dc04460fc25a9b16764a83e (patch) | |
tree | df47bed80efb522394e60bb98749b764ec82faab /sal | |
parent | 9d6eedf05b550ca3d6f98dc9f77c06a3594165c4 (diff) |
fdo#39625 Make existing cppunittests work
Make rtl uuid cppunit work
- removed call to simpleheader.hxx
- added call in Module_sal.mk for rtl_uuid
- created mk for cppunittest for sal_rtl_uuid
Second patch:
- removed makefile.mk as Stephan suggested
- modified CppunitTest_sal_rtl_uuid.mk header
Change-Id: If090843203e38d3eced14941b58e6122d27bdb09
Reviewed-on: https://gerrit.libreoffice.org/422
Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/CppunitTest_sal_rtl_uuid.mk | 27 | ||||
-rw-r--r-- | sal/Module_sal.mk | 1 | ||||
-rw-r--r-- | sal/qa/rtl/uuid/makefile.mk | 68 | ||||
-rw-r--r-- | sal/qa/rtl/uuid/rtl_Uuid.cxx | 13 |
4 files changed, 37 insertions, 72 deletions
diff --git a/sal/CppunitTest_sal_rtl_uuid.mk b/sal/CppunitTest_sal_rtl_uuid.mk new file mode 100644 index 000000000000..9a92af246696 --- /dev/null +++ b/sal/CppunitTest_sal_rtl_uuid.mk @@ -0,0 +1,27 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. +# +# Major Contributor(s): +# Copyright (C) 2012 Radu Ioan <ioan.radu.g@gmail.com> (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. + +$(eval $(call gb_CppunitTest_CppunitTest,sal_rtl_uuid)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sal_rtl_uuid,\ + sal/qa/rtl/uuid/rtl_Uuid \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sal_rtl_uuid,\ + sal \ + $(gb_STDLIBS) \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk index 7bce17b45485..ec6545dfd30e 100644 --- a/sal/Module_sal.mk +++ b/sal/Module_sal.mk @@ -70,6 +70,7 @@ $(eval $(call gb_Module_add_check_targets,sal,\ CppunitTest_sal_rtl_ostringbuffer \ CppunitTest_sal_rtl_oustringbuffer \ CppunitTest_sal_rtl_strings \ + CppunitTest_sal_rtl_uuid \ CppunitTest_sal_tcwf \ CppunitTest_sal_types \ )) diff --git a/sal/qa/rtl/uuid/makefile.mk b/sal/qa/rtl/uuid/makefile.mk deleted file mode 100644 index e6ce02dbf414..000000000000 --- a/sal/qa/rtl/uuid/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/.. -INCPRE+= $(PRJ)$/qa$/inc - -PRJNAME=sal -TARGET=rtl_uuid - -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGS+= $(LFS_CFLAGS) -CXXFLAGS+= $(LFS_CFLAGS) - -CFLAGSCXX += $(CPPUNIT_CFLAGS) - -# BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl -SHL1OBJS= \ - $(SLO)$/rtl_Uuid.obj - -SHL1TARGET= rtl_Uuid -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) - -SHL1IMPLIB= i$(SHL1TARGET) -# SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME =$(SHL1TARGET) -# DEF1EXPORTFILE= export.exp -SHL1USE_EXPORTS= name -# END ------------------------------------------------------------------ -#------------------------------- All object files ------------------------------- -# do this here, so we get right dependencies -SLOFILES=$(SHL1OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/qa$/cppunit_local.mk diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index 85d10957ece4..363cd7203166 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -29,17 +29,22 @@ #include <math.h> #include <stdio.h> +#include <string.h> -#include <testshl/simpleheader.hxx> #include <rtl/uuid.h> #include <rtl/ustring.h> #include <rtl/ustring.hxx> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/plugin/TestPlugIn.h> #ifdef UNX #include <unistd.h> #include <time.h> #endif +#define t_print printf + using ::rtl::OUString; using ::rtl::OUStringToOString; using ::rtl::OString; @@ -215,15 +220,15 @@ public: CPPUNIT_TEST_SUITE_END(); }; // class createNamedUuid -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_Uuid::createUuid, "rtl_Uuid"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_Uuid::createNamedUuid, "rtl_Uuid"); +CPPUNIT_TEST_SUITE_REGISTRATION(rtl_Uuid::createUuid); +CPPUNIT_TEST_SUITE_REGISTRATION(rtl_Uuid::createNamedUuid); } // namespace rtl_Uuid // ----------------------------------------------------------------------------- // this macro creates an empty function, which will called by the RegisterAllFunctions() // to let the user the possibility to also register some functions by hand. -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |