[Cppunit-cvs] cppunit2/include/cpput test.h,1.3,1.4
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2004-11-20 16:17:48
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31110/include/cpput Modified Files: test.h Log Message: * added support for test descriptive data Index: test.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/test.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test.h 17 Nov 2004 21:47:09 -0000 1.3 --- test.h 20 Nov 2004 16:17:32 -0000 1.4 *************** *** 3,6 **** --- 3,7 ---- # include <cpput/forwards.h> + # include <opentest/properties.h> # include <string> *************** *** 23,27 **** std::string name() const { ! return name_; } --- 24,28 ---- std::string name() const { ! return info().getValue( "configuration/name", "" ).asString(); } *************** *** 30,34 **** void setName( const std::string &name ) { ! name_ = name; } --- 31,47 ---- void setName( const std::string &name ) { ! info()["configuration/name"] = name; ! } ! ! OpenTest::PropertiesAccessor info() const ! { ! return info_.accessor(); ! } ! ! /// @warning You must never change the name of the test after ! /// registering the test or scheduling it for running. ! OpenTest::Properties &info() ! { ! return info_; } *************** *** 47,59 **** Test() { } Test( const std::string &name ) - : name_( name ) { } private: ! std::string name_; }; --- 60,73 ---- Test() { + setName( "<undefined>" ); } Test( const std::string &name ) { + setName( name ); } private: ! OpenTest::Properties info_; }; |