[Cppunit-cvs] cppunit2/include/cpput extendeddata.h, 1.2, 1.3 test.h, 1.11, 1.12
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2006-09-03 07:15:56
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31858/include/cpput Modified Files: extendeddata.h test.h Log Message: - added support to declare test case association to a given group in test fixture. Index: test.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/test.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** test.h 11 Nov 2005 23:23:48 -0000 1.11 --- test.h 3 Sep 2006 07:15:49 -0000 1.12 *************** *** 54,57 **** --- 54,72 ---- } + void addToGroup( const std::string &groupName ) + { + info_["configuration"]["groups"].append( groupName ); + } + + int groupCount() const + { + return info_["configuration"]["groups"].size(); + } + + std::string groupAt( unsigned int index ) const + { + return info_["configuration"]["groups"][index].asString(); + } + /// @warning You must never change the name of the test after /// registering the test or scheduling it for running. Index: extendeddata.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/extendeddata.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extendeddata.h 11 Nov 2005 23:23:48 -0000 1.2 --- extendeddata.h 3 Sep 2006 07:15:49 -0000 1.3 *************** *** 127,130 **** --- 127,144 ---- /*! \ingroup group_testfixture */ + class CPPUT_API GroupData : public TestExtendedData + { + public: + GroupData( const std::string &groupName ); + + public: // overridden from TestExtendedData + void apply( Test &test ) const; + private: + std::string groupName_; + }; + + + /*! \ingroup group_testfixture + */ class CPPUT_API TestExtendedDataFactory { *************** *** 137,140 **** --- 151,156 ---- static DependenciesData depends( const std::string &dependencies ); + + static GroupData group( const std::string &groupName ); }; |