[Mockpp-commits] mockpp/mockpp/framework CxxTestRunner.h,1.4,1.5 CxxTestSupport.h,1.2,1.3 SelectUnit
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2006-01-03 15:12:49
|
Update of /cvsroot/mockpp/mockpp/mockpp/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4137/mockpp/framework Modified Files: CxxTestRunner.h CxxTestSupport.h SelectUnittestFramework.h VerifyingTestCaller.h VerifyingTestCase.h Log Message: fix docs Index: CxxTestRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/CxxTestRunner.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CxxTestRunner.h 30 Dec 2005 14:18:30 -0000 1.4 +++ CxxTestRunner.h 3 Jan 2006 15:12:34 -0000 1.5 @@ -43,6 +43,7 @@ /** Helper class to run tests with CxxTest framework. + * @ingroup grp_framework */ class CxxTestRunner : public CxxTest::TestRunner { Index: VerifyingTestCaller.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/VerifyingTestCaller.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- VerifyingTestCaller.h 29 Dec 2005 19:29:51 -0000 1.4 +++ VerifyingTestCaller.h 3 Jan 2006 15:12:34 -0000 1.5 @@ -47,6 +47,7 @@ /** VerifyingTestCaller that verifies Verifiable * fields and registered Verifiable objects after the test has run and before the fixture * has been torn down. + * @ingroup grp_framework * @ingroup grp_basic_mo * @ingroup grp_advanced_mo */ Index: VerifyingTestCase.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/VerifyingTestCase.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- VerifyingTestCase.h 29 Dec 2005 19:29:51 -0000 1.4 +++ VerifyingTestCase.h 3 Jan 2006 15:12:34 -0000 1.5 @@ -51,6 +51,7 @@ /** TestCase that verifies Verifiable * fields and registered Verifiable objects after the test has run and before the fixture * has been torn down. + * @ingroup grp_framework * @ingroup grp_basic_mo * @ingroup grp_advanced_mo */ Index: SelectUnittestFramework.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/SelectUnittestFramework.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- SelectUnittestFramework.h 1 Jan 2006 19:40:36 -0000 1.10 +++ SelectUnittestFramework.h 3 Jan 2006 15:12:34 -0000 1.11 @@ -30,6 +30,51 @@ #ifndef MOCKPP_SELECTUNITTESTFRAMEWORK_H #define MOCKPP_SELECTUNITTESTFRAMEWORK_H +/** @defgroup grp_framework Support for test frameworks. + * Mockpp as no test framework of its own. For that reason + * there is support for various existing test frameworks. + */ + +/** @def MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK + * @ingroup grp_framework + * Contains a code fragment to create a test suite that contains + * one or more test cases which are arranged as class methods. + * This is done by publicly deriving from an according class of + * the test framework. + * For frameworks that don't support this, the macro is empty. + */ + +/** @def MOCKPP_TESTMETHOD_DECL + * @ingroup grp_framework + * Depending on the test framework the test methods are + * regular class methods or rather static to react like free + * functions. So this macro is used to declare the methods accordingly. + */ + +#ifdef DOXYGEN +#define MOCKPP_USE_CXXTEST +#define MOCKPP_USE_CPPUNIT +#define MOCKPP_USE_BOOSTTEST +#endif + +/** @def MOCKPP_USE_CXXTEST + * @ingroup grp_framework + * @ingroup grp_config + * Defined if CxxTest is used as framework. + */ + +/** @def MOCKPP_USE_CPPUNIT + * @ingroup grp_framework + * @ingroup grp_config + * Defined if CppUnit is used as framework. + */ + +/** @def MOCKPP_USE_BOOSTTEST + * @ingroup grp_framework + * @ingroup grp_config + * Defined if Boost.Test is used as framework. + */ + //================================================= #if defined(MOCKPP_USE_CXXTEST) //================================================= @@ -75,7 +120,12 @@ # define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK /* : public boost::test_case */ -// this is a part of boost macro BOOST_AUTO_UNIT_TEST +/** Register a method as test. + * The content of this macro is a part of boost macro + * BOOST_AUTO_UNIT_TEST + * @ingroup grp_framework + * @param funcname name of the free function or static class method. + */ # define MOCKPP_BOOST_TEST(func_name) \ static boost::unit_test_framework::detail::auto_unit_test_registrar \ BOOST_JOIN( test_registrar, __LINE__) \ Index: CxxTestSupport.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/CxxTestSupport.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CxxTestSupport.h 29 Dec 2005 19:29:51 -0000 1.2 +++ CxxTestSupport.h 3 Jan 2006 15:12:34 -0000 1.3 @@ -33,6 +33,10 @@ //////////////////////////////////////////////////////////////////////////// // +/** Register a class with methods as a test suite. + * @ingroup grp_framework + * @param classname name of the class + */ #define MOCKPP_CXXTEST_SUITE_REGISTRATION(classname) \ static classname suite_ ## classname; \ \ @@ -47,6 +51,11 @@ //////////////////////////////////////////////////////////////////////////// // +/** Register a method as test. + * @ingroup grp_framework + * @param classname name of the class + * @param meth name of the method + */ #define MOCKPP_CXXTEST(classname, meth) \ static class TestDescription_ ## classname ## _ ## meth \ : public CxxTest::RealTestDescription { \ |