mockpp-commits Mailing List for Mock Objects for C++ (Page 16)
Brought to you by:
ewald-arnold
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(17) |
Mar
(178) |
Apr
(119) |
May
(60) |
Jun
(3) |
Jul
(60) |
Aug
(16) |
Sep
(55) |
Oct
(156) |
Nov
(136) |
Dec
(255) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(98) |
Feb
(8) |
Mar
(57) |
Apr
(43) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ewald A. <ewa...@us...> - 2005-12-10 18:45:16
|
Update of /cvsroot/mockpp/mockpp/msvc6/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/msvc6/lib Removed Files: .cvsignore Makefile.am Log Message: cleanup old stuff --- .cvsignore DELETED --- --- Makefile.am DELETED --- |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 18:45:16
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/msvc6/mockpp/examples Removed Files: .cvsignore Makefile.am examples.dsp Log Message: cleanup old stuff --- .cvsignore DELETED --- --- Makefile.am DELETED --- --- examples.dsp DELETED --- |
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/msvc6/mockpp/examples/tutorial Removed Files: .cvsignore Makefile.am basicmock.dsp chainmock.dsp cppunit.dsp poormock.dsp poormock_se.dsp visitmock.dsp Log Message: cleanup old stuff --- .cvsignore DELETED --- --- poormock_se.dsp DELETED --- --- cppunit.dsp DELETED --- --- poormock.dsp DELETED --- --- Makefile.am DELETED --- --- basicmock.dsp DELETED --- --- visitmock.dsp DELETED --- --- chainmock.dsp DELETED --- |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 18:45:16
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/msvc6/mockpp/tests Removed Files: .cvsignore Makefile.am jmock_test.dsp mock_failing_test.dsp mock_test.dsp mock_test.dsw Log Message: cleanup old stuff --- mock_test.dsw DELETED --- --- .cvsignore DELETED --- --- mock_test.dsp DELETED --- --- jmock_test.dsp DELETED --- --- mock_failing_test.dsp DELETED --- --- Makefile.am DELETED --- |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 18:45:03
|
Update of /cvsroot/mockpp/mockpp/msvc7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23742/msvc7 Removed Files: .cvsignore Makefile.am README Log Message: cleanup old stuff --- README DELETED --- --- .cvsignore DELETED --- --- Makefile.am DELETED --- |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:20:12
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13448/3party/cxxtest Modified Files: .cvsignore Log Message: update Index: .cvsignore =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 9 Dec 2005 16:19:17 -0000 1.1 +++ .cvsignore 10 Dec 2005 15:20:05 -0000 1.2 @@ -1,2 +1,2 @@ -samples +sample Makefile.in |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:19:18
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13262 Modified Files: run-configure-unicode.sh Log Message: update Index: run-configure-unicode.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/run-configure-unicode.sh,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- run-configure-unicode.sh 9 Dec 2005 20:40:42 -0000 1.11 +++ run-configure-unicode.sh 10 Dec 2005 15:19:08 -0000 1.12 @@ -1,5 +1,5 @@ #!/bin/sh -MYFLAGS="-O0 -g3 -Wall -Werror" +MYFLAGS="-O0 -g3 -Wall -Werror -pedantic" if which "gcc-4.0"; then MYCC="ccache g++-4.0"; @@ -12,5 +12,5 @@ #OPTS="--enable-doxygen --enable-docbook" OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti #OPTS="$OPTS --enable-debug=full" - +#OPTS="$OPTS --enable-builtin-cxxtest" CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure --enable-unicode $OPTS --prefix=/tmp/mockpp-install |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:19:01
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13221 Modified Files: configure.in Log Message: enable cxxtest Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- configure.in 9 Dec 2005 20:40:42 -0000 1.102 +++ configure.in 10 Dec 2005 15:18:52 -0000 1.103 @@ -91,10 +91,12 @@ if test x$cppunit_inc != xNO; then echo "found cppunit/TestCase.h at $cppunit_inc" EA_EXTRA_INC="$EA_EXTRA_INC -I$cppunit_inc" + AC_DEFINE(HAVE_CPPUNIT, 1, [Define if you have CppUnit installed.]) else echo "*******************************************************" - echo "*** cppunit/TestCase.h not found, continue anyway." + echo "*** cppunit/TestCase.h not found." echo "*******************************************************" + AH_TEMPLATE(HAVE_CPPUNIT, [Define if you have CppUnit installed.]) fi fi @@ -106,47 +108,10 @@ EA_EXTRA_LIB="$EA_EXTRA_LIB -L$cppunit_lib" else echo "*******************************************************" - echo "*** *cppunit.{la,so,a,dll}* not found, continue anyway." - echo "*******************************************************" -fi - -AC_MSG_CHECKING([for CppUnit compilable system]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS - -cat > conftest.$ac_ext <<EOF -#include <cppunit/extensions/TestFactoryRegistry.h> -#include <cppunit/CompilerOutputter.h> -#include <cppunit/ui/text/TestRunner.h> - -int main() -{ - CppUnit::TextUi::TestRunner runner; - runner.run(); -} -EOF - -ac_compile_link='${CXX} $CXXFLAGS $CPPFLAGS $all_includes conftest.$ac_ext -L$cppunit_lib $LIBDL -I $cppunit_inc $LIBCPPUNIT $all_libraries $LIBS' -if AC_TRY_EVAL(ac_compile_link); then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CPPUNIT, 1, [Define if you have CppUnit installed.]) -else - AH_TEMPLATE(HAVE_CPPUNIT, [Define if you have CppUnit installed.]) - echo + echo "*** *cppunit.{la,so,a,dll}* not found." echo "*******************************************************" - echo "*** Your system is not able to compile a small CppUnit application!" - echo "*** Check, if you installed the CppUnit files correctly," - echo "*** probably *cppunit.{so,a,dll}* is missing." - echo "*** For more details about this problem, look at the end of config.log." - echo "*** " - echo "*** Since CppUnit is missing, the unit tests won't be compiled." - echo "*** " - echo "*** If you have CPPUNIT installed though configure did not find" - echo "*** try setting HAVE_CPPUNIT in config.h" - echo "********************************************************" fi -AC_LANG_RESTORE AC_SUBST(LIBCPPUNIT) ]) @@ -301,6 +266,30 @@ AM_CONDITIONAL(BUILTIN_MINISTL, test x$enable_builtin_stl = xyes) dnl ------------------------------------------------------------------------ + +AC_DEFUN([EA_BUILTIN_CXXTEST], +[ +AC_ARG_ENABLE(builtin_cxxtest, [ --enable-builtin-cxxtest use built-in cxxtest (no)]) + +if test x$enable_builtin_cxxtest = xyes; then + echo "*******************************************************" + echo "** using builtin cxxtest" + echo "*******************************************************" + AC_DEFINE(MOCKPP_USE_BUILTIN_CXXTEST, 1, [Define to use built-in cxxtest.]) + EA_EXTRA_INC="$EA_EXTRA_INC -I\$(top_srcdir)/3party/cxxtest" +# EA_EXTRA_LIB="$EA_EXTRA_LIB -lmockpp_cxxtest" + AC_DEFINE(HAVE_CXXTEST, 1, [Define if you have CxxTest installed.]) +else + echo "*******************************************************" + echo "** NOT using builtin cxxtest" + echo "*******************************************************" + AH_TEMPLATE(HAVE_CXXTEST, [Define if you have CxxTest installed.]) + AH_TEMPLATE([MOCKPP_USE_BUILTIN_CXXTEST], [Define to use built-in cxxtest.]) +fi +]) +AM_CONDITIONAL(BUILTIN_CXXTEST, test x$enable_builtin_cxxtest = xyes) + +dnl ------------------------------------------------------------------------ dnl Find a file (or one of more files in a list of dirs) dnl params: filename path result(NO = none) dnl ------------------------------------------------------------------------ @@ -364,14 +353,14 @@ #include <cwchar> int main() { - std::wcscmp(0, 0); + return (int) std::wcscmp(0, 0); } EOF ac_compile_link='${CXX} $CXXFLAGS $all_includes $all_libraries $CPPFLAGS conftest.$ac_ext' if AC_TRY_EVAL(ac_compile_link); then AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_WCSCMP, 1, [Define if you have the std::wcscmp function.]) + AC_DEFINE(HAVE_STD_WCSCMP, 1, [Define if you have the std::wcscmp function.]) else AC_MSG_RESULT(no) fi @@ -387,15 +376,16 @@ EA_DISABLE_EXCEPTIONS EA_DISABLE_RTTI EA_BUILTIN_STL +EA_BUILTIN_CXXTEST EA_ENABLE_DOCBOOK EA_CHECK_LIBDL EA_ENABLE_DOXYGEN -EA_CHECK_LIBCPPUNIT EA_ENABLE_UNICODE EA_CHECK_MSGFMT EA_CHECK_WSTRING EA_CHECK_WCSCMP EA_CHECK_STD_WCSCMP +EA_CHECK_LIBCPPUNIT # ---------------------------------------------------------------------------- |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:18:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13151/mockpp/tests Modified Files: And_test.cpp Exception_test.cpp Makefile.am mock_test.cpp SelectFramework.h Log Message: first tests with cxxtest Index: SelectFramework.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/SelectFramework.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SelectFramework.h 9 Dec 2005 18:56:20 -0000 1.2 +++ SelectFramework.h 10 Dec 2005 15:18:34 -0000 1.3 @@ -1,49 +1 @@ -/*************************************************************************** - SelectFramework.h - setup for unittest framework in use - ------------------- - begin : Fri Dec 9 2005 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - $Id$ - - ***************************************************************************/ - -/************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of the License, - * or (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - ***************************************************************************/ - -#ifndef MOCKPP_SELECTFRAMEWORK_H -#define MOCKPP_SELECTFRAMEWORK_H - -#if defined(HAVE_CXXTEST) - -# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/ - -#elif defined(HAVE_CPPUNIT) - -# include <cppunit/extensions/HelperMacros.h> -# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CppUnit::TestFixture - -#else - -# pragma message ("No unittest framework available at compile time") -# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/ - -#endif // frameworks - -#endif // MOCKPP_SELECTFRAMEWORK_H +#include <mockpp/SelectUnittestFramework.h> Index: And_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/And_test.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- And_test.cpp 9 Dec 2005 18:56:20 -0000 1.13 +++ And_test.cpp 10 Dec 2005 15:18:34 -0000 1.14 @@ -37,7 +37,6 @@ #include <mockpp/constraint/IsNothing.h> - class And_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: @@ -64,6 +63,10 @@ #if defined (HAVE_CXXTEST) +MOCKPP_CXXTEST_SUITE_REGISTRATION( And_test ); +MOCKPP_CXXTEST( And_test , test_invoke); +MOCKPP_CXXTEST( And_test , test_describe); + #elif defined(HAVE_CPPUNIT) CPPUNIT_TEST_SUITE_REGISTRATION (And_test); Index: mock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mock_test.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- mock_test.cpp 9 Dec 2005 18:56:20 -0000 1.25 +++ mock_test.cpp 10 Dec 2005 15:18:34 -0000 1.26 @@ -36,7 +36,22 @@ #include <iostream> #include <ctime> -#ifdef HAVE_CPPUNIT +#include "SelectFramework.h" + +#if defined(HAVE_CXXTEST) + +#include <cxxtest/TestRunner.h> + +#ifdef GUI +#include <cxxtest/StdioPrinter.h> +//#include <cxxtest/QtGui.h> +//#include <cxxtest/X11Gui.h> +//#include <cxxtest/Win32Gui.h> +#else +#include <cxxtest/ErrorPrinter.h> +#endif + +#elif defined(HAVE_CPPUNIT) # include <cppunit/extensions/TestFactoryRegistry.h> # include <cppunit/ui/text/TestRunner.h> @@ -46,6 +61,7 @@ # include <cppunit/TestFailure.h> # include <cppunit/CompilerOutputter.h> +#endif #ifndef _MSC_VER using std::time; @@ -53,6 +69,19 @@ #endif +#if defined(HAVE_CXXTEST) + +int run_cxxtest(int argc, char **argv) +{ +#ifdef GUI + return CxxTest::GuiTuiRunner<CxxTest::QtGui, CxxTest::StdioPrinter>( argc, argv ).run(); +#else + return CxxTest::ErrorPrinter().run(); +#endif +} + +#elif defined(HAVE_CPPUNIT) + class MyListener : public CppUnit::TextTestProgressListener { time_t starttime; @@ -94,17 +123,37 @@ } }; -#endif - -int main(int argc, char **argv) +int run_cppunit(int argc, char **argv) { int ret = 1; -#ifdef HAVE_CPPUNIT CppUnit::TextUi::TestRunner runner; CppUnit::TestFactory ®istry = CppUnit::TestFactoryRegistry::getRegistry(); runner.addTest(registry.makeTest()); + + MyListener *listener = 0; + for (int i1 = 1; i1 < argc; ++i1) + if (strcmp (argv[1], "--show-name") == 0) + runner.eventManager().addListener(listener = new MyListener()); + +#ifndef __BORLANDC__ // @todo + for (int i2 = 1; i2 < argc; ++i2) + if (strcmp (argv[i2], "--compiler-output") == 0) + runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(&runner.result(), std::cerr ) ); +#endif + + ret = runner.run() ? 0 : 1; + delete listener; + return ret; +} + +#endif + + +int main(int argc, char **argv) +{ + int ret = 1; std::cout << "starting tests..\n"; #ifdef MOCKPP_PTI_WEAKNESS @@ -120,25 +169,16 @@ std::cout << " --compiler-output output similar to compilers\n"; std::cout << "\n"; - MyListener *listener = 0; - for (int i1 = 1; i1 < argc; ++i1) - if (strcmp (argv[1], "--show-name") == 0) - runner.eventManager().addListener(listener = new MyListener()); +#if defined(HAVE_CXXTEST) -#ifndef __BORLANDC__ // @todo - for (int i2 = 1; i2 < argc; ++i2) - if (strcmp (argv[i2], "--compiler-output") == 0) - runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(&runner.result(), std::cerr ) ); -#endif + ret = run_cxxtest(argc, argv); - ret = runner.run() ? 0 : 1; - delete listener; +#elif defined(HAVE_CPPUNIT) + + ret = run_cppunit(argc, argv); - std::cout << "Result: " << ret << std::endl; -#else - std::cout << "CppUnit was not available at compile time!\n"; - std::cout << "No unit test are performed.\n"; - ret = 1; #endif + + std::cout << "Result: " << ret << std::endl << std::endl; return ret; } Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- Makefile.am 9 Dec 2005 18:56:20 -0000 1.92 +++ Makefile.am 10 Dec 2005 15:18:34 -0000 1.93 @@ -17,14 +17,18 @@ ########################################################################### +if BUILTIN_CXXTEST +cxxtest_lib=$(top_builddir)/3party/cxxtest/cxxtest/libmockpp_cxxtest.la +endif + mock_test_LDADD = $(top_builddir)/mockpp/libmockpp.la \ - $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) + $(cxxtest_lib) $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) jmock_test_LDADD = $(top_builddir)/mockpp/libmockpp.la \ - $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) + $(cxxtest_lib) $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) readability_test_LDADD = $(top_builddir)/mockpp/libmockpp.la \ - $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) + $(cxxtest_lib) $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) check_inst_LDADD = $(top_builddir)/mockpp/libmockpp.la \ $(LIBDL) -lstdc++ $(EA_EXTRA_LIB) $(LIBCPPUNIT) Index: Exception_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Exception_test.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Exception_test.cpp 9 Dec 2005 18:56:20 -0000 1.14 +++ Exception_test.cpp 10 Dec 2005 15:18:34 -0000 1.15 @@ -57,7 +57,10 @@ }; - #if defined (HAVE_CXXTEST) +#if defined (HAVE_CXXTEST) + +MOCKPP_CXXTEST_SUITE_REGISTRATION( Exception_test ); +MOCKPP_CXXTEST(Exception_test, test_file_line); #elif defined(HAVE_CPPUNIT) |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:18:41
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13151/mockpp Modified Files: CxxTestSupport.h Added Files: SelectUnittestFramework.h Log Message: first tests with cxxtest --- NEW FILE: SelectUnittestFramework.h --- /*************************************************************************** SelectUnittestFramework.h - setup for unittest framework in use ------------------- begin : Fri Dec 9 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: SelectUnittestFramework.h,v 1.1 2005/12/10 15:18:34 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ***************************************************************************/ #ifndef MOCKPP_SELECTUNITTESTFRAMEWORK_H #define MOCKPP_SELECTUNITTESTFRAMEWORK_H #if defined(HAVE_CXXTEST) # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CxxTest::TestSuite #define CXXTEST_HAVE_STD #define CXXTEST_ABORT_TEST_ON_FAIL #ifndef CXXTEST_RUNNING #define CXXTEST_RUNNING #endif #define _CXXTEST_HAVE_STD #define _CXXTEST_HAVE_EH #include <cxxtest/TestListener.h> #include <cxxtest/TestTracker.h> #include <cxxtest/RealDescriptions.h> //#include <cxxtest/TestRunner.h> #include <mockpp/CxxTestSupport.h> #elif defined(HAVE_CPPUNIT) # include <cppunit/extensions/HelperMacros.h> # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CppUnit::TestFixture #else # pragma message ("No unittest framework available at compile time") # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/ #endif // frameworks #endif // MOCKPP_SELECTUNITTESTFRAMEWORK_H Index: CxxTestSupport.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/CxxTestSupport.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CxxTestSupport.h 9 Dec 2005 21:16:49 -0000 1.1 +++ CxxTestSupport.h 10 Dec 2005 15:18:34 -0000 1.2 @@ -30,22 +30,43 @@ #ifndef MOCKPP_CXXTEST_SUPPORT_H #define MOCKPP_CXXTEST_SUPPORT_H -#define MOCKPP_CXXTEST_SUITE(class) \ - static ## class suite_## class; \ +//////////////////////////////////////////////////////////////////////////// +// + +#define MOCKPP_CXXTEST_SUITE_REGISTRATION(classname) \ + static classname suite_ ## classname; \ \ - static CxxTest::List Tests_## class = { 0, 0 }; \ - CxxTest::StaticSuiteDescription suiteDescription_## class( __FILE__, __LINE__, #class, suite_## class, Tests_## class ); \ + static CxxTest::List tests_ ## classname = { 0, 0 }; \ + \ + CxxTest::StaticSuiteDescription suiteDescription_ ## classname( __FILE__, \ + __LINE__, \ + #classname, \ + suite_ ## classname, \ + tests_ ## classname) +//////////////////////////////////////////////////////////////////////////// +// -#define MOCKPP_CXXTEST(class, meth) \ -static class TestDescription_ ## class ## _ ## meth : public CxxTest::RealTestDescription { \ +#define MOCKPP_CXXTEST(classname, meth) \ +static class TestDescription_ ## classname ## _ ## meth \ + : public CxxTest::RealTestDescription { \ public: \ - TestDescription_## class ## meth() : CxxTest::RealTestDescription( Tests_ ## class, suiteDescription_ ##class, __LINE__, #meth ) {} \ - void runTest() { suite_ ## class. ##meth(); } \ -} testDescription_## class ##meth; - + TestDescription_ ## classname ## _ ## meth() \ + : CxxTest::RealTestDescription( tests_ ## classname, \ + suiteDescription_ ##classname, \ + __LINE__, \ + #meth ) \ + {} \ + \ + void runTest() \ + { \ + suite_ ## classname . meth(); \ + } \ +} testDescription_ ## classname ## _ ## meth -#define MOCKPP_CXXTEST_SUITE_END +//////////////////////////////////////////////////////////////////////////// +// +// #define MOCKPP_CXXTEST_SUITE_END #endif // MOCKPP_CXXTEST_SUPPORT_H |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:17:23
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12953/mockpp/examples/tutorial Modified Files: chainmock.cpp Log Message: compilation issue Index: chainmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- chainmock.cpp 26 Nov 2005 17:58:40 -0000 1.11 +++ chainmock.cpp 10 Dec 2005 15:17:15 -0000 1.12 @@ -28,10 +28,11 @@ typedef mockpp::Invocation1<MOCKPP_STL::string> InvocationString; typedef mockpp::Invocation1<unsigned> InvocationUInt; +/* MOCKPP_PTI_IMPLEMENT(mockpp::Invocation0); MOCKPP_PTI_IMPLEMENT(InvocationString); MOCKPP_PTI_IMPLEMENT(InvocationUInt); - +*/ class ChainMock : public Interface , public mockpp::ChainableMockObject |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:16:47
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12856/mockpp/docs/en Modified Files: index.docbook Added Files: dev_test_framework.docbook Log Message: prepared new section Index: index.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/index.docbook,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- index.docbook 2 Dec 2005 17:28:36 -0000 1.34 +++ index.docbook 10 Dec 2005 15:16:39 -0000 1.35 @@ -26,6 +26,7 @@ <!ENTITY sect_dev_advanced_poor_man SYSTEM 'dev_poor_mans_mock.docbook' > <!ENTITY sect_dev_helper SYSTEM 'dev_helper.docbook' > <!ENTITY sect_dev_embedded SYSTEM 'dev_embedded.docbook' > + <!ENTITY sect_dev_framework SYSTEM 'dev_test_framework.docbook' > <!ENTITY sect_dev_production SYSTEM 'dev_production.docbook' > <!ENTITY chap_faq SYSTEM 'faq.docbook' > <!ENTITY chap_credits SYSTEM 'credits.docbook' > @@ -47,6 +48,8 @@ §_dev_helper; + §_dev_framework; + §_dev_embedded; §_dev_production; --- NEW FILE: dev_test_framework.docbook --- <sect1 id="unittest-framework"> <title>Choosing a Unit Test Framework</title> <sect2 id="framework-cppunit"> <title>CppUnit</title> </sect2> <sect2 id="framework-cxxtest"> <title>CxxTest</title> </sect2> <sect2 id="framework-boost"> <title>Boost.Test</title> </sect2> </sect1> |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:15:24
|
Update of /cvsroot/mockpp/mockpp/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12553/config Added Files: ac_cxx_cxxtest.m4 Log Message: new --- NEW FILE: ac_cxx_cxxtest.m4 --- AC_DEFUN([EA_CHECK_LIBCXXTEST], [ AC_CHECK_HEADERS(cxxtest/TestSuite.h) # "Unusual" places for cxxtest cxxtest_inc_dirs="/usr/include /usr/local/include `pwd`/3party/cxxtest" if test x$enable_builtin_cxxtest = xyes; then cxxtest_inc_dirs="$cxxtest_inc_dirs $srcdir/3party/cxxtest" fi cxxtest_lib_dirs="/usr/lib /usr/local/lib" if test x$enable_builtin_cxxtest = xyes; then cxxtest_lib_dirs="$cxxtest_lib_dirs $srcdir/3party/cxxtest" fi if test "ac_cv_header_cxxtest_TestSuite_h" != "yes"; then echo "checking for cxxtest/TestCase.h at $cxxtest_inc_dirs" EA_FIND_FILE(cxxtest/TestSuite.h, $cxxtest_inc_dirs, cxxtest_inc, dummy) if test x$cxxtest_inc != xNO; then echo "found cxxtest/TestCase.h at $cxxtest_inc" EA_EXTRA_INC="$EA_EXTRA_INC -I$cxxtest_inc" AC_DEFINE(HAVE_CXXTEST, 1, [Define if you have CxxTest installed.]) else echo "*******************************************************" echo "*** cxxtest/TestSuite.h not found." echo "*******************************************************" AH_TEMPLATE(HAVE_CXXTEST, [Define if you have CxxTest installed.]) fi fi echo "checking for *cxxtest.la *cxxtest.so* *cxxtest.a* *cxxtest*.dll* at $cxxtest_lib_dirs" EA_FIND_FILE(cxxtest.la *cxxtest.so* *cxxtest*.a *cxxtest*.dll*, $cxxtest_lib_dirs, cxxtest_lib, cxxtest_name) if test x$cxxtest_lib != xNO; then echo "found cxxtest as $cxxtest_name at $cxxtest_lib" LIBCXXTEST="-l$cxxtest_name" EA_EXTRA_LIB="$EA_EXTRA_LIB -L$cxxtest_lib" else echo "*******************************************************" echo "*** *cxxtest.{la,so,a,dll}* not found." echo "*******************************************************" fi AC_SUBST(LIBCXXTEST) ]) |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:14:47
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12456/3party/cxxtest Modified Files: README.mockpp Log Message: fixed compilation issues (g++ 4.0) Index: README.mockpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/README.mockpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README.mockpp 9 Dec 2005 20:40:42 -0000 1.2 +++ README.mockpp 10 Dec 2005 15:14:39 -0000 1.3 @@ -11,4 +11,5 @@ - make a library out of the *.cpp files. - omit samples directory -- moved some static members to their actual cpp file \ No newline at end of file +- moved some static members to their actual cpp file +- fixed superfluous and nowadays erronous "namespace { .. };" to "namespace { .. }" \ No newline at end of file |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:14:32
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12369/3party/cxxtest/docs Added Files: guide.pdf Log Message: new --- NEW FILE: guide.pdf --- %PDF-1.4 3 0 obj << /Length 383 /Filter /FlateDecode >> stream xÚMOÃ0ïý9 J$ÄÓ$Ai7 pB¬Cãcí6&~=vº±1ªT¯l÷õ㸠= |!|°:X/ß2³¾d°Vè¬vhIÿV¼«#þa¢¨òeÔ!rÁi{ Ñ¥¢0Ei¬ö&j<g«UG+ën+ë¼éru®@¶üî8òõb:®ó»j ªïäç¢ÓÞî÷îØÎ3¹a'òàD[Iv]þ¤Þ±IØMÂF´º |
|
From: Ewald A. <ewa...@us...> - 2005-12-10 15:13:24
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12232/3party/cxxtest/cxxtest Modified Files: Descriptions.cpp ErrorFormatter.h Gui.h LinkedList.cpp QtGui.h StdValueTraits.h StdioFilePrinter.h TeeListener.h TestRunner.h TestSuite.cpp TestTracker.cpp TestTracker.h ValueTraits.cpp ValueTraits.h Win32Gui.h Log Message: fixed compilation issues (g++ 4.0) Index: ErrorFormatter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ErrorFormatter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ErrorFormatter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ErrorFormatter.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -25,7 +25,7 @@ virtual OutputStream &operator<<( const char * /*string*/ ) { return *this; } typedef void (*Manipulator)( OutputStream & ); - + virtual OutputStream &operator<<( Manipulator m ) { m( *this ); return *this; } static void endl( OutputStream &o ) { (o << "\n").flush(); } }; @@ -84,7 +84,7 @@ void leaveWorld( const WorldDescription &desc ) { if ( !tracker().failedTests() ) { - (*_o) << "OK!" << endl; + (*_o) << " OK!" << endl; return; } newLine(); @@ -213,7 +213,7 @@ private: ErrorFormatter( const ErrorFormatter & ); ErrorFormatter &operator=( const ErrorFormatter & ); - + OutputStream &stop( const char *file, unsigned line ) { newLine(); @@ -249,7 +249,7 @@ { (*_o) << " (null)" << endl; } - + void dumpBuffer( const void *buffer, unsigned size ) { unsigned dumpSize = size; @@ -276,6 +276,6 @@ const char *_preLine; const char *_postLine; }; -}; +} #endif // __cxxtest__ErrorFormatter_h__ Index: TestSuite.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestSuite.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ TestSuite.cpp 10 Dec 2005 15:13:16 -0000 1.2 @@ -26,7 +26,7 @@ { currentAbortTestOnFail = value; } - + void doAbortTest() { # if defined(_CXXTEST_HAVE_EH) @@ -44,7 +44,7 @@ { return currentMaxDumpSize; } - + void setMaxDumpSize( unsigned value ) { currentMaxDumpSize = value; @@ -82,7 +82,7 @@ { if ( size == 0 ) return true; - + if ( x == y ) return true; @@ -119,7 +119,7 @@ { if ( message ) tracker().failedTest( file, line, message ); - + tracker().failedAssertThrows( file, line, expr, type, otherThrown ); TS_ABORT(); } @@ -129,10 +129,10 @@ { if ( message ) tracker().failedTest( file, line, message ); - + tracker().failedAssertThrowsNot( file, line, expression ); TS_ABORT(); } -}; +} #endif // __cxxtest__TestSuite_cpp__ Index: QtGui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/QtGui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- QtGui.h 9 Dec 2005 15:57:51 -0000 1.1 +++ QtGui.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -4,7 +4,7 @@ // // The QtGui displays a simple progress bar using the Qt Toolkit. It // has been tested with versions 2.x and 3.x. -// +// // Apart from normal Qt command-line arguments, it accepts the following options: // -minimized Start minimized, pop up on error // -keep Don't close the window at the end @@ -63,7 +63,7 @@ getTotalTests(); processEvents(); } - + void redBar() { if ( _startMinimized && _mainWindow->isMinimized() ) @@ -100,7 +100,7 @@ { _startMinimized = _keep = false; _title = argv[0]; - + for ( int i = 1; i < argc; ++ i ) { QString arg( argv[i] ); if ( arg == "-minimized" ) @@ -115,11 +115,11 @@ void createApplication( int &argc, char **argv ) { _application = new QApplication( argc, argv ); - } - + } + void createWindow( const WorldDescription &wd ) { - getTotalTests( wd ); + getTotalTests( wd ); createMainWindow(); createProgressBar(); createStatusBar(); @@ -236,7 +236,7 @@ QWidget *desktop = QApplication::desktop(); int xCenter = desktop->x() + (desktop->width() / 2); int yCenter = desktop->y() + (desktop->height() / 2); - + int windowWidth = (desktop->width() * 4) / 5; int windowHeight = _mainWindow->height(); _mainWindow->setGeometry( xCenter - (windowWidth / 2), yCenter - (windowHeight / 2), windowWidth, windowHeight ); @@ -266,6 +266,6 @@ _testsDone->setText( summary ); } }; -}; +} #endif // __cxxtest__QtGui_h__ Index: ValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ValueTraits.h 9 Dec 2005 20:40:42 -0000 1.2 +++ ValueTraits.h 10 Dec 2005 15:13:16 -0000 1.3 @@ -338,7 +338,7 @@ CXXTEST_COPY_TRAITS( const float, const double ); CXXTEST_COPY_CONST_TRAITS( float ); #endif // !CXXTEST_USER_VALUE_TRAITS -}; +} #ifdef _CXXTEST_HAVE_STD # include <cxxtest/StdValueTraits.h> Index: TeeListener.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TeeListener.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TeeListener.h 9 Dec 2005 15:57:51 -0000 1.1 +++ TeeListener.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -44,37 +44,37 @@ _first->enterSuite( d ); _second->enterSuite( d ); } - + void enterTest( const TestDescription &d ) { _first->enterTest( d ); _second->enterTest( d ); } - + void trace( const char *file, unsigned line, const char *expression ) { _first->trace( file, line, expression ); _second->trace( file, line, expression ); } - + void warning( const char *file, unsigned line, const char *expression ) { _first->warning( file, line, expression ); _second->warning( file, line, expression ); } - + void failedTest( const char *file, unsigned line, const char *expression ) { _first->failedTest( file, line, expression ); _second->failedTest( file, line, expression ); } - + void failedAssert( const char *file, unsigned line, const char *expression ) { _first->failedAssert( file, line, expression ); _second->failedAssert( file, line, expression ); } - + void failedAssertEquals( const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -91,7 +91,7 @@ _first->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size ); _second->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size ); } - + void failedAssertDelta( const char *file, unsigned line, const char *xStr, const char *yStr, const char *dStr, const char *x, const char *y, const char *d ) @@ -99,7 +99,7 @@ _first->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); _second->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); } - + void failedAssertDiffers( const char *file, unsigned line, const char *xStr, const char *yStr, const char *value ) @@ -107,7 +107,7 @@ _first->failedAssertDiffers( file, line, xStr, yStr, value ); _second->failedAssertDiffers( file, line, xStr, yStr, value ); } - + void failedAssertLessThan( const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -115,7 +115,7 @@ _first->failedAssertLessThan( file, line, xStr, yStr, x, y ); _second->failedAssertLessThan( file, line, xStr, yStr, x, y ); } - + void failedAssertLessThanEquals( const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -123,14 +123,14 @@ _first->failedAssertLessThanEquals( file, line, xStr, yStr, x, y ); _second->failedAssertLessThanEquals( file, line, xStr, yStr, x, y ); } - + void failedAssertPredicate( const char *file, unsigned line, const char *predicate, const char *xStr, const char *x ) { _first->failedAssertPredicate( file, line, predicate, xStr, x ); _second->failedAssertPredicate( file, line, predicate, xStr, x ); } - + void failedAssertRelation( const char *file, unsigned line, const char *relation, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -138,7 +138,7 @@ _first->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); _second->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); } - + void failedAssertThrows( const char *file, unsigned line, const char *expression, const char *type, bool otherThrown ) @@ -146,26 +146,26 @@ _first->failedAssertThrows( file, line, expression, type, otherThrown ); _second->failedAssertThrows( file, line, expression, type, otherThrown ); } - + void failedAssertThrowsNot( const char *file, unsigned line, const char *expression ) { _first->failedAssertThrowsNot( file, line, expression ); _second->failedAssertThrowsNot( file, line, expression ); } - + void leaveTest( const TestDescription &d ) { _first->leaveTest(d); _second->leaveTest(d); } - + void leaveSuite( const SuiteDescription &d ) { _first->leaveSuite(d); _second->leaveSuite(d); } - + void leaveWorld( const WorldDescription &d ) { _first->leaveWorld(d); @@ -176,7 +176,7 @@ TestListener *_first, *_second; TestListener _dummy; }; -}; +} #endif // __cxxtest__TeeListener_h__ Index: StdValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdValueTraits.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StdValueTraits.h 9 Dec 2005 15:57:51 -0000 1.1 +++ StdValueTraits.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -39,7 +39,7 @@ private: CXXTEST_STD(string) _s; }; - + // // std::string // @@ -107,7 +107,7 @@ class ValueTraits< CXXTEST_STD(pair)<First, Second> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(pair)<First, Second> &p ) + ValueTraits( const CXXTEST_STD(pair)<First, Second> &p ) { *this << "<" << TS_AS_STRING( p.first ) << ", " << TS_AS_STRING( p.second ) << ">"; } @@ -163,7 +163,7 @@ { dumpRange( *this, m.begin(), m.end() ); } - }; + }; // // std::deque @@ -222,7 +222,7 @@ } }; #endif // _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION -}; +} #endif // CXXTEST_USER_VALUE_TRAITS Index: Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Gui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Gui.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Gui.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -20,15 +20,15 @@ { enterGui( argc, argv ); TestRunner::runAllTests( listener ); - leaveGui(); + leaveGui(); } virtual void enterGui( int & /*argc*/, char ** /*argv*/ ) {} virtual void leaveGui() {} - + // // The easy way is to implement these functions: - // + // virtual void guiEnterWorld( unsigned /*numTotalTests*/ ) {} virtual void guiEnterSuite( const char * /*suiteName*/ ) {} virtual void guiEnterTest( const char * /*suiteName*/, const char * /*testName*/ ) {} @@ -44,22 +44,22 @@ void leaveTest( const TestDescription & ) {} void leaveSuite( const SuiteDescription & ) {} void leaveWorld( const WorldDescription & ) {} - + void warning( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ ) { yellowBarSafe(); } - + void failedTest( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ ) { redBarSafe(); } - + void failedAssert( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ ) { redBarSafe(); } - + void failedAssertEquals( const char * /*file*/, unsigned /*line*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*x*/, const char * /*y*/ ) @@ -74,55 +74,55 @@ { redBarSafe(); } - + void failedAssertDelta( const char * /*file*/, unsigned /*line*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*dStr*/, const char * /*x*/, const char * /*y*/, const char * /*d*/ ) { redBarSafe(); } - + void failedAssertDiffers( const char * /*file*/, unsigned /*line*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*value*/ ) { redBarSafe(); } - + void failedAssertLessThan( const char * /*file*/, unsigned /*line*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*x*/, const char * /*y*/ ) { redBarSafe(); } - + void failedAssertLessThanEquals( const char * /*file*/, unsigned /*line*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*x*/, const char * /*y*/ ) { redBarSafe(); } - + void failedAssertPredicate( const char * /*file*/, unsigned /*line*/, const char * /*predicate*/, const char * /*xStr*/, const char * /*x*/ ) { redBarSafe(); } - + void failedAssertRelation( const char * /*file*/, unsigned /*line*/, const char * /*relation*/, const char * /*xStr*/, const char * /*yStr*/, const char * /*x*/, const char * /*y*/ ) { redBarSafe(); } - + void failedAssertThrows( const char * /*file*/, unsigned /*line*/, const char * /*expression*/, const char * /*type*/, bool /*otherThrown*/ ) { redBarSafe(); } - + void failedAssertThrowsNot( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ ) { @@ -145,7 +145,7 @@ _state = RED_BAR; } } - + private: enum { GREEN_BAR, YELLOW_BAR, RED_BAR } _state; }; @@ -157,12 +157,12 @@ char **_argv; GuiT _gui; TuiT _tui; - + public: GuiTuiRunner( int &argc, char **argv ) : _argc( argc ), _argv( argv ) - { + { setFirst( _gui ); setSecond( _tui ); } @@ -173,6 +173,6 @@ return tracker().failedTests(); } }; -}; +} #endif //__CXXTEST__GUI_H Index: StdioFilePrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdioFilePrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StdioFilePrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ StdioFilePrinter.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -11,7 +11,7 @@ #include <cxxtest/ErrorFormatter.h> #include <stdio.h> -namespace CxxTest +namespace CxxTest { class StdioFilePrinter : public ErrorFormatter { @@ -25,9 +25,9 @@ { Adapter( const Adapter & ); Adapter &operator=( const Adapter & ); - + FILE *_o; - + public: Adapter( FILE *o ) : _o(o) {} void flush() { fflush( _o ); } Index: LinkedList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LinkedList.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ LinkedList.cpp 10 Dec 2005 15:13:16 -0000 1.3 @@ -164,6 +164,6 @@ else l._tail = _prev; } -}; +} #endif // __cxxtest__LinkedList_cpp__ Index: TestTracker.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestTracker.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ TestTracker.cpp 10 Dec 2005 15:13:16 -0000 1.2 @@ -18,7 +18,7 @@ TestTracker::~TestTracker() { } - + TestTracker & TestTracker::tracker() { static TestTracker theTracker; @@ -42,27 +42,27 @@ { return d ? d : &dummyTest(); } - + const SuiteDescription *TestTracker::fixSuite( const SuiteDescription *d ) const { return d ? d : &dummySuite(); } - + const WorldDescription *TestTracker::fixWorld( const WorldDescription *d ) const { return d ? d : &dummyWorld(); } - + const TestDescription &TestTracker::dummyTest() const { return dummySuite().testDescription(0); } - + const SuiteDescription &TestTracker::dummySuite() const { return dummyWorld().suiteDescription(0); } - + const WorldDescription &TestTracker::dummyWorld() const { return _dummyWorld; @@ -86,7 +86,7 @@ _testFailedAsserts = _suiteFailedTests = 0; _l->enterSuite(sd); } - + void TestTracker::enterTest( const TestDescription &td ) { setTest( &td ); @@ -128,7 +128,7 @@ countFailure(); _l->failedTest( file, line, expression ); } - + void TestTracker::failedAssert( const char *file, unsigned line, const char *expression ) { countFailure(); @@ -159,7 +159,7 @@ countFailure(); _l->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); } - + void TestTracker::failedAssertDiffers( const char *file, unsigned line, const char *xStr, const char *yStr, const char *value ) @@ -167,7 +167,7 @@ countFailure(); _l->failedAssertDiffers( file, line, xStr, yStr, value ); } - + void TestTracker::failedAssertLessThan( const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -190,7 +190,7 @@ countFailure(); _l->failedAssertPredicate( file, line, predicate, xStr, x ); } - + void TestTracker::failedAssertRelation( const char *file, unsigned line, const char *relation, const char *xStr, const char *yStr, const char *x, const char *y ) @@ -198,7 +198,7 @@ countFailure(); _l->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); } - + void TestTracker::failedAssertThrows( const char *file, unsigned line, const char *expression, const char *type, bool otherThrown ) @@ -206,7 +206,7 @@ countFailure(); _l->failedAssertThrows( file, line, expression, type, otherThrown ); } - + void TestTracker::failedAssertThrowsNot( const char *file, unsigned line, const char *expression ) { countFailure(); @@ -243,6 +243,6 @@ ++ _failedSuites; } } -}; +} #endif // __cxxtest__TestTracker_cpp__ Index: TestTracker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestTracker.h 9 Dec 2005 15:57:51 -0000 1.1 +++ TestTracker.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -13,12 +13,12 @@ namespace CxxTest { class TestListener; - + class TestTracker : public TestListener { public: virtual ~TestTracker(); - + static TestTracker &tracker(); const TestDescription *fixTest( const TestDescription *d ) const; @@ -28,11 +28,11 @@ const TestDescription &test() const { return *_test; } const SuiteDescription &suite() const { return *_suite; } const WorldDescription &world() const { return *_world; } - + bool testFailed() const { return (testFailedAsserts() > 0); } bool suiteFailed() const { return (suiteFailedTests() > 0); } bool worldFailed() const { return (failedSuites() > 0); } - + unsigned warnings() const { return _warnings; } unsigned failedTests() const { return _failedTests; } unsigned testFailedAsserts() const { return _testFailedAsserts; } @@ -77,7 +77,7 @@ const char *expression, const char *type, bool otherThrown ); void failedAssertThrowsNot( const char *file, unsigned line, const char *expression ); - + private: TestTracker( const TestTracker & ); TestTracker &operator=( const TestTracker & ); @@ -94,7 +94,7 @@ const TestDescription &dummyTest() const; const SuiteDescription &dummySuite() const; const WorldDescription &dummyWorld() const; - + void setWorld( const WorldDescription *w ); void setSuite( const SuiteDescription *s ); void setTest( const TestDescription *t ); @@ -102,13 +102,13 @@ void countFailure(); friend class TestRunner; - + TestTracker(); void initialize(); void setListener( TestListener *l ); }; inline TestTracker &tracker() { return TestTracker::tracker(); } -}; +} #endif // __cxxtest__TestTracker_h__ Index: TestRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestRunner.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestRunner.h 9 Dec 2005 15:57:51 -0000 1.1 +++ TestRunner.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -5,14 +5,14 @@ // TestRunner is the class that runs all the tests. // To use it, create an object that implements the TestListener // interface and call TestRunner::runAllTests( myListener ); -// +// #include <cxxtest/TestListener.h> #include <cxxtest/RealDescriptions.h> #include <cxxtest/TestSuite.h> #include <cxxtest/TestTracker.h> -namespace CxxTest +namespace CxxTest { class TestRunner { @@ -31,29 +31,29 @@ listener->warning( __FILE__, __LINE__, "Deprecated; Use runAllTests( TestListener & )" ); runAllTests( *listener ); } - } - + } + private: void runWorld() { RealWorldDescription wd; WorldGuard sg; - + tracker().enterWorld( wd ); if ( wd.setUp() ) { for ( SuiteDescription *sd = wd.firstSuite(); sd; sd = sd->next() ) if ( sd->active() ) runSuite( *sd ); - + wd.tearDown(); } tracker().leaveWorld( wd ); } - + void runSuite( SuiteDescription &sd ) { StateGuard sg; - + tracker().enterSuite( sd ); if ( sd.setUp() ) { for ( TestDescription *td = sd.firstTest(); td; td = td->next() ) @@ -68,7 +68,7 @@ void runTest( TestDescription &td ) { StateGuard sg; - + tracker().enterTest( td ); if ( td.setUp() ) { td.run(); @@ -76,14 +76,14 @@ } tracker().leaveTest( td ); } - + class StateGuard { #ifdef _CXXTEST_HAVE_EH bool _abortTestOnFail; #endif // _CXXTEST_HAVE_EH unsigned _maxDumpSize; - + public: StateGuard() { @@ -92,7 +92,7 @@ #endif // _CXXTEST_HAVE_EH _maxDumpSize = maxDumpSize(); } - + ~StateGuard() { #ifdef _CXXTEST_HAVE_EH @@ -119,7 +119,7 @@ // For --no-static-init // void initialize(); -}; +} #endif // __cxxtest_TestRunner_h__ Index: ValueTraits.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ValueTraits.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ ValueTraits.cpp 10 Dec 2005 15:13:16 -0000 1.3 @@ -135,6 +135,6 @@ return numberToString<double>( t, s, BASE, skip, max ); } #endif // !CXXTEST_USER_VALUE_TRAITS -}; +} #endif // __cxxtest__ValueTraits_cpp__ Index: Descriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Descriptions.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ Descriptions.cpp 10 Dec 2005 15:13:16 -0000 1.3 @@ -54,6 +54,6 @@ return s; } #endif // _CXXTEST_FACTOR -}; +} #endif // __cxxtest__Descriptions_cpp__ Index: Win32Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Win32Gui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Win32Gui.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Win32Gui.h 10 Dec 2005 15:13:16 -0000 1.2 @@ -31,7 +31,7 @@ { parseCommandLine( argc, argv ); } - + void enterWorld( const WorldDescription &wd ) { getTotalTests( wd ); @@ -61,7 +61,7 @@ setIcon( IDI_WARNING ); getTotalTests(); } - + void redBar() { if ( _startMinimized ) @@ -90,11 +90,11 @@ HANDLE _canStartTests; unsigned _numTotalTests, _testsDone; char _strTotalTests[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; - enum { + enum { STATUS_SUITE_NAME, STATUS_SUITE_TIME, STATUS_TEST_NAME, STATUS_TEST_TIME, STATUS_TESTS_DONE, STATUS_WORLD_TIME, - STATUS_TOTAL_PARTS + STATUS_TOTAL_PARTS }; int _statusWidths[STATUS_TOTAL_PARTS]; unsigned _statusOffsets[STATUS_TOTAL_PARTS]; @@ -107,7 +107,7 @@ { _startMinimized = _keep = false; _title = argv[0]; - + for ( int i = 1; i < argc; ++ i ) { if ( !lstrcmpA( argv[i], "-minimized" ) ) @@ -118,7 +118,7 @@ _title = argv[++i]; } } - + void getTotalTests() { getTotalTests( tracker().world() ); @@ -187,7 +187,7 @@ HMODULE dll = LoadLibraryA( "comctl32.dll" ); if ( !dll ) return; - + typedef void (WINAPI *FUNC)( void ); FUNC func = (FUNC)GetProcAddress( dll, "InitCommonControls" ); if ( !func ) @@ -394,7 +394,7 @@ progressBarMessage( PBM_SETBARCOLOR, 0, RGB( red, green, blue ) ); } #else // !PBM_SETBARCOLOR - void setColor( BYTE, BYTE, BYTE ) + void setColor( BYTE, BYTE, BYTE ) { } #endif // PBM_SETBARCOLOR @@ -500,7 +500,7 @@ { setRatios( 0, 0, 0, 0, 1, 1 ); resizeControls(); - + const char *tests = (_numTotalTests == 1) ? "test" : "tests"; if ( tracker().failedTests() ) wsprintfA( _statusTestsDone, "Failed %u of %s %s", @@ -526,6 +526,6 @@ HeapFree( GetProcessHeap(), 0, data ); } }; -}; +} #endif // __cxxtest__Win32Gui_h__ |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 21:16:58
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10544/mockpp Modified Files: Makefile.am Added Files: CxxTestSupport.h Log Message: support cxxtest Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- Makefile.am 30 Nov 2005 21:47:31 -0000 1.97 +++ Makefile.am 9 Dec 2005 21:16:49 -0000 1.98 @@ -24,28 +24,16 @@ VisitableMockMethod.cpp pkginclude_HEADERS = mockpp_config.h ReturnObjectList.h Expectation.h \ - AbstractExpectation.h ExpectationValue.h ExpectationSegment.h ExpectationList.h \ - ExpectationSet.h ExpectationMap.h ExpectationBoundary.h AbstractExpectationCollection.h \ - VisitableMockObject_macro.h VisitableMockObject_template.h ExpectationConglomeration.h \ - ExpectationCounter.h mockpp.h Throwable.h ThrowableList.h MockObject.h VisitableMockObject.h \ - VerifiableList.h Verifiable.h VerifyingTestCase.h SelfDescribing.h ChainableMockObject.h \ - VerifyingTestCaller.h TrackingCounter.h MixedMockObject.h mockpp_dbc.h MockTimeServer.h \ - VisitableMockMethod.h \ - VisitableMockMethod0.h \ - VisitableMockMethod1.h \ - VisitableMockMethod2.h \ - VisitableMockMethod3.h \ - VisitableMockMethod4.h \ - VisitableMockMethod5.h \ - VisitableMockMethod6.h \ - CountParameters.h \ - CountedVisitableMethod.h \ - ResponseVector1.h \ - ResponseVector2.h \ - ResponseVector3.h \ - ResponseVector4.h \ - ResponseVector5.h \ - ResponseVector6.h + AbstractExpectation.h ExpectationValue.h ExpectationSegment.h ExpectationList.h \ + ExpectationSet.h ExpectationMap.h ExpectationBoundary.h AbstractExpectationCollection.h \ + VisitableMockObject_macro.h VisitableMockObject_template.h ExpectationConglomeration.h \ + ExpectationCounter.h mockpp.h Throwable.h ThrowableList.h MockObject.h VisitableMockObject.h \ + VerifiableList.h Verifiable.h VerifyingTestCase.h SelfDescribing.h ChainableMockObject.h \ + VerifyingTestCaller.h TrackingCounter.h MixedMockObject.h mockpp_dbc.h MockTimeServer.h \ + VisitableMockMethod.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h \ + VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h \ + CountParameters.h CountedVisitableMethod.h ResponseVector1.h ResponseVector2.h \ + ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h CxxTestSupport.h EXTRA_DIST = \ mockpp_config-bcb5.h \ --- NEW FILE: CxxTestSupport.h --- /** @file @brief Support for CxxTest similar to CppUnit $Id: CxxTestSupport.h,v 1.1 2005/12/09 21:16:49 ewald-arnold Exp $ **************************************************************************/ /************************************************************************** begin : Fri Dec 9 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_CXXTEST_SUPPORT_H #define MOCKPP_CXXTEST_SUPPORT_H #define MOCKPP_CXXTEST_SUITE(class) \ static ## class suite_## class; \ \ static CxxTest::List Tests_## class = { 0, 0 }; \ CxxTest::StaticSuiteDescription suiteDescription_## class( __FILE__, __LINE__, #class, suite_## class, Tests_## class ); \ #define MOCKPP_CXXTEST(class, meth) \ static class TestDescription_ ## class ## _ ## meth : public CxxTest::RealTestDescription { \ public: \ TestDescription_## class ## meth() : CxxTest::RealTestDescription( Tests_ ## class, suiteDescription_ ##class, __LINE__, #meth ) {} \ void runTest() { suite_ ## class. ##meth(); } \ } testDescription_## class ##meth; #define MOCKPP_CXXTEST_SUITE_END #endif // MOCKPP_CXXTEST_SUPPORT_H |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 20:40:59
|
Update of /cvsroot/mockpp/mockpp/3party In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3761/3party Modified Files: Makefile.am Log Message: basic integration of cxxtest Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 29 Nov 2005 23:18:04 -0000 1.1 +++ Makefile.am 9 Dec 2005 20:40:42 -0000 1.2 @@ -1,4 +1,4 @@ -SUBDIRS = ministl +SUBDIRS = ministl cxxtest CLEANFILES = *.~* *.~~* *~ |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 20:40:59
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3761 Modified Files: configure.in run-configure-unicode.sh Log Message: basic integration of cxxtest Index: run-configure-unicode.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/run-configure-unicode.sh,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- run-configure-unicode.sh 1 Dec 2005 18:15:08 -0000 1.10 +++ run-configure-unicode.sh 9 Dec 2005 20:40:42 -0000 1.11 @@ -10,7 +10,7 @@ #OPTS="--enable-doxygen --enable-docbook" -OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti +OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti #OPTS="$OPTS --enable-debug=full" CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure --enable-unicode $OPTS --prefix=/tmp/mockpp-install Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- configure.in 8 Dec 2005 17:33:59 -0000 1.101 +++ configure.in 9 Dec 2005 20:40:42 -0000 1.102 @@ -461,6 +461,10 @@ 3party/ministl/Makefile \ 3party/ministl/tests/Makefile \ \ + 3party/cxxtest/Makefile \ + 3party/cxxtest/docs/Makefile \ + 3party/cxxtest/cxxtest/Makefile \ + \ config/Makefile \ tool/Makefile \ \ |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 20:40:58
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3761/3party/cxxtest Modified Files: README.mockpp Log Message: basic integration of cxxtest Index: README.mockpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/README.mockpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README.mockpp 9 Dec 2005 16:19:17 -0000 1.1 +++ README.mockpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -1,11 +1,14 @@ +$Id$ + This directory contains CxxTest 3.10.1 (2004-12-01). -Oriinal location was http://cxxtest.sf.net +The original location was http://cxxtest.sf.net -It is slightly modified to better work with mockpp. -But shouldstill be possible to work with it as intended +It is slightly modified to work better with mockpp. +But it should still be possible to work with it as intended originally. The changes are: - make a library out of the *.cpp files. -- omit samples directory \ No newline at end of file +- omit samples directory +- moved some static members to their actual cpp file \ No newline at end of file |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 20:40:58
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3761/3party/cxxtest/docs Modified Files: Makefile.am Log Message: basic integration of cxxtest Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/docs/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 9 Dec 2005 16:19:16 -0000 1.1 +++ Makefile.am 9 Dec 2005 20:40:42 -0000 1.2 @@ -0,0 +1,7 @@ +EXTRA_DIST= + guide.html \ + index.html \ + qt2.png \ + qt.png \ + win32.png \ + x11.png |
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3761/3party/cxxtest/cxxtest Modified Files: Descriptions.cpp GlobalFixture.cpp LinkedList.cpp Makefile.am RealDescriptions.cpp ValueTraits.cpp ValueTraits.h Log Message: basic integration of cxxtest Index: RealDescriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/RealDescriptions.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RealDescriptions.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ RealDescriptions.cpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -8,12 +8,14 @@ #include <cxxtest/RealDescriptions.h> -namespace CxxTest +namespace CxxTest { + List RealSuiteDescription::_suites = { 0, 0 }; + RealTestDescription::RealTestDescription() { } - + RealTestDescription::RealTestDescription( List &argList, SuiteDescription &argSuite, unsigned argLine, @@ -32,7 +34,7 @@ _testName = argTestName; attach( argList ); } - + bool RealTestDescription::setUp() { if ( !suite() ) @@ -97,7 +99,7 @@ _TS_CATCH_ABORT( {} ) ___TSM_CATCH( file(), line(), "Exception thrown from test" ); } - + RealSuiteDescription::RealSuiteDescription() {} RealSuiteDescription::RealSuiteDescription( const char *argFile, unsigned argLine, @@ -116,7 +118,7 @@ _line = argLine; _suiteName = argSuiteName; _tests = &argTests; - + attach( _suites ); } @@ -128,9 +130,9 @@ const TestDescription *RealSuiteDescription::firstTest() const { return (const RealTestDescription *)_tests->head(); } SuiteDescription *RealSuiteDescription::next() { return (RealSuiteDescription *)Link::next(); } const SuiteDescription *RealSuiteDescription::next() const { return (const RealSuiteDescription *)Link::next(); } - + unsigned RealSuiteDescription::numTests() const { return _tests->size(); } - + const TestDescription &RealSuiteDescription::testDescription( unsigned i ) const { return *(RealTestDescription *)_tests->nth( i ); @@ -140,7 +142,7 @@ { _tests->activateAll(); } - + bool RealSuiteDescription::leaveOnly( const char *testName ) { for ( TestDescription *td = firstTest(); td != 0; td = td->next() ) { @@ -149,9 +151,9 @@ return true; } } - return false; + return false; } - + StaticSuiteDescription::StaticSuiteDescription() {} StaticSuiteDescription::StaticSuiteDescription( const char *argFile, unsigned argLine, const char *argSuiteName, TestSuite &argSuite, @@ -168,7 +170,7 @@ RealSuiteDescription::initialize( argFile, argLine, argSuiteName, argTests ); doInitialize( argSuite ); } - + void StaticSuiteDescription::doInitialize( TestSuite &argSuite ) { _suite = &argSuite; @@ -204,17 +206,17 @@ _createLine = argCreateLine; _destroyLine = argDestroyLine; } - + List &RealWorldDescription::suites() { return RealSuiteDescription::_suites; } - + unsigned RealWorldDescription::numSuites( void ) const { return suites().size(); } - + unsigned RealWorldDescription::numTotalTests( void ) const { unsigned count = 0; @@ -222,7 +224,7 @@ count += sd->numTests(); return count; } - + SuiteDescription *RealWorldDescription::firstSuite() { return (RealSuiteDescription *)suites().head(); @@ -258,7 +260,7 @@ } return false; } - + bool RealWorldDescription::setUp() { for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) { Index: ValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ValueTraits.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ValueTraits.h 9 Dec 2005 20:40:42 -0000 1.2 @@ -4,7 +4,7 @@ // // ValueTraits are used by CxxTest to convert arbitrary // values used in TS_ASSERT_EQUALS() to a string representation. -// +// // This header file contains value traits for builtin integral types. // To declare value traits for new types you should instantiate the class // ValueTraits<YourClass>. @@ -18,7 +18,7 @@ # define CXXTEST_TEMPLATE_INSTANTIATION template<> #endif // _CXXTEST_OLD_TEMPLATE_SYNTAX -namespace CxxTest +namespace CxxTest { // // This is how we use the value traits @@ -75,11 +75,11 @@ { enum { MAX_BYTES = 8 }; char _asString[sizeof("{ ") + sizeof("XX ") * MAX_BYTES + sizeof("... }")]; - + public: ValueTraits( const T &t ) { bytesToString( (const unsigned char *)&t, sizeof(T), MAX_BYTES, _asString ); } const char *asString( void ) const { return _asString; } - }; + }; // // traits( T t ) @@ -112,7 +112,7 @@ # else // !_CXXTEST_NO_COPY_CONST # define CXXTEST_COPY_CONST_TRAITS(CXXTEST_CLASS) CXXTEST_COPY_TRAITS(CXXTEST_CLASS, const CXXTEST_CLASS) # endif // _CXXTEST_NO_COPY_CONST - + // // Avoid compiler warnings about unsigned types always >= 0 // @@ -149,7 +149,7 @@ *s++ = '-'; n = abs(n); } - + N digit = 1; while ( digit <= (n / base) ) digit *= base; @@ -167,7 +167,7 @@ // All the specific ValueTraits follow. // You can #define CXXTEST_USER_VALUE_TRAITS if you don't want them // - + #ifndef CXXTEST_USER_VALUE_TRAITS // // ValueTraits: const char * const & @@ -178,7 +178,7 @@ { ValueTraits &operator=( const ValueTraits & ); const char *_asString; - + public: ValueTraits( const char * const &value ) : _asString( value ) {} ValueTraits( const ValueTraits &other ) : _asString( other._asString ) {} @@ -190,12 +190,12 @@ // // ValueTraits: bool - // + // CXXTEST_TEMPLATE_INSTANTIATION class ValueTraits<const bool> { bool _value; - + public: ValueTraits( const bool value ) : _value( value ) {} const char *asString( void ) const { return _value ? "true" : "false"; } @@ -249,7 +249,7 @@ }; CXXTEST_COPY_CONST_TRAITS( signed long int ); - + // // ValueTraits: unsigned long // @@ -264,17 +264,17 @@ }; CXXTEST_COPY_CONST_TRAITS( unsigned long int ); - + // // All decimals are the same as the long version // - + CXXTEST_COPY_TRAITS( const signed int, const signed long int ); CXXTEST_COPY_TRAITS( const unsigned int, const unsigned long int ); CXXTEST_COPY_TRAITS( const signed short int, const signed long int ); CXXTEST_COPY_TRAITS( const unsigned short int, const unsigned long int ); CXXTEST_COPY_TRAITS( const unsigned char, const unsigned long int ); - + CXXTEST_COPY_CONST_TRAITS( signed int ); CXXTEST_COPY_CONST_TRAITS( unsigned int ); CXXTEST_COPY_CONST_TRAITS( signed short int ); @@ -310,7 +310,7 @@ class ValueTraits<const double> { public: - ValueTraits( double t ) + ValueTraits( double t ) { ( requiredDigitsOnLeft( t ) > MAX_DIGITS_ON_LEFT ) ? hugeNumber( t ) : @@ -318,7 +318,7 @@ } const char *asString( void ) const { return _asString; } - + private: enum { MAX_DIGITS_ON_LEFT = 24, DIGITS_ON_RIGHT = 4, BASE = 10 }; char _asString[1 + MAX_DIGITS_ON_LEFT + 1 + DIGITS_ON_RIGHT + 1]; Index: GlobalFixture.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/GlobalFixture.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GlobalFixture.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ GlobalFixture.cpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -3,16 +3,18 @@ #include <cxxtest/GlobalFixture.h> -namespace CxxTest +namespace CxxTest { + List GlobalFixture::_list = { 0, 0 }; + bool GlobalFixture::setUpWorld() { return true; } bool GlobalFixture::tearDownWorld() { return true; } bool GlobalFixture::setUp() { return true; } bool GlobalFixture::tearDown() { return true; } - + GlobalFixture::GlobalFixture() { attach( _list ); } GlobalFixture::~GlobalFixture() { detach( _list ); } - + GlobalFixture *GlobalFixture::firstGlobalFixture() { return (GlobalFixture *)_list.head(); } GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); } GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); } Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 9 Dec 2005 16:19:16 -0000 1.1 +++ Makefile.am 9 Dec 2005 20:40:42 -0000 1.2 @@ -1,38 +1,48 @@ -cxxtest_SOURCES = -Descriptions.cpp \ -DummyDescriptions.cpp \ -GlobalFixture.cpp \ -LinkedList.cpp \ -RealDescriptions.cpp \ -Root.cpp \ -TestSuite.cpp \ -TestTracker.cpp \ -ValueTraits.cpp - -cxxtest_HEADERS= -Descriptions.h \ -DummyDescriptions.h \ -ErrorFormatter.h \ -ErrorPrinter.h \ -Flags.h \ -GlobalFixture.h \ -Gui.h \ -LinkedList.h \ -Mock.h \ -ParenPrinter.h \ -QtGui.h \ -RealDescriptions.h \ -SelfTest.h \ -StdHeaders.h \ -StdioFilePrinter.h \ -StdioPrinter.h \ -StdValueTraits.h \ -TeeListener.h \ -TestListener.h \ -TestRunner.h \ -TestSuite.h \ -TestTracker.h \ -ValueTraits.h \ -Win32Gui.h \ -X11Gui.h \ -YesNoRunner.h +INCLUDES = $(all_includes) -I$(top_srcdir) -I$(top_srcdir)/3party/cxxtest -I$(top_builddir) $(EA_EXTRA_INC) +DEFAULT_INCLUDES = $(INCLUDES) + +lib_LTLIBRARIES = libmockpp_cxxtest.la + +libmockpp_cxxtest_la_LDFLAGS = -no-undefined -version-info \ + $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + +libmockpp_cxxtestincludedir = $(includedir)/mockpp/mockpp_cxxtest + +libmockpp_cxxtest_la_SOURCES = \ + Descriptions.cpp \ + DummyDescriptions.cpp \ + GlobalFixture.cpp \ + LinkedList.cpp \ + RealDescriptions.cpp \ + TestSuite.cpp \ + TestTracker.cpp \ + ValueTraits.cpp +# Root.cpp + +libmockpp_cxxtestinclude_HEADERS = \ + Descriptions.h \ + DummyDescriptions.h \ + ErrorFormatter.h \ + ErrorPrinter.h \ + Flags.h \ + GlobalFixture.h \ + Gui.h \ + LinkedList.h \ + Mock.h \ + ParenPrinter.h \ + QtGui.h \ + RealDescriptions.h \ + SelfTest.h \ + StdHeaders.h \ + StdioFilePrinter.h \ + StdioPrinter.h \ + StdValueTraits.h \ + TeeListener.h \ + TestListener.h \ + TestRunner.h \ + TestSuite.h \ + TestTracker.h \ + ValueTraits.h \ + Win32Gui.h \ + X11Gui.h \ + YesNoRunner.h Index: LinkedList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LinkedList.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ LinkedList.cpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -5,14 +5,11 @@ namespace CxxTest { - List GlobalFixture::_list = { 0, 0 }; - List RealSuiteDescription::_suites = { 0, 0 }; - void List::initialize() { _head = _tail = 0; } - + Link *List::head() { Link *l = _head; @@ -89,12 +86,12 @@ Link::~Link() { } - + bool Link::active() const { return _active; } - + void Link::setActive( bool value ) { _active = value; @@ -104,12 +101,12 @@ { return _next; } - + Link * Link::justPrev() { return _prev; } - + Link * Link::next() { Link *l = _next; @@ -117,7 +114,7 @@ l = l->_next; return l; } - + Link * Link::prev() { Link *l = _prev; @@ -125,7 +122,7 @@ l = l->_prev; return l; } - + const Link * Link::next() const { Link *l = _next; @@ -133,7 +130,7 @@ l = l->_next; return l; } - + const Link * Link::prev() const { Link *l = _prev; @@ -141,7 +138,7 @@ l = l->_prev; return l; } - + void Link::attach( List &l ) { if ( l._tail ) @@ -149,7 +146,7 @@ _prev = l._tail; _next = 0; - + if ( l._head == 0 ) l._head = this; l._tail = this; @@ -161,7 +158,7 @@ _prev->_next = _next; else l._head = _next; - + if ( _next ) _next->_prev = _prev; else Index: ValueTraits.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ValueTraits.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ ValueTraits.cpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -3,12 +3,12 @@ #include <cxxtest/ValueTraits.h> -namespace CxxTest +namespace CxxTest { // // Non-inline functions from ValueTraits.h // - + char digitToChar( unsigned digit ) { if ( digit < 10 ) @@ -26,7 +26,7 @@ asHex[2] = '\0'; return asHex; } - + char *copyString( char *dst, const char *src ) { while ( (*dst = *src) != '\0' ) { @@ -78,13 +78,13 @@ { return charToString( (unsigned long)(unsigned char)c, s ); } - + char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ) { bool truncate = (numBytes > maxBytes); if ( truncate ) numBytes = maxBytes; - + s = copyString( s, "{ " ); for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes ) s = copyString( copyString( s, byteToHex( *bytes ) ), " " ); @@ -120,7 +120,7 @@ s = copyString( s, "E" ); s = numberToString( requiredDigitsOnLeft( t ) - 1, s ); } - + void ValueTraits<const double>::normalNumber( double t ) { char *s = doNegative( t ); Index: Descriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Descriptions.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ Descriptions.cpp 9 Dec 2005 20:40:42 -0000 1.2 @@ -2,13 +2,14 @@ #define __cxxtest__Descriptions_cpp__ #include <cxxtest/Descriptions.h> +#include <cxxtest/ValueTraits.h> namespace CxxTest { TestDescription::~TestDescription() {} SuiteDescription::~SuiteDescription() {} WorldDescription::~WorldDescription() {} - + // // Convert total tests to string // |
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13126/mockpp/tests Modified Files: AbstractDynamicChainingMock_test.cpp AbstractInvocationDispatcher_test.cpp And_test.cpp AnyArgumentsMatcher_test.cpp ArgumentsMatchBuilder_test.cpp ArgumentsMatcher_test.cpp AssertMo_test.cpp Assert_test.cpp ChainableMockMethod_1_test.cpp ChainableMockMethod_2_test.cpp ChainableMockMethod_test.cpp ChainableMockObjectPolymorphism_test.cpp ChainableMockObject_1_test.cpp ChainableMockObject_1_void_test.cpp ChainableMockObject_2_test.cpp ChainableMockObject_2_void_test.cpp ChainableMockObject_3_test.cpp ChainableMockObject_3_void_test.cpp ChainableMockObject_4_test.cpp ChainableMockObject_4_void_test.cpp ChainableMockObject_5_test.cpp ChainableMockObject_5_void_test.cpp ChainableMockObject_test.cpp ChainableMockObject_void_test.cpp ChainingMockBuilder_test.cpp ChainingMockObjectSupport_test.cpp ConstraintList_test.cpp ConstraintSet_test.cpp CoreMock_test.cpp CustomStub_test.cpp DefaultResultStub_test.cpp DynamicChainingMockError_test.cpp Exception_test.cpp ExpectationBoundary_test.cpp ExpectationConglomeration_test.cpp ExpectationCounterRange_test.cpp ExpectationCounter_test.cpp ExpectationList_test.cpp ExpectationMap_test.cpp ExpectationSegment_test.cpp ExpectationSet_test.cpp ExpectationValue_test.cpp FIFOInvocationDispatcher_test.cpp Formatter_test.cpp InvocationMockerBuilder_test.cpp InvocationMocker_test.cpp Invocation_test.cpp InvokeAtLeastMatcher_test.cpp InvokeAtLeastOnceMatcher_test.cpp InvokeAtMostMatcher_test.cpp InvokeCountMatcher_test.cpp InvokeOnceMatcher_test.cpp InvokedAfterMatcher_test.cpp InvokedBeforeMatcher_test.cpp InvokedRecorder_test.cpp IsAnything_test.cpp IsCloseTo_test.cpp IsEqual_test.cpp IsGreaterOrEqual_test.cpp IsGreaterThan_test.cpp IsInstanceOf_test.cpp IsLessOrEqual_test.cpp IsLessThan_test.cpp IsNot_test.cpp IsNothing_test.cpp IsSame_test.cpp LIFOInvocationDispatcher_test.cpp Makefile.am MatchBuilder_test.cpp MixedMockObject_5_test.cpp MockObject_test.cpp NoArgumentsMatcher_test.cpp NoException_test.cpp Or_test.cpp OutBound_test.cpp ResponseVector_test.cpp ReturnObjectList_test.cpp ReturnStub_test.cpp SelectFramework.h StringContains_test.cpp StringEndsWith_test.cpp StringStartsWith_test.cpp StubBuilder_test.cpp StubSequence_test.cpp TestFailureMatcher_test.cpp TestFailureStub_test.cpp ThrowStub_test.cpp ThrowableList_test.cpp Throwable_test.cpp TimeServer_test.cpp TrackingCounter_test.cpp TypelessStubSequence_test.cpp UnlimitedMatcher_test.cpp Verifiable_test.cpp VerifyingTestCaller_test.cpp VerifyingTestCase_test.cpp VisitableMockMethod_1_test.cpp VisitableMockMethod_2_test.cpp VisitableMockMethod_test.cpp VisitableMockObject_1_test.cpp VisitableMockObject_1_void_test.cpp VisitableMockObject_2_test.cpp VisitableMockObject_2_void_test.cpp VisitableMockObject_3_test.cpp VisitableMockObject_3_void_test.cpp VisitableMockObject_4_test.cpp VisitableMockObject_4_void_test.cpp VisitableMockObject_5_test.cpp VisitableMockObject_5_void_test.cpp VisitableMockObject_template_test.cpp VisitableMockObject_test.cpp VisitableMockObject_void_test.cpp VoidStub_test.cpp mock_test.cpp mockpp_pti_test.cpp mockpp_test.cpp Log Message: switch unittest framework Index: Or_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Or_test.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Or_test.cpp 15 Oct 2005 15:40:59 -0000 1.11 +++ Or_test.cpp 9 Dec 2005 18:56:20 -0000 1.12 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/ChainingMockObjectSupport.h> @@ -42,12 +38,15 @@ #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class Or_test : public CppUnit::TestFixture +class Or_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( Or_test ); CPPUNIT_TEST(test_invoke); @@ -55,6 +54,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); @@ -62,7 +63,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(Or_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (Or_test); + +#endif // frameworks + void Or_test::test_describe() @@ -86,4 +94,4 @@ } -#endif // HAVE_CPPUNIT + Index: TestFailureMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/TestFailureMatcher_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TestFailureMatcher_test.cpp 27 Nov 2005 17:27:57 -0000 1.9 +++ TestFailureMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.10 @@ -29,34 +29,42 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/TestFailureMatcher.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class TestFailureMatcher_test : public CppUnit::TestFixture +class TestFailureMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( TestFailureMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(TestFailureMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (TestFailureMatcher_test); + +#endif // frameworks + void TestFailureMatcher_test::test_invoke() @@ -92,4 +100,4 @@ } -#endif // HAVE_CPPUNIT + Index: DynamicChainingMockError_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/DynamicChainingMockError_test.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- DynamicChainingMockError_test.cpp 15 Oct 2005 15:40:58 -0000 1.15 +++ DynamicChainingMockError_test.cpp 9 Dec 2005 18:56:20 -0000 1.16 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/DynamicChainingMockError.h> #include <mockpp/chaining/AbstractDynamicChainingMock.h> @@ -42,29 +38,41 @@ #include <mockpp/constraint/ConstraintSet.h> -#include <cppunit/extensions/HelperMacros.h> namespace { -class DynamicChainingMockError_test : public CppUnit::TestFixture +class DynamicChainingMockError_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( DynamicChainingMockError_test ); CPPUNIT_TEST(test_describe); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(DynamicChainingMockError_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (DynamicChainingMockError_test); + +#endif // frameworks + template <typename R, typename I> class AID : public mockpp::AbstractInvocationDispatcher<R, I> @@ -108,4 +116,4 @@ } // namespace -#endif // HAVE_CPPUNIT + Index: AbstractDynamicChainingMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AbstractDynamicChainingMock_test.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- AbstractDynamicChainingMock_test.cpp 27 Nov 2005 17:27:57 -0000 1.33 +++ AbstractDynamicChainingMock_test.cpp 9 Dec 2005 18:56:20 -0000 1.34 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/AbstractDynamicChainingMock.h> #include <mockpp/chaining/InvocationMocker.h> @@ -46,7 +42,6 @@ #include <mockpp/chaining/ChainingMockObjectSupport.h> -#include <cppunit/extensions/HelperMacros.h> typedef mockpp::Invocation0 GetterInvocation; @@ -60,11 +55,15 @@ namespace { -class AbstractDynamicChainingMock_test : public CppUnit::TestFixture +class AbstractDynamicChainingMock_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( AbstractDynamicChainingMock_test ); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + + CPPUNIT_TEST_SUITE( AbstractDynamicChainingMock_test ); CPPUNIT_TEST( test_void_invocation ); CPPUNIT_TEST( test_invocation ); @@ -73,7 +72,9 @@ CPPUNIT_TEST( test_void_describe ); CPPUNIT_TEST( test_verify ); - CPPUNIT_TEST_SUITE_END(); + CPPUNIT_TEST_SUITE_END(); + +#endif public: @@ -86,7 +87,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION( AbstractDynamicChainingMock_test ); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION ( AbstractDynamicChainingMock_test ); + +#endif // frameworks + template <typename R, // Returntype @@ -423,4 +431,4 @@ } // namesspace -#endif // HAVE_CPPUNIT + Index: IsInstanceOf_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsInstanceOf_test.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- IsInstanceOf_test.cpp 27 Nov 2005 15:34:36 -0000 1.14 +++ IsInstanceOf_test.cpp 9 Dec 2005 18:56:20 -0000 1.15 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsInstanceOf.h> @@ -44,10 +40,14 @@ #ifndef MOCKPP_NO_RTTI -class IsInstanceOf_test : public CppUnit::TestFixture +class IsInstanceOf_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( IsInstanceOf_test ); CPPUNIT_TEST(test_invoke); @@ -55,6 +55,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); @@ -62,7 +64,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(IsInstanceOf_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (IsInstanceOf_test); + +#endif // frameworks + class A @@ -139,4 +148,4 @@ #endif // MOCKPP_NO_RTTI -#endif // HAVE_CPPUNIT + Index: ExpectationList_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationList_test.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ExpectationList_test.cpp 13 Nov 2005 11:53:18 -0000 1.17 +++ ExpectationList_test.cpp 9 Dec 2005 18:56:20 -0000 1.18 @@ -29,21 +29,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationList.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class ExpectationList_test : public CppUnit::TestFixture +class ExpectationList_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ExpectationList_test ); CPPUNIT_TEST(test_chain); @@ -69,6 +68,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_expectNothing(); void test_expectNothing_revoked(); @@ -93,7 +94,14 @@ void fail_ifNoActual(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(ExpectationList_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ExpectationList_test); + +#endif // frameworks + void ExpectationList_test::test_chain() @@ -298,4 +306,4 @@ } -#endif // HAVE_CPPUNIT + Index: IsLessThan_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsLessThan_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- IsLessThan_test.cpp 15 Oct 2005 15:40:59 -0000 1.7 +++ IsLessThan_test.cpp 9 Dec 2005 18:56:20 -0000 1.8 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsLessThan.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class IsLessThan_test : public CppUnit::TestFixture +class IsLessThan_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( IsLessThan_test ); CPPUNIT_TEST(test_invoke); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(IsLessThan_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (IsLessThan_test); + +#endif // frameworks + void IsLessThan_test::test_describe() @@ -80,4 +88,4 @@ } -#endif // HAVE_CPPUNIT + Index: ExpectationMap_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationMap_test.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ExpectationMap_test.cpp 26 Nov 2005 17:57:48 -0000 1.17 +++ ExpectationMap_test.cpp 9 Dec 2005 18:56:20 -0000 1.18 @@ -29,21 +29,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationMap.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class ExpectationMap_test : public CppUnit::TestFixture +class ExpectationMap_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ExpectationMap_test ); CPPUNIT_TEST(test_chain); @@ -72,6 +71,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_expectNothing_revoked(); void test_expectNothing(); @@ -99,7 +100,14 @@ void fail_ifNoActual(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(ExpectationMap_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ExpectationMap_test); + +#endif // frameworks + void ExpectationMap_test::test_chain() @@ -356,4 +364,4 @@ } -#endif // HAVE_CPPUNIT + Index: CustomStub_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/CustomStub_test.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- CustomStub_test.cpp 15 Oct 2005 15:40:58 -0000 1.11 +++ CustomStub_test.cpp 9 Dec 2005 18:56:20 -0000 1.12 @@ -29,35 +29,43 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/stub/CustomStub.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class CustomStub_test : public CppUnit::TestFixture +class CustomStub_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( CustomStub_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(CustomStub_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (CustomStub_test); + +#endif // frameworks + template <typename R, // Returntype typename I> // Invocation @@ -85,4 +93,4 @@ } -#endif // HAVE_CPPUNIT + Index: VisitableMockObject_2_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_2_void_test.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- VisitableMockObject_2_void_test.cpp 28 Nov 2005 19:03:09 -0000 1.21 +++ VisitableMockObject_2_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.22 @@ -31,11 +31,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsEqual.h> #include <mockpp/constraint/IsNot.h> @@ -46,12 +42,15 @@ #include <mockpp/ExpectationValue.h> #include <mockpp/VisitableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> -class VisitableMockObject_2_void_test : public CppUnit::TestFixture +class VisitableMockObject_2_void_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( VisitableMockObject_2_void_test ); CPPUNIT_TEST(test_outbound); @@ -73,6 +72,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_outbound(); @@ -94,7 +95,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(VisitableMockObject_2_void_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (VisitableMockObject_2_void_test); + +#endif // frameworks + class MyVisitableMockObject_2_void : public mockpp::VisitableMockObject @@ -421,4 +429,4 @@ } -#endif // HAVE_CPPUNIT + Index: VisitableMockObject_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_test.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- VisitableMockObject_test.cpp 28 Nov 2005 19:03:09 -0000 1.25 +++ VisitableMockObject_test.cpp 9 Dec 2005 18:56:20 -0000 1.26 @@ -31,21 +31,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationValue.h> #include <mockpp/VisitableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> -class VisitableMockObject_test : public CppUnit::TestFixture +class VisitableMockObject_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( VisitableMockObject_test ); CPPUNIT_TEST(test_controller); @@ -70,6 +69,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_controller(); @@ -94,7 +95,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(VisitableMockObject_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (VisitableMockObject_test); + +#endif // frameworks + class MyVisitableMockObject : public mockpp::VisitableMockObject @@ -478,5 +486,5 @@ } -#endif // HAVE_CPPUNIT + Index: Assert_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Assert_test.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Assert_test.cpp 28 Nov 2005 19:03:09 -0000 1.19 +++ Assert_test.cpp 9 Dec 2005 18:56:20 -0000 1.20 @@ -29,20 +29,19 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class Assert_test : public CppUnit::TestFixture +class Assert_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( Assert_test ); CPPUNIT_TEST(test_FalseTrue); @@ -70,6 +69,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void fail_fail(); void fail_failmsg(); @@ -95,7 +96,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(Assert_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (Assert_test); + +#endif // frameworks + void Assert_test::test_macros() @@ -815,5 +823,5 @@ } -#endif // HAVE_CPPUNIT + Index: IsLessOrEqual_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsLessOrEqual_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- IsLessOrEqual_test.cpp 15 Oct 2005 15:40:59 -0000 1.7 +++ IsLessOrEqual_test.cpp 9 Dec 2005 18:56:20 -0000 1.8 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsLessOrEqual.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class IsLessOrEqual_test : public CppUnit::TestFixture +class IsLessOrEqual_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( IsLessOrEqual_test ); CPPUNIT_TEST(test_invoke); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(IsLessOrEqual_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (IsLessOrEqual_test); + +#endif // frameworks + void IsLessOrEqual_test::test_describe() @@ -80,4 +88,4 @@ } -#endif // HAVE_CPPUNIT + Index: MixedMockObject_5_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/MixedMockObject_5_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MixedMockObject_5_test.cpp 26 Nov 2005 17:57:48 -0000 1.7 +++ MixedMockObject_5_test.cpp 9 Dec 2005 18:56:20 -0000 1.8 @@ -31,11 +31,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationValue.h> #include <mockpp/MixedMockObject.h> @@ -49,17 +45,20 @@ #include "classes_ABCDE.h" -#include <cppunit/extensions/HelperMacros.h> //MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(xx) -class MixedMockObject_5_test : public CppUnit::TestFixture +class MixedMockObject_5_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( MixedMockObject_5_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( MixedMockObject_5_test ); CPPUNIT_TEST(test_controller); CPPUNIT_TEST(test_chainer); @@ -67,6 +66,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_controller(); @@ -75,7 +76,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(MixedMockObject_5_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (MixedMockObject_5_test); + +#endif // frameworks + class MyMixedMockObject_5_Interface { @@ -225,4 +233,4 @@ } -#endif // HAVE_CPPUNIT + Index: ChainableMockObject_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_test.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ChainableMockObject_test.cpp 27 Nov 2005 17:27:57 -0000 1.24 +++ ChainableMockObject_test.cpp 9 Dec 2005 18:56:20 -0000 1.25 @@ -31,28 +31,27 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ChainableMockObject.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> -#include <cppunit/extensions/HelperMacros.h> #include "MyBuilderNamespace.h" #include "MyMatchBuilder.h" -class ChainableMockObject_test : public CppUnit::TestFixture +class ChainableMockObject_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( ChainableMockObject_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( ChainableMockObject_test ); CPPUNIT_TEST(test_register); CPPUNIT_TEST(test_after_1); @@ -69,6 +68,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_after_1(); @@ -86,7 +87,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ChainableMockObject_test); + +#endif // frameworks + class MyChainableMockObject : public mockpp::ChainableMockObject @@ -477,5 +485,5 @@ } -#endif // HAVE_CPPUNIT + Index: Invocation_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Invocation_test.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Invocation_test.cpp 26 Nov 2005 17:57:48 -0000 1.20 +++ Invocation_test.cpp 9 Dec 2005 18:56:20 -0000 1.21 @@ -31,22 +31,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/Invocation.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class Invocation_test : public CppUnit::TestFixture +class Invocation_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( Invocation_test ); CPPUNIT_TEST(test_equals0); @@ -64,6 +63,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_equals0(); @@ -81,7 +82,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(Invocation_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (Invocation_test); + +#endif // frameworks + typedef mockpp::Invocation0 Setter0Invocation; @@ -519,4 +527,4 @@ } -#endif // HAVE_CPPUNIT + Index: IsGreaterThan_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsGreaterThan_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- IsGreaterThan_test.cpp 15 Oct 2005 15:40:59 -0000 1.7 +++ IsGreaterThan_test.cpp 9 Dec 2005 18:56:20 -0000 1.8 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsGreaterThan.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class IsGreaterThan_test : public CppUnit::TestFixture +class IsGreaterThan_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( IsGreaterThan_test ); CPPUNIT_TEST(test_describe); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(IsGreaterThan_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (IsGreaterThan_test); + +#endif // frameworks + void IsGreaterThan_test::test_describe() @@ -80,4 +88,4 @@ } -#endif // HAVE_CPPUNIT + Index: NoException_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/NoException_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- NoException_test.cpp 7 Dec 2005 19:48:12 -0000 1.1 +++ NoException_test.cpp 9 Dec 2005 18:56:20 -0000 1.2 @@ -29,32 +29,40 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" -#include <cppunit/extensions/HelperMacros.h> -class NoException_test : public CppUnit::TestFixture +class NoException_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( NoException_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(NoException_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (NoException_test); + +#endif // frameworks + void NoException_test::test_invoke() @@ -62,4 +70,4 @@ } -#endif // HAVE_CPPUNIT + Index: ChainableMockObject_4_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_4_void_test.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChainableMockObject_4_void_test.cpp 27 Nov 2005 17:27:57 -0000 1.12 +++ ChainableMockObject_4_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.13 @@ -31,16 +31,11 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/mockpp_pti.h> #include <mockpp/ChainableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> @@ -48,17 +43,23 @@ #include <mockpp/constraint/OutBound.h> -class ChainableMockObject_4_void_test : public CppUnit::TestFixture +class ChainableMockObject_4_void_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( ChainableMockObject_4_void_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( ChainableMockObject_4_void_test ); CPPUNIT_TEST(test_outbound); CPPUNIT_TEST( test_parameter_4 ); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_outbound(); @@ -66,7 +67,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_4_void_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ChainableMockObject_4_void_test); + +#endif // frameworks + typedef mockpp::Invocation4<unsigned, unsigned, unsigned, unsigned> mockpp_Invocation4_unsigned_unsigned_unsigned_unsigned; @@ -190,4 +198,4 @@ } -#endif // HAVE_CPPUNIT + Index: InvocationMockerBuilder_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMockerBuilder_test.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- InvocationMockerBuilder_test.cpp 18 Oct 2005 20:03:54 -0000 1.30 +++ InvocationMockerBuilder_test.cpp 9 Dec 2005 18:56:20 -0000 1.31 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/builder/InvocationMockerBuilder.h> #include <mockpp/builder/ArgumentsMatchBuilder.h> @@ -49,7 +45,6 @@ #include <mockpp/constraint/IsEqual.h> -#include <cppunit/extensions/HelperMacros.h> #include "classes_ABCDE.h" #include "MyBuilderNamespace.h" @@ -68,11 +63,15 @@ namespace { -class InvocationMockerBuilder_test : public CppUnit::TestFixture +class InvocationMockerBuilder_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( InvocationMockerBuilder_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( InvocationMockerBuilder_test ); CPPUNIT_TEST( test_instance0 ); CPPUNIT_TEST( test_instance5 ); @@ -81,6 +80,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_instance0(); @@ -90,7 +91,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION( InvocationMockerBuilder_test ); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION ( InvocationMockerBuilder_test ); + +#endif // frameworks + template <typename AMB> // ArgumentsMatchBuilder @@ -307,4 +315,4 @@ } // namespace -#endif // HAVE_CPPUNIT + Index: StringContains_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StringContains_test.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- StringContains_test.cpp 26 Nov 2005 17:57:48 -0000 1.11 +++ StringContains_test.cpp 9 Dec 2005 18:56:20 -0000 1.12 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/StringContains.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class StringContains_test : public CppUnit::TestFixture +class StringContains_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( StringContains_test ); CPPUNIT_TEST(test_invoke); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(StringContains_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (StringContains_test); + +#endif // frameworks + void StringContains_test::test_describe() @@ -79,4 +87,4 @@ } -#endif // HAVE_CPPUNIT + Index: InvokeAtLeastOnceMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvokeAtLeastOnceMatcher_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- InvokeAtLeastOnceMatcher_test.cpp 27 Nov 2005 17:27:57 -0000 1.9 +++ InvokeAtLeastOnceMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.10 @@ -29,33 +29,41 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/InvokeAtLeastOnceMatcher.h> -#include <cppunit/extensions/HelperMacros.h> -class InvokeAtLeastOnceMatcher_test : public CppUnit::TestFixture +class InvokeAtLeastOnceMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( InvokeAtLeastOnceMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(InvokeAtLeastOnceMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (InvokeAtLeastOnceMatcher_test); + +#endif // frameworks + void InvokeAtLeastOnceMatcher_test::test_invoke() @@ -108,4 +116,4 @@ } -#endif // HAVE_CPPUNIT + Index: ExpectationSet_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationSet_test.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ExpectationSet_test.cpp 13 Nov 2005 11:53:18 -0000 1.15 +++ ExpectationSet_test.cpp 9 Dec 2005 18:56:20 -0000 1.16 @@ -29,21 +29,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationSet.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class ExpectationSet_test : public CppUnit::TestFixture +class ExpectationSet_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ExpectationSet_test ); CPPUNIT_TEST(test_hasExpectations); @@ -68,6 +67,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_expectNothing(); void test_expectNothing_revoked(); @@ -91,7 +92,14 @@ void fail_ifNoActual(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(ExpectationSet_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ExpectationSet_test); + +#endif // frameworks + void ExpectationSet_test::test_chain() @@ -282,4 +290,4 @@ } -#endif // HAVE_CPPUNIT + Index: ChainableMockObject_1_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_1_void_test.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockObject_1_void_test.cpp 27 Nov 2005 17:27:57 -0000 1.15 +++ ChainableMockObject_1_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.16 @@ -31,16 +31,11 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/mockpp_pti.h> #include <mockpp/ChainableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> @@ -53,17 +48,23 @@ MOCKPP_PTI_IMPLEMENT(TheInvocation) -class ChainableMockObject_1_void_test : public CppUnit::TestFixture +class ChainableMockObject_1_void_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( ChainableMockObject_1_void_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( ChainableMockObject_1_void_test ); CPPUNIT_TEST(test_outbound); CPPUNIT_TEST( test_parameter_1 ); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_outbound(); @@ -72,7 +73,14 @@ -CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_1_void_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ChainableMockObject_1_void_test); + +#endif // frameworks + class MyChainableMockObject_1_void : public mockpp::ChainableMockObject @@ -180,4 +188,4 @@ } -#endif // HAVE_CPPUNIT + Index: ChainableMockMethod_2_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockMethod_2_test.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ChainableMockMethod_2_test.cpp 27 Nov 2005 17:27:57 -0000 1.10 +++ ChainableMockMethod_2_test.cpp 9 Dec 2005 18:56:20 -0000 1.11 @@ -31,11 +31,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/ChainableMockMethod.h> #include <mockpp/chaining/ChainableMockMethod0.h> @@ -52,22 +48,27 @@ #include "IncCounter.h" -#include <cppunit/extensions/HelperMacros.h> namespace { // anon -class ChainableMockMethod_2_test : public CppUnit::TestFixture +class ChainableMockMethod_2_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( ChainableMockMethod_2_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( ChainableMockMethod_2_test ); CPPUNIT_TEST( test_parameter_2 ); CPPUNIT_TEST( test_parameter_2v ); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_parameter_2(); @@ -75,7 +76,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockMethod_2_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ChainableMockMethod_2_test); + +#endif // frameworks + class MyChainableMockObject_2 : public mockpp::ChainableMockObject @@ -185,5 +193,5 @@ } // anon ns -#endif // HAVE_CPPUNIT + Index: InvokedAfterMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvokedAfterMatcher_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- InvokedAfterMatcher_test.cpp 27 Nov 2005 17:27:57 -0000 1.9 +++ InvokedAfterMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.10 @@ -29,33 +29,41 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/InvokedAfterMatcher.h> -#include <cppunit/extensions/HelperMacros.h> -class InvokedAfterMatcher_test : public CppUnit::TestFixture +class InvokedAfterMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( InvokedAfterMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(InvokedAfterMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (InvokedAfterMatcher_test); + +#endif // frameworks + void InvokedAfterMatcher_test::test_invoke() @@ -101,4 +109,4 @@ } -#endif // HAVE_CPPUNIT + Index: InvokeOnceMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvokeOnceMatcher_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- InvokeOnceMatcher_test.cpp 27 Nov 2005 17:27:57 -0000 1.9 +++ InvokeOnceMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.10 @@ -29,33 +29,41 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/InvokeOnceMatcher.h> -#include <cppunit/extensions/HelperMacros.h> -class InvokeOnceMatcher_test : public CppUnit::TestFixture +class InvokeOnceMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( InvokeOnceMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(InvokeOnceMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (InvokeOnceMatcher_test); + +#endif // frameworks + void InvokeOnceMatcher_test::test_invoke() @@ -108,4 +116,4 @@ } -#endif // HAVE_CPPUNIT + Index: ChainableMockObject_3_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_3_void_test.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChainableMockObject_3_void_test.cpp 27 Nov 2005 17:27:57 -0000 1.12 +++ ChainableMockObject_3_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.13 @@ -31,16 +31,11 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/mockpp_pti.h> #include <mockpp/ChainableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> @@ -48,17 +43,23 @@ #include <mockpp/constraint/OutBound.h> -class ChainableMockObject_3_void_test : public CppUnit::TestFixture +class ChainableMockObject_3_void_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: - CPPUNIT_TEST_SUITE( ChainableMockObject_3_void_test ); + #if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE( ChainableMockObject_3_void_test ); CPPUNIT_TEST(test_outbound); CPPUNIT_TEST( test_parameter_3 ); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_outbound(); @@ -66,7 +67,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_3_void_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ChainableMockObject_3_void_test); + +#endif // frameworks + typedef mockpp::Invocation3<unsigned, unsigned, unsigned> mockpp_Invocation3_unsigned_unsigned_unsigned; @@ -186,4 +194,4 @@ } -#endif // HAVE_CPPUNIT + Index: VoidStub_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VoidStub_test.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- VoidStub_test.cpp 15 Oct 2005 15:40:59 -0000 1.11 +++ VoidStub_test.cpp 9 Dec 2005 18:56:20 -0000 1.12 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/stub/VoidStub.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class VoidStub_test : public CppUnit::TestFixture +class VoidStub_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( VoidStub_test ); CPPUNIT_TEST(test_describe); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(VoidStub_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (VoidStub_test); + +#endif // frameworks + void VoidStub_test::test_describe() @@ -81,4 +89,4 @@ } -#endif // HAVE_CPPUNIT + Index: ExpectationCounter_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationCounter_test.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ExpectationCounter_test.cpp 13 Nov 2005 11:53:18 -0000 1.14 +++ ExpectationCounter_test.cpp 9 Dec 2005 18:56:20 -0000 1.15 @@ -30,21 +30,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationCounter.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class ExpectationCounter_test : public CppUnit::TestFixture +class ExpectationCounter_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ExpectationCounter_test ); CPPUNIT_TEST(test_hasExpectations); @@ -66,6 +65,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_expectNothing(); void test_expectNothing_revoked(); @@ -89,7 +90,14 @@ void doActualVerify(mockpp::ExpectationCounter &ec); }; -CPPUNIT_TEST_SUITE_REGISTRATION(ExpectationCounter_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ExpectationCounter_test); + +#endif // frameworks + void ExpectationCounter_test::test_name() @@ -242,4 +250,4 @@ } -#endif // HAVE_CPPUNIT + Index: OutBound_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/OutBound_test.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- OutBound_test.cpp 15 Oct 2005 15:40:59 -0000 1.2 +++ OutBound_test.cpp 9 Dec 2005 18:56:20 -0000 1.3 @@ -29,20 +29,19 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/OutBound.h> -#include <cppunit/extensions/HelperMacros.h> -class OutBound_test : public CppUnit::TestFixture +class OutBound_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( OutBound_test ); CPPUNIT_TEST(test_describe); @@ -50,6 +49,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); @@ -57,7 +58,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(OutBound_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (OutBound_test); + +#endif // frameworks + void OutBound_test::test_describe() @@ -82,4 +90,4 @@ } -#endif // HAVE_CPPUNIT + Index: ResponseVector_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ResponseVector_test.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ResponseVector_test.cpp 28 Nov 2005 19:03:09 -0000 1.5 +++ ResponseVector_test.cpp 9 Dec 2005 18:56:20 -0000 1.6 @@ -29,22 +29,21 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/VisitableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> -class ResponseVector_Test : public CppUnit::TestFixture +class ResponseVector_Test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ResponseVector_Test ); CPPUNIT_TEST(test_value); @@ -52,6 +51,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_value(); @@ -59,7 +60,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(ResponseVector_Test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ResponseVector_Test); + +#endif // frameworks + void ResponseVector_Test::test_value() @@ -152,5 +160,5 @@ } -#endif // HAVE_CPPUNIT + Index: ExpectationConglomeration_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationConglomeration_test.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ExpectationConglomeration_test.cpp 13 Nov 2005 11:53:18 -0000 1.13 +++ ExpectationConglomeration_test.cpp 9 Dec 2005 18:56:20 -0000 1.14 @@ -29,21 +29,20 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/ExpectationConglomeration.h> #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class ExpectationConglomeration_test : public CppUnit::TestFixture +class ExpectationConglomeration_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( ExpectationConglomeration_test ); CPPUNIT_TEST(test_hasExpectations); @@ -69,6 +68,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_expectNothing(); void test_expectNothing_revoked(); @@ -93,7 +94,14 @@ void fail_ifNoActual(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(ExpectationConglomeration_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (ExpectationConglomeration_test); + +#endif // frameworks + void ExpectationConglomeration_test::test_chain() @@ -312,4 +320,4 @@ } -#endif // HAVE_CPPUNIT + Index: NoArgumentsMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/NoArgumentsMatcher_test.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- NoArgumentsMatcher_test.cpp 15 Oct 2005 15:40:59 -0000 1.10 +++ NoArgumentsMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.11 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/NoArgumentsMatcher.h> @@ -41,25 +37,37 @@ #include <mockpp/compat/Assert.h> -#include <cppunit/extensions/HelperMacros.h> -class NoArgumentsMatcher_test : public CppUnit::TestFixture +class NoArgumentsMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE(NoArgumentsMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(NoArgumentsMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (NoArgumentsMatcher_test); + +#endif // frameworks + void NoArgumentsMatcher_test::test_invoke() @@ -83,4 +91,4 @@ } -#endif // HAVE_CPPUNIT + Index: InvokeAtMostMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvokeAtMostMatcher_test.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- InvokeAtMostMatcher_test.cpp 27 Nov 2005 17:27:57 -0000 1.8 +++ InvokeAtMostMatcher_test.cpp 9 Dec 2005 18:56:20 -0000 1.9 @@ -29,33 +29,41 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/matcher/InvokeAtMostMatcher.h> -#include <cppunit/extensions/HelperMacros.h> -class InvokeAtMostMatcher_test : public CppUnit::TestFixture +class InvokeAtMostMatcher_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( InvokeAtMostMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_invoke(); }; -CPPUNIT_TEST_SUITE_REGISTRATION(InvokeAtMostMatcher_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (InvokeAtMostMatcher_test); + +#endif // frameworks + void InvokeAtMostMatcher_test::test_invoke() @@ -110,4 +118,4 @@ } -#endif // HAVE_CPPUNIT + Index: VisitableMockObject_4_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_4_test.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- VisitableMockObject_4_test.cpp 28 Nov 2005 19:03:09 -0000 1.20 +++ VisitableMockObject_4_test.cpp 9 Dec 2005 18:56:20 -0000 1.21 @@ -31,11 +31,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/ChainingMockObjectSupport.h> @@ -46,12 +42,15 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/util/AssertMo.h> -#include <cppunit/extensions/HelperMacros.h> -class VisitableMockObject_4_test : public CppUnit::TestFixture +class VisitableMockObject_4_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( VisitableMockObject_4_test ); CPPUNIT_TEST(test_controller); @@ -80,6 +79,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_controller(); @@ -108,7 +109,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(VisitableMockObject_4_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (VisitableMockObject_4_test); + +#endif // frameworks + class MyVisitableMockObject_4 : public mockpp::VisitableMockObject @@ -695,4 +703,4 @@ } -#endif // HAVE_CPPUNIT + Index: VisitableMockObject_3_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_3_void_test.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- VisitableMockObject_3_void_test.cpp 28 Nov 2005 19:03:09 -0000 1.20 +++ VisitableMockObject_3_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.21 @@ -31,11 +31,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/constraint/IsEqual.h> #include <mockpp/constraint/IsNot.h> @@ -46,12 +42,15 @@ #include <mockpp/ExpectationValue.h> #include <mockpp/VisitableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> -class VisitableMockObject_3_void_test : public CppUnit::TestFixture +class VisitableMockObject_3_void_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( VisitableMockObject_3_void_test ); CPPUNIT_TEST(test_outbound); @@ -73,6 +72,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_outbound(); @@ -94,7 +95,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(VisitableMockObject_3_void_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (VisitableMockObject_3_void_test); + +#endif // frameworks + class MyVisitableMockObject_3_void : public mockpp::VisitableMockObject @@ -438,4 +446,4 @@ } -#endif // HAVE_CPPUNIT + Index: StubSequence_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StubSequence_test.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- StubSequence_test.cpp 27 Nov 2005 17:27:57 -0000 1.16 +++ StubSequence_test.cpp 9 Dec 2005 18:56:20 -0000 1.17 @@ -29,11 +29,7 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include MOCKPP_VECTOR_H @@ -43,12 +39,15 @@ #include <mockpp/chaining/ChainingMockObjectSupport.h> -#include <cppunit/extensions/HelperMacros.h> -class StubSequence_test : public CppUnit::TestFixture +class StubSequence_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK { public: +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + CPPUNIT_TEST_SUITE( StubSequence_test ); CPPUNIT_TEST(test_invoke); @@ -56,6 +55,8 @@ CPPUNIT_TEST_SUITE_END(); +#endif + public: void test_describe(); @@ -63,7 +64,14 @@ }; -CPPUNIT_TEST_SUITE_REGISTRATION(StubSequence_test); +#if defined (HAVE_CXXTEST) + +#elif defined(HAVE_CPPUNIT) + +CPPUNIT_TEST_SUITE_REGISTRATION (StubSequence_test); + +#endif // frameworks + void StubSequence_test::test_describe() @@ -124,4 +132,4 @@ } -#endif // HAVE_CPPUNIT + Index: SelectFramework.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/SelectFramework.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SelectFramework.h 9 Dec 2005 15:55:36 -0000 1.1 +++ SelectFramework.h 9 Dec 2005 18:56:20 -0000 1.2 @@ -27,6 +27,9 @@ * ***************************************************************************/ +#ifndef MOCKPP_SELECTFRAMEWORK_H +#define MOCKPP_SELECTFRAMEWORK_H + #if defined(HAVE_CXXTEST) # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/ @@ -41,4 +44,6 @@ # pragma message ("No unittest framework available at compile time") # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /**/ -#endif // HAVE_CPPUNIT +#endif // frameworks + +#endif // MOCKPP_SELECTFRAMEWORK_H Index: ChainableMockObject_2_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_2_void_test.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChainableMockObject_2_void_test.cpp 27 Nov 2005 17:27:57 -0000 1.12 +++ ChainableMockObject_2_void_test.cpp 9 Dec 2005 18:56:20 -0000 1.13 @@ -31,16 +31,11 @@ #include <mockpp/mockpp.h> // always first -#ifndef HAVE_CPPUNIT - -# warning CppUnit not available at compile time - -#else +#include "SelectFramework.h" #include <mockpp/chaining/mockpp_pti.h> #include <mockpp/ChainableMockObject.h> -#include <cppunit/extensions/HelperMacros.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> @@ -48,17 +43,23 ... [truncated message content] |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 16:19:26
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4161/3party/cxxtest/docs Added Files: .cvsignore Makefile.am Log Message: new --- NEW FILE: .cvsignore --- Makefile.in --- NEW FILE: Makefile.am --- |
|
From: Ewald A. <ewa...@us...> - 2005-12-09 16:19:26
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4161/3party/cxxtest Added Files: .cvsignore Makefile.am README.mockpp Log Message: new --- NEW FILE: .cvsignore --- samples Makefile.in --- NEW FILE: README.mockpp --- This directory contains CxxTest 3.10.1 (2004-12-01). Oriinal location was http://cxxtest.sf.net It is slightly modified to better work with mockpp. But shouldstill be possible to work with it as intended originally. The changes are: - make a library out of the *.cpp files. - omit samples directory --- NEW FILE: Makefile.am --- SUBDIRS = cxxtest |