Update of /cvsroot/cppunit/cppunit2/include/cpput
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/include/cpput
Modified Files:
assertenum.h stringize.h test.h
Log Message:
- replaced usage of OpenTest::Properties with Json::Value.
Json::Value provides a simpler interface and a standard *simple* serialization
format.
- jsoncpp has been inlined in CppTL to make deploy easier and remove
an external dependency.
Index: test.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/include/cpput/test.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test.h 6 Aug 2005 22:24:53 -0000 1.7
--- test.h 7 Nov 2005 22:43:07 -0000 1.8
***************
*** 30,39 ****
CppTL::ConstString description() const
{
! return info().getValue("configuration/description", "" ).asString();
}
CppTL::ConstString name() const
{
! return info().getValue( "configuration/name", "" ).asString();
}
--- 30,39 ----
CppTL::ConstString description() const
{
! return info_.get("configuration/description", "" ).asConstString();
}
CppTL::ConstString name() const
{
! return info_.get( "configuration/name", "" ).asConstString();
}
***************
*** 45,49 ****
double timeOut() const
{
! return info().getValue( "configuration/timeOut", 0.0 ).asReal();
}
--- 45,49 ----
double timeOut() const
{
! return info_.get( "configuration/timeOut", 0.0 ).asDouble();
}
***************
*** 52,69 ****
void setName( const CppTL::ConstString &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_;
! }
/// Returns \c true if the class is derived from AbstractTestSuite.
--- 52,69 ----
void setName( const CppTL::ConstString &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_;
! //}
/// Returns \c true if the class is derived from AbstractTestSuite.
Index: assertenum.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/include/cpput/assertenum.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** assertenum.h 6 Sep 2005 07:18:48 -0000 1.8
--- assertenum.h 7 Nov 2005 22:43:07 -0000 1.9
***************
*** 28,32 ****
struct DeRefComparator
{
! bool operator()( AType *a, BType *b ) const
{
return a == b ||
--- 28,32 ----
struct DeRefComparator
{
! bool operator()( const AType *a, const BType *b ) const
{
return a == b ||
***************
*** 35,38 ****
--- 35,48 ----
};
+ template<class AType
+ ,class BType>
+ struct RefComparator
+ {
+ bool operator()( AType a, BType b ) const
+ {
+ return equalityTest( a, b );
+ }
+ };
+
# ifndef CPPUT_NO_DEFAULT_ENUM_ITEM_STRINGIZE
template<typename ItemType>
Index: stringize.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/include/cpput/stringize.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** stringize.h 6 Sep 2005 07:31:42 -0000 1.7
--- stringize.h 7 Nov 2005 22:43:07 -0000 1.8
***************
*** 46,49 ****
--- 46,67 ----
};
+ template<class ValueType>
+ struct RefStringizer
+ {
+ std::string operator()( ValueType value ) const
+ {
+ return stringize( value );
+ }
+ };
+
+ template<class ValueType>
+ struct DerefStringizer
+ {
+ std::string operator()( ValueType value ) const
+ {
+ return stringize( *value );
+ }
+ };
+
// ------------------- convertToString -------------------------------
// User should overload getStdString() to support their own string types.
|