cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 3)
Brought to you by:
blep
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(94) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(114) |
Mar
(80) |
Apr
|
May
|
Jun
(36) |
Jul
(67) |
Aug
(37) |
Sep
(33) |
Oct
(28) |
Nov
(91) |
Dec
(16) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
(45) |
Apr
|
May
|
Jun
(36) |
Jul
(7) |
Aug
|
Sep
(32) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
(29) |
Feb
(11) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(13) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(15) |
From: Baptiste L. <bl...@us...> - 2007-08-19 20:13:28
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1355/include/cpptl Modified Files: typeinfo.h Added Files: value.h Log Message: In progress of adding CppTL::Value to replace CppTL::Any in table fixture and input based fixture. Value allows optionaly comparison, conversion to other type, conversion to string... --- NEW FILE: value.h --- #ifndef CPPTL_VALUE_H_INCLUDED # define CPPTL_VALUE_H_INCLUDED # include "forwards.h" /* * need a new Any supporting feature required for unit testing: - toString (toJson?) - type to text (for conversion error message) - equality comparison test (input fixture) - support for basic types - support for string types - support for unknown aggregate types. - conversion between type (int, uint, const char *, std::string...) - type comparison */ namespace CppTL { class Value; // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class ValueType // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// class ValueType { public: static ValueType typeInt; static ValueType typeUInt; static ValueType typeDouble; static ValueType typeString; static ValueType typeCString; void clear() { memset( this, 0, sizeof(ValueType) ); } // Notes: clone & initialize seems similar void (*initialize_)( const void *data, Value &target ); /// \param source is uninitialized. data_ must be initialized after call. /// \param target is guaranted to be of the same type as \c source. void (*clone_)( const Value &source, Value &target ); void (*destroy_)( Value &target ); ConstCharView (*typeToString_)(); ConstCharView (*valueToString_)(); void (*convertTo_)( const Value &source, Value &target ); /// \param a, b Guaranted to be of the same ValueType. /// \param canCompare [In/Out] Must be set to \c false if value can not be compared. /// Left unchanged otherwise (\c true). int (*compare_)( const Value &a, const Value &b, bool &canCompare ); /// \param a, b Guaranted to be of the same ValueType. /// \param canCompare [In/Out] Must be set to \c false if value can not be compared. /// Left unchanged otherwise (\c true). bool (*less_)( const Value &a, const Value &b, bool &canCompare ); /// \param a, b Guaranted to be of the same ValueType. /// \param canCompare [In/Out] Must be set to \c false if value can not be compared. /// Left unchanged otherwise (\c true). bool (*equal_)( const Value &a, const Value &b, bool &canCompare ); // ? was used for conversion I think. void (*rawData_)( Value &value ); }; // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class Value // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// typedef LargestInt ValueInt; typedef LargestUnsignedInt ValueUInt; typedef char ValueDataBuffer[24]; union ValueData { //ValueInt int_; //ValueUInt uint_; //double double_; ValueDataBuffer string_; void *other_; }; struct NoneValueTypeTag { }; class ValueException : public std::runtime_error { public: enum Cause { notSameType = 1 }; ValueException( Cause cause, const char *message, const ValueType *lhs, const ValueType *rhs ) : std::runtime_error( "Can not proceed. ValueType are not compatible" ) , lhs_( lhs ) , rhs_( rhs ) { } const ValueType * const lhs_; const ValueType * const rhs_; }; /// @todo Makes a predicate to make value strictly ordered (by type, then value). Requires comparable. /// @todo optimize operator == & operator != class Value { public: typedef ValueInt Int; typedef ValueUInt UInt; Value(); Value( const ValueType &type, const void *data ); Value( const Value &other ) { type_ = other.type_; type_->clone_( other, *this ); } ~Value() { if ( type_->destroy_ ) type_->destroy_( *this ); } Value &operator =( const Value &other ) { if( &other != this ) { if ( type_->destroy_ ) type_->destroy_( *this ); type_ = other.type_; type_->clone_( other, *this ); } return *this; } bool isNone() const; bool isInt() const; bool isUInt() const; bool isDouble() const; bool isString() const; Int asInt() const; UInt asUInt() const; double asDouble() const; ConstCharView asString() const; bool convertTo( const ValueType &targetType, Value &other ) const { return false; } /*! \brief Compares with other value. * Attempts to compare this value with \c other value. Only value of same type can be * compared unless \c allowAutoConvert is \c true. * Comparison attempts to use the following ValueType functions: * - compare_ * - less_ * - equal_ (only used as a possible optimization when using less_). * * \param other Value this value is compared to. If it is of a different type, * and \c allowAutoConvert is \c true then other will be converted * converted to this type first. * \param canCompare [Output] If \c true indicates that the values were * successfully compared, otherwise comparison was not possible * and the comparison result is not valid. * \param allowAutoConvert Indicates if an automatic conversion should be attempted * if values are of different types. * \return Only valid if \c canCompare is \c true. Basicaly equivalent to *this - other: * - < 0 : *this < other * - == 0 : *this == other * - > 0 : *this > other */ int compare( const Value &other, bool &canCompare, bool allowAutoConvert = true ) const { if ( type_ != other.type_ ) { Value otherSameType; if ( other.convertTo( *type_, otherSameType ) ) return compare( otherSameType, canCompare ); } else if ( type_->compare_ ) { canCompare = true; return type_->compare_( *this, other, canCompare ); } else if ( type_->less_ ) { canCompare = true; bool lhsLessThanRhs = type_->less_( *this, other, canCompare ); if ( lhsLessThanRhs ) return -1; if ( canCompare && type_->equal_ ) return type_->equal_( *this, other, canCompare ) ? 0 : 1; if ( canCompare ) return type_->less_( other, *this, canCompare ) ? 1 : 0; return 0; } canCompare = false; return 0; } /// \exception If value are of distinct types. bool operator <( const Value &other ) const; /// \exception If value are of distinct types. bool operator <=( const Value &other ) const; /// \exception If value are of distinct types. bool operator ==( const Value &other ) const; /// \exception If value are of distinct types. bool operator !=( const Value &other ) const; /// \exception If value are of distinct types. bool operator >=( const Value &other ) const; /// \exception If value are of distinct types. bool operator >( const Value &other ) const; public: /// Internal data, should only be used by ValueType function implementation. ValueData data_; private: const ValueType *type_; }; // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // Value, free functions // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// /* * Notes: user can provides a specific implementation by overloding getValueType() for a given * type. * inline const ValueType &getValueType( const Type<T> & ) */ #ifdef CPPTL_NO_FUNCTION_TEMPLATE_ORDERING struct HasDefaultValueTypeHelper { }; inline HasDefaultValueTypeHelper getValueType( ... ) { return HasDefaultValueTypeHelper(); } template<class T> inline const ValueType &getValueTypeSelector( const ValueType &valueType, const Type<T> &type ) { return valueType; } template<class T> inline const ValueType &getValueTypeSelector( const Type<T> &type ) { return getValueTypeHelper( getValueType(), type ); } # define CPPTL_GET_VALUE_TYPE( AType ) ::CppTL::getValueTypeSelector( ::CppTL::Type<AType>() ) # else # define CPPTL_GET_VALUE_TYPE( AType ) ::CppTL::getValueType( ::CppTL::Type<AType>() ) # endif template<typename TargetValueType> void initialize( Value &value, Type<TargetValueType> ) { } template<typename TargetValueType> Value initialize( Type<TargetValueType> ) { } template<typename TargetValueType> Value makeValue( const TargetValueType &value ) { const ValueType &type = CPPTL_GET_VALUE_TYPE( TargetValueType ); return Value( type, &value ); } template<typename TargetValueType> void makeValue( Value &value, const TargetValueType &initialValue ) { } template<typename TargetValueType> const TargetValueType &any_cast( const Value &value, Type<TargetValueType> ) { } template<typename TargetValueType> TargetValueType &any_cast( Value &value, Type<TargetValueType> ) { } template<typename TargetValueType> const TargetValueType *any_cast( const Value *value, Type<TargetValueType> ) { } template<typename TargetValueType> TargetValueType *any_cast( Value *value, Type<TargetValueType> ) { } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // namespace ValueTypeHelper // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// namespace ValueTypeHelper { /// Allocate DataType dynamically. template<typename DataType,const bool> class StorageHelper { public: static DataType &data( Value &value ) { return *static_cast<DataType *>( value.data_.other_ ); } static const DataType &data( const Value &value ) { return *static_cast<const DataType *>( value.data_.other_ ); } static void initialize( const void *data, Value &target ) { target.data_.other_ = new DataType( *static_cast<const DataType *>( data ) ); } static void clone( const Value &source, Value &target ) { target.data_.other_ = new DataType( data(source) ); } static void destroy( Value &target ) { delete target.data_.other_; } }; /// Store DataType in string buffer if it fit in. template<typename DataType> class StorageHelper<DataType,true> { public: static DataType &data( Value &value ) { return *(DataType *)( value.data_.string_ ); } static const DataType &data( const Value &value ) { return *(const DataType *)( value.data_.string_ ); } static void initialize( const void *sourceData, Value &target ) { DataType *targetData = &data(target); new (targetData) DataType( *static_cast<const DataType *>( sourceData ) ); // placement new } static void clone( const Value &source, Value &target ) { DataType *targetData = &data(target); new (targetData) DataType( data(source) ); // placement new } static void destroy( Value &target ) { data(target).~DataType(); } }; /// Select storage strategy depending on size of DataType. template<typename DataType> class Storage { public: typedef StorageHelper<DataType, bool(sizeof(DataType) <= sizeof(ValueDataBuffer))> result_type; }; template<typename DataType> class CommonLifeCycle { public: typedef CommonLifeCycle<DataType> SelfType; typedef CPPTL_TYPENAME Storage<DataType>::result_type Storage; static void registerFunctions( ValueType &type ) { type.initialize_ = &Storage::initialize; type.clone_ = &Storage::clone; type.destroy_ = &Storage::destroy; } }; /// Comparison helper. /// \param DataType must support operators < and ==. template<typename DataType> class Compare { public: typedef Compare<DataType> SelfType; typedef CPPTL_TYPENAME Storage<DataType>::result_type Storage; static void registerFunctions( ValueType &type ) { type.compare_ = &SelfType::compare; type.less_ = &SelfType::less; type.equal_ = &SelfType::equal; } static int compare( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); if ( a < b ) return -1; if ( a == b ) return 0; return 1; } static bool less( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); return a < b; } static bool equal( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); return a == b; } }; /// Comparison helper. /// \param DataType must support operators <. template<typename DataType> class LessCompare { public: typedef Compare<DataType> SelfType; typedef CPPTL_TYPENAME Storage<DataType>::result_type Storage; static void registerFunctions( ValueType &type ) { type.compare_ = &SelfType::compare; type.less_ = &SelfType::less; type.equal_ = &SelfType::equal; } static int compare( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); if ( a < b ) return -1; if ( b < a ) return 1; return 0; } static bool less( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); return a < b; } static bool equal( const Value &aData, const Value &bData, bool &canCompare ) { const DataType &a = Storage::data(aData); const DataType &b = Storage::data(bData); return (a < b) && !(b < a); } }; template<class DataType> class CommonValueType : public ValueType { public: CommonValueType() { clear(); CommonLifeCycle<DataType>::registerFunctions( *this ); } }; template<class DataType> class ComparableValueType : public ValueType { public: ComparableValueType() { clear(); CommonLifeCycle<DataType>::registerFunctions( *this ); Compare<DataType>::registerFunctions( *this ); } }; } // end of namespace ValueTypeHelper // default implementation of getValueType # ifdef CPPTL_NO_FUNCTION_TEMPLATE_ORDERING template<class DataType> inline const ValueType &getValueTypeSelector( const HasDefaultValueTypeHelper &, const Type<DataType> & ) { # else template<class DataType> inline const ValueType &getValueType( const Type<DataType> & ) { # endif // Notes: if static within a template function is an issue, then // it can be moved to a dynamic allocation in a "type" registry. Requires TypeInfo. static ValueTypeHelper::CommonValueType<DataType> type; return type; } struct NoneValueType : public ValueType { NoneValueType() { clear(); clone_ = &NoneValueType::clone; compare_ = &NoneValueType::compare; } static void clone( const Value &, Value & ) { } static int compare( const Value &aData, const Value &bData, bool &canCompare ) { return 0; } }; inline const ValueType &getValueType( Type<NoneValueTypeTag> ) { static NoneValueType type; // @todo thread safety issue => move to .cpp with static init return type; } inline const ValueType &getValueType( Type<int> ) { static ValueTypeHelper::ComparableValueType<int> type; // @todo thread safety issue => move to .cpp with static init return type; } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class Value, inlines // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// inline Value::Value() { type_ = &CPPTL_GET_VALUE_TYPE( NoneValueTypeTag ); } inline Value::Value( const ValueType &type, const void *data ) : type_( &type ) { type.initialize_( data, *this ); } inline bool Value::isNone() const { return type_ == &CPPTL_GET_VALUE_TYPE( NoneValueTypeTag ); } inline bool Value::operator <( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) < 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator <", type_, other.type_ ); return result; } inline bool Value::operator <=( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) <= 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator <=", type_, other.type_ ); return result; } inline bool Value::operator ==( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) == 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator ==", type_, other.type_ ); return result; } inline bool Value::operator !=( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) != 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator !=", type_, other.type_ ); return result; } inline bool Value::operator >=( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) >= 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator >=", type_, other.type_ ); return result; } inline bool Value::operator >( const Value &other ) const { bool canCompare; bool result = compare( other, canCompare ) > 0; if ( !canCompare ) throw ValueException( ValueException::notSameType, "Value::operator >", type_, other.type_ ); return result; } } // end namespace CppTL #endif // CPPTL_VALUE_H_INCLUDED Index: typeinfo.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/typeinfo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** typeinfo.h 9 Nov 2005 21:16:41 -0000 1.3 --- typeinfo.h 19 Aug 2007 20:13:24 -0000 1.4 *************** *** 35,38 **** --- 35,42 ---- bool operator <( const TypeId &other ) const { + // Notes: experience has proven this to be bugged: + // in a staticaly linked programm on AIX, + // two distinct instances of std::type_info for the same type. + // They compared to false. Can be worked-around by comparing name though. return type_->before( *(other.type_) ); } |
From: Baptiste L. <bl...@us...> - 2007-08-19 20:13:28
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1355/src/cpputtest Modified Files: SConscript main.cpp Added Files: valuetest.cpp valuetest.h Log Message: In progress of adding CppTL::Value to replace CppTL::Any in table fixture and input based fixture. Value allows optionaly comparison, conversion to other type, conversion to string... Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/main.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** main.cpp 5 Jun 2006 12:02:56 -0000 1.27 --- main.cpp 19 Aug 2007 20:13:24 -0000 1.28 *************** *** 9,12 **** --- 9,13 ---- #include "testfixturetest.h" #include "smallmaptest.h" + #include "valuetest.h" //#include "formattest.h" *************** *** 112,115 **** --- 113,117 ---- allSuite->add( ReflectionTest::suite() ); allSuite->add( SmallMapTest::suite() ); + allSuite->add( ValueTest::suite() ); // allSuite->add( FormatTest::suite() ); // allSuite->add( CommandLineOptionsTest::suite() ); --- NEW FILE: valuetest.cpp --- #include "valuetest.h" #include <cpptl/value.h> ValueTest::ValueTest() : maxInt_( 0x7ffffff ) , minInt_( ~(unsigned int(-1)/2) ) { } ValueTest::~ValueTest() { } void ValueTest::setUp() { } void ValueTest::tearDown() { } void ValueTest::testNone() { CppTL::Value value; CPPUT_CHECK_EXPR( value.isNone() ); CppTL::Value value2; CPPUT_CHECK_EXPR( value2.isNone() ); CPPUT_CHECK_EXPR( value == value2 ); CPPUT_CHECK_EXPR_FALSE( value < value2 ); CPPUT_CHECK_EXPR( value <= value2 ); CPPUT_CHECK_EXPR_FALSE( value != value2 ); CPPUT_CHECK_EXPR( value >= value2 ); CPPUT_CHECK_EXPR_FALSE( value > value2 ); } void ValueTest::testLifeCycle() { CppTL::Value value1 = CppTL::makeValue( maxInt_ ); CppTL::Value value1a = value1; CppTL::Value value2 = CppTL::makeValue( minInt_ ); CppTL::Value value2a = CppTL::makeValue( minInt_ ); CPPUT_CHECK_EXPR_FALSE( value1a.isNone() ); CPPUT_CHECK_EXPR( value2 < value1 ); CPPUT_CHECK_EXPR( value2 <= value1 ); CPPUT_CHECK_EXPR( value1 != value2 ); CPPUT_CHECK_EXPR_FALSE( value1 == value2 ); CPPUT_CHECK_EXPR_FALSE( value2 >= value1 ); CPPUT_CHECK_EXPR_FALSE( value2 > value1 ); CPPUT_CHECK_EXPR( value1 == value1a ); CPPUT_CHECK_EXPR( value2 == value2a ); } Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/SConscript,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SConscript 5 Jun 2006 12:02:56 -0000 1.16 --- SConscript 19 Aug 2007 20:13:24 -0000 1.17 *************** *** 16,19 **** --- 16,20 ---- testtestsuite.cpp reflectiontest.cpp + valuetest.cpp """ ), 'cpputtest', --- NEW FILE: valuetest.h --- #ifndef CPPUT_VALUETEST_H # define CPPUT_VALUETEST_H # include <cpput/assertcommon.h> # include <cpput/testfixture.h> # include <cpptl/value.h> class ValueTest : public CppUT::TestFixture { CPPUT_TESTSUITE_BEGIN( ValueTest ); CPPUT_TEST( testLifeCycle ); CPPUT_TEST( testNone ); CPPUT_TESTSUITE_END(); public: ValueTest(); virtual ~ValueTest(); void setUp(); void tearDown(); void testNone(); void testLifeCycle(); private: const int maxInt_; const int minInt_; }; #endif // CPPUT_VALUETEST_H |
From: Baptiste L. <bl...@us...> - 2007-08-19 20:13:28
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1355 Modified Files: TODO Log Message: In progress of adding CppTL::Value to replace CppTL::Any in table fixture and input based fixture. Value allows optionaly comparison, conversion to other type, conversion to string... Index: TODO =================================================================== RCS file: /cvsroot/cppunit/cppunit2/TODO,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TODO 15 Aug 2007 11:20:57 -0000 1.5 --- TODO 19 Aug 2007 20:13:24 -0000 1.6 *************** *** 1,2 **** --- 1,12 ---- * complete works on the CommandLines library => likely moved to opentest. * add support for ExtendedData in C function test case (CPPUT_TEST_FUNCTION...) + * need a new Any supporting feature required for unit testing: + - toString (toJson?) + - type to text (for conversion error message) + - equality comparison test (input fixture) + - support for basic types + - support for string types + - support for unknown aggregate types. + - conversion between type (int, uint, const char *, std::string...) + - type comparison + |
From: Baptiste L. <bl...@us...> - 2007-08-19 20:13:28
|
Update of /cvsroot/cppunit/cppunit2/makefiles/vs80 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1355/makefiles/vs80 Modified Files: cpptl_lib.vcproj cpput_test.vcproj Log Message: In progress of adding CppTL::Value to replace CppTL::Any in table fixture and input based fixture. Value allows optionaly comparison, conversion to other type, conversion to string... Index: cpput_test.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs80/cpput_test.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpput_test.vcproj 16 Aug 2007 15:51:04 -0000 1.1 --- cpput_test.vcproj 19 Aug 2007 20:13:24 -0000 1.2 *************** *** 355,358 **** --- 355,366 ---- > </File> + <File + RelativePath="..\..\src\cpputtest\valuetest.cpp" + > + </File> + <File + RelativePath="..\..\src\cpputtest\valuetest.h" + > + </File> </Files> <Globals> Index: cpptl_lib.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs80/cpptl_lib.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpptl_lib.vcproj 16 Aug 2007 15:51:04 -0000 1.1 --- cpptl_lib.vcproj 19 Aug 2007 20:13:24 -0000 1.2 *************** *** 280,283 **** --- 280,287 ---- > </File> + <File + RelativePath="..\..\include\cpptl\value.h" + > + </File> </Filter> <File |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:09
|
Update of /cvsroot/cppunit/cppunit2/makefiles/vs80 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331/makefiles/vs80 Added Files: .cvsignore cpptl_lib.vcproj cppunit2.sln cpput_lib.vcproj cpput_test.vcproj example.vcproj examples_opentest_demo.vcproj opentest_lib.vcproj Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. --- NEW FILE: .cvsignore --- *.WW *.ncb *.suo --- NEW FILE: examples_opentest_demo.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="examples_opentest_demo" ProjectGUID="{544D6860-E43B-4677-81B6-1FD70687B99D}" Keyword="Win32Proj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/examples_opentest_demo/debug" IntermediateDirectory="../../build/examples_opentest_demo/debug" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include;../.." PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4" DisableSpecificWarnings="4355"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/examples_opentest_demo.exe" LinkIncremental="2" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/examples_opentest_demo.pdb" SubSystem="1" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/examples_opentest_demo/release" IntermediateDirectory="../../build/examples_opentest_demo/release" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include;../.." PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" DisableSpecificWarnings="4355"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/examples_opentest_demo.exe" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath="..\..\examples\opentest_demo\main.cpp"> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" ObjectFile="$(IntDir)/$(InputName)1.obj"/> </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" ObjectFile="$(IntDir)/$(InputName)1.obj"/> </FileConfiguration> </File> <File RelativePath="..\..\test\shmem_test\main.cpp"> <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="TRUE"> <Tool Name="VCCLCompilerTool"/> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="TRUE"> <Tool Name="VCCLCompilerTool"/> </FileConfiguration> </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: cppunit2.sln --- Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpptl_lib", "cpptl_lib.vcproj", "{4037D758-74CD-412B-B67C-BA3CA89FEF28}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpput_lib", "cpput_lib.vcproj", "{79273A0D-700E-4AFA-B7F2-14D4CC325521}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpput_test", "cpput_test.vcproj", "{2506991E-13CA-49C9-8686-AACDE35C21B6}" ProjectSection(ProjectDependencies) = postProject {4037D758-74CD-412B-B67C-BA3CA89FEF28} = {4037D758-74CD-412B-B67C-BA3CA89FEF28} {79273A0D-700E-4AFA-B7F2-14D4CC325521} = {79273A0D-700E-4AFA-B7F2-14D4CC325521} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{0DCDB99D-0591-4C6E-95C2-74B2EDABC338}" ProjectSection(ProjectDependencies) = postProject {79273A0D-700E-4AFA-B7F2-14D4CC325521} = {79273A0D-700E-4AFA-B7F2-14D4CC325521} {2506991E-13CA-49C9-8686-AACDE35C21B6} = {2506991E-13CA-49C9-8686-AACDE35C21B6} {4037D758-74CD-412B-B67C-BA3CA89FEF28} = {4037D758-74CD-412B-B67C-BA3CA89FEF28} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 dummy|Win32 = dummy|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Debug|Win32.ActiveCfg = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Debug|Win32.Build.0 = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.dummy|Win32.ActiveCfg = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.dummy|Win32.Build.0 = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Release|Win32.ActiveCfg = Release|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Release|Win32.Build.0 = Release|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Debug|Win32.ActiveCfg = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Debug|Win32.Build.0 = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.dummy|Win32.ActiveCfg = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.dummy|Win32.Build.0 = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Release|Win32.ActiveCfg = Release|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Release|Win32.Build.0 = Release|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Debug|Win32.ActiveCfg = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Debug|Win32.Build.0 = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.dummy|Win32.ActiveCfg = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.dummy|Win32.Build.0 = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Release|Win32.ActiveCfg = Release|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Release|Win32.Build.0 = Release|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.Debug|Win32.ActiveCfg = Debug|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.Debug|Win32.Build.0 = Debug|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.dummy|Win32.ActiveCfg = Debug|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.dummy|Win32.Build.0 = Debug|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.Release|Win32.ActiveCfg = Release|Win32 {0DCDB99D-0591-4C6E-95C2-74B2EDABC338}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal --- NEW FILE: example.vcproj --- <?xml version="1.0" encoding="shift_jis"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="example" ProjectGUID="{0DCDB99D-0591-4C6E-95C2-74B2EDABC338}" RootNamespace="example" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/$(ProjectName)$(ConfigurationName)" IntermediateDirectory="../../build/$(ProjectName)$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include;../../" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" DisableSpecificWarnings="4181" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" LinkIncremental="2" GenerateDebugInformation="true" SubSystem="1" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/$(ProjectName)$(ConfigurationName)" IntermediateDirectory="../../build/$(ProjectName)$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include;../../" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath="..\..\examples\input_test\main.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: opentest_lib.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="opentest_lib" ProjectGUID="{6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}" Keyword="Win32Proj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/opentest/debug" IntermediateDirectory="../../build/opentest/debug" ConfigurationType="4" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;_DEBUG;_LIB" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3" DisableSpecificWarnings="4244"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/opentest_vc71_libmdd.lib"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/opentest/release" IntermediateDirectory="../../build/opentest/release" ConfigurationType="4" CharacterSet="2"> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" TreatWChar_tAsBuiltInType="TRUE" ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3" DisableSpecificWarnings="4244"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/opentest_vc71_libmd.lib"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <File RelativePath="..\..\include\opentest\config.h"> </File> <File RelativePath="..\..\include\opentest\connection.h"> </File> <File RelativePath="..\..\include\opentest\connector.h"> </File> <File RelativePath="..\..\include\opentest\forwards.h"> </File> <File RelativePath="..\..\src\opentest\interfaces.cpp"> </File> <File RelativePath="..\..\include\opentest\interfaces.h"> </File> <File RelativePath="..\..\src\opentest\remoteinterfaces.cpp"> </File> <File RelativePath="..\..\include\opentest\remoteinterfaces.h"> </File> <File RelativePath="..\..\include\opentest\resourcelist.h"> </File> <File RelativePath="..\..\include\opentest\serializedtesttransport.h"> </File> <File RelativePath="..\..\src\opentest\serializer.cpp"> </File> <File RelativePath="..\..\include\opentest\serializer.h"> </File> <File RelativePath="..\..\src\opentest\sharedmemorytransport.cpp"> </File> <File RelativePath="..\..\include\opentest\sharedmemorytransport.h"> </File> <File RelativePath="..\..\include\opentest\texttestdriver.h"> </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: cpput_test.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="cpput_test" ProjectGUID="{2506991E-13CA-49C9-8686-AACDE35C21B6}" RootNamespace="cpput_test" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/cpput_test/debug" IntermediateDirectory="../../build/cpput_test/debug" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/cpput_test.exe" LinkIncremental="2" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/cpput_test.pdb" SubSystem="1" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" Description="Running post-build unit tests" CommandLine="$(TargetPath)" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/cpput_test/release" IntermediateDirectory="../../build/cpput_test/release" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/cpput_test.exe" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" Description="Running post-build unit tests" CommandLine="$(TargetPath)" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="codetorevisit" > <File RelativePath="..\..\src\cpputtest\testfunctor2.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath="..\..\src\cpputtest\testfunctor3.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath="..\..\src\cpputtest\testtestrunresult.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> </Filter> <File RelativePath="..\..\src\cpputtest\assertenumtest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\assertenumtest.h" > </File> <File RelativePath="..\..\src\cpputtest\assertstringtest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\assertstringtest.h" > </File> <File RelativePath="..\..\src\cpputtest\commandlineoptionstest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\commandlineoptionstest.h" > </File> <File RelativePath="..\..\src\cpputtest\enumeratortest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\enumeratortest.h" > </File> <File RelativePath="..\..\src\cpputtest\main.cpp" > </File> <File RelativePath="..\..\src\cpputtest\minitestrunner.h" > </File> <File RelativePath="..\..\src\cpputtest\mocktestlistener.h" > </File> <File RelativePath="..\..\src\cpputtest\mocktestvisitor.h" > </File> <File RelativePath="..\..\src\cpputtest\reflectiontest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\reflectiontest.h" > </File> <File RelativePath="..\..\src\cpputtest\registrytest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\registrytest.h" > </File> <File RelativePath="..\..\src\cpputtest\smallmaptest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\smallmaptest.h" > </File> <File RelativePath="..\..\src\cpputtest\testbasicassertion.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testexceptionguard.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testfixturetest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testfixturetest.h" > </File> <File RelativePath="..\..\src\cpputtest\testfunctor.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testinfotest.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testtestcase.cpp" > </File> <File RelativePath="..\..\src\cpputtest\testtestsuite.cpp" > </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: cpput_lib.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="cpput_lib" ProjectGUID="{79273A0D-700E-4AFA-B7F2-14D4CC325521}" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/cpput/debug" IntermediateDirectory="../../build/cpput/debug" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;_DEBUG;_LIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/cpput_vc71_libmd.lib" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/cpput/release" IntermediateDirectory="../../build/cpput/release" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/cpput_vc71_libmd.lib" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="codetorevisit" > <File RelativePath="..\..\src\cpput\parametrizedsource.cpp" > </File> <File RelativePath="..\..\include\cpput\parametrizedsource.h" > </File> <File RelativePath="..\..\src\cpput\tablefixture.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath="..\..\src\cpput\testrunner.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath="..\..\include\cpput\testrunner.h" > </File> </Filter> <Filter Name="doc" > <File RelativePath="..\..\changelog.txt" > </File> <File RelativePath="..\..\doc\coding_guidelines.dox" > </File> <File RelativePath="..\..\doc\cpput.dox" > </File> <File RelativePath="..\..\doc\cpput_todo.dox" > </File> <File RelativePath="..\..\doc\custom.css" > </File> <File RelativePath="..\..\doc\doxyfile.in" > </File> <File RelativePath="..\..\doc\footer.html" > </File> <File RelativePath="..\..\doc\header.html" > </File> </Filter> <File RelativePath="..\..\src\cpput\assert.cpp" > </File> <File RelativePath="..\..\include\cpput\assertcommon.h" > </File> <File RelativePath="..\..\include\cpput\assertenum.h" > </File> <File RelativePath="..\..\src\cpput\assertstring.cpp" > </File> <File RelativePath="..\..\include\cpput\assertstring.h" > </File> <File RelativePath="..\..\include\cpput\autolink.h" > </File> <File RelativePath="..\..\include\cpput\config.h" > </File> <File RelativePath="..\..\src\cpput\dllproxy.cpp" > </File> <File RelativePath="..\..\include\cpput\dllproxy.h" > </File> <File RelativePath="..\..\include\cpput\equality.h" > </File> <File RelativePath="..\..\src\cpput\exceptionguard.cpp" > </File> <File RelativePath="..\..\include\cpput\exceptionguard.h" > </File> <File RelativePath="..\..\src\cpput\extendeddata.cpp" > </File> <File RelativePath="..\..\include\cpput\extendeddata.h" > </File> <File RelativePath="..\..\include\cpput\forwards.h" > </File> <File RelativePath="..\..\include\cpput\inputbasedtest.h" > </File> <File RelativePath="..\..\include\cpput\lightfixture.h" > </File> <File RelativePath="..\..\src\cpput\lighttestrunner.cpp" > </File> <File RelativePath="..\..\include\cpput\lighttestrunner.h" > </File> <File RelativePath="..\..\src\cpput\message.cpp" > </File> <File RelativePath="..\..\include\cpput\message.h" > </File> <File RelativePath="..\..\src\cpput\registry.cpp" > </File> <File RelativePath="..\..\include\cpput\registry.h" > </File> <File RelativePath="..\..\include\cpput\resource.h" > </File> <File RelativePath="..\..\include\cpput\stringize.h" > </File> <File RelativePath="..\..\include\cpput\tablefixture.h" > </File> <File RelativePath="..\..\include\cpput\test.h" > </File> <File RelativePath="..\..\src\cpput\testcase.cpp" > </File> <File RelativePath="..\..\include\cpput\testcase.h" > </File> <File RelativePath="..\..\include\cpput\testfixture.h" > </File> <File RelativePath="..\..\include\cpput\testfunction.h" > </File> <File RelativePath="..\..\src\cpput\testinfo.cpp" > </File> <File RelativePath="..\..\include\cpput\testinfo.h" > </File> <File RelativePath="..\..\src\cpput\testsuite.cpp" > </File> <File RelativePath="..\..\include\cpput\testsuite.h" > </File> <File RelativePath="..\..\include\cpput\testvisitor.h" > </File> <File RelativePath="..\..\include\cpput\translate.h" > </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: cpptl_lib.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="cpptl_lib" ProjectGUID="{4037D758-74CD-412B-B67C-BA3CA89FEF28}" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../../build/cpptl/debug" IntermediateDirectory="../../build/cpptl/debug" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;_DEBUG;_LIB" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" BufferSecurityCheck="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/cpptl_vc71_libmdd.lib" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../../build/cpptl/release" IntermediateDirectory="../../build/cpptl/release" ConfigurationType="4" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../../include" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" TreatWChar_tAsBuiltInType="true" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)/cpptl_vc71_libmd.lib" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="json" > <File RelativePath="..\..\include\json\autolink.h" > </File> <File RelativePath="..\..\include\json\config.h" > </File> <File RelativePath="..\..\include\json\forwards.h" > </File> <File RelativePath="..\..\include\json\json.h" > </File> <File RelativePath="..\..\src\cpptl\json_reader.cpp" > </File> <File RelativePath="..\..\src\cpptl\json_value.cpp" > </File> <File RelativePath="..\..\src\cpptl\json_writer.cpp" > </File> <File RelativePath="..\..\include\json\reader.h" > </File> <File RelativePath="..\..\include\json\value.h" > </File> <File RelativePath="..\..\include\json\writer.h" > </File> </Filter> <Filter Name="cpptl" > <File RelativePath="..\..\include\cpptl\any.h" > </File> <File RelativePath="..\..\include\cpptl\atomiccounter.h" > </File> <File RelativePath="..\..\include\cpptl\autolink.h" > </File> <File RelativePath="..\..\include\cpptl\config.h" > </File> <File RelativePath="..\..\include\cpptl\conststring.h" > </File> <File RelativePath="..\..\include\cpptl\enumerator.h" > </File> <File RelativePath="..\..\include\cpptl\forwards.h" > </File> <File RelativePath="..\..\include\cpptl\functor.h" > </File> <File RelativePath="..\..\include\cpptl\intrusiveptr.h" > </File> <File RelativePath="..\..\include\cpptl\reflection.h" > </File> <File RelativePath="..\..\include\cpptl\reflection.inl" > </File> <File RelativePath="..\..\include\cpptl\reflectionimpl10.h" > </File> <File RelativePath="..\..\include\cpptl\scopedptr.h" > </File> <File RelativePath="..\..\include\cpptl\sharedptr.h" > </File> <File RelativePath="..\..\include\cpptl\stringtools.h" > </File> <File RelativePath="..\..\src\cpptl\thread.cpp" > </File> <File RelativePath="..\..\include\cpptl\thread.h" > </File> <File RelativePath="..\..\include\cpptl\typeinfo.h" > </File> <File RelativePath="..\..\include\cpptl\typename.h" > </File> <File RelativePath="..\..\include\cpptl\typetraits.h" > </File> </Filter> <File RelativePath="..\..\include\cpptl\_stlimpl.h" > </File> <File RelativePath="..\..\src\cpptl\deque.cpp" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath="..\..\include\cpptl\deque.h" > </File> <File RelativePath="..\..\include\cpptl\enum2string.h" > </File> <File RelativePath="..\..\include\cpptl\smallmap.h" > </File> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:08
|
Update of /cvsroot/cppunit/cppunit2/examples/input_test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331/examples/input_test Added Files: .cvsignore SConscript main.cpp Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. --- NEW FILE: .cvsignore --- *.plg *.old *.WW *.old --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/testcase.h> #include <cpput/testinfo.h> #include <cpput/assertcommon.h> #include <cpput/inputbasedtest.h> #include <json/reader.h> class OperationInputTest; CPPTL_DECLARE_TYPE_AND_PTR_INFO( OperationInputTest ); // Not required if RTTI are always enabled CPPTL_REFLECT_REGISTER_CLASS( OperationInputTest ) class OperationInputTest : public CppUT::ColumnInputTest { public: CPPUT_INPUT_FIXTURE_BEGIN( OperationInputTest ) CPPTL_REFLECT_METHOD_WITH_RETURN( result ) CPPTL_REFLECT_RENAMED_ATTRIBUT( lhs_, "leftHandSide" ) CPPTL_REFLECT_RENAMED_ATTRIBUT( rhs_, "rightHandSide" ) CPPTL_REFLECT_RENAMED_ATTRIBUT( operation_, "operation" ) CPPUT_INPUT_FIXTURE_END() int result() { if ( operation_ == "add" ) return lhs_ + rhs_; else if ( operation_ == "substract" ) return lhs_ - rhs_; CPPUT_CHECKING_FAIL( "Unsupported operation: " + operation_ ); return 0; } std::string operation_; int lhs_; int rhs_; }; static void testOperations() { Json::Reader reader; Json::Value data; bool ok = reader.parse( "[ " "[\"leftHandSide\", \"rightHandSide\", \"operation\", \"result?\"]," "[1, 2, \"add\", 3]," "[1, 2, \"substract\", -1]" "]", data ); if ( !ok ) CPPUT_FAIL( reader.getFormatedErrorMessages() ); OperationInputTest test; CppUT::JsonTableDataSource table( data ); test( table ); } int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); CppUT::TestPtr test1 = CppUT::makeTestCase( CppTL::cfn0( testOperations ), "testOperations" ); allSuite->add( test1 ); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'input_test' ) |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:08
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331/include/cpput Modified Files: tablefixture.h Added Files: inputbasedtest.h Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. Index: tablefixture.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/tablefixture.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tablefixture.h 15 Aug 2007 17:35:39 -0000 1.4 --- tablefixture.h 16 Aug 2007 15:51:04 -0000 1.5 *************** *** 17,21 **** ! class InvalidColumnName : public std::invalid_argument { public: --- 17,21 ---- ! class CPPUT_API InvalidColumnName : public std::invalid_argument { public: *************** *** 27,31 **** ! class DuplicateColumnName : public std::invalid_argument { public: --- 27,31 ---- ! class CPPUT_API DuplicateColumnName : public std::invalid_argument { public: *************** *** 37,41 **** ! class InvalidColumnIndex : public std::invalid_argument { public: --- 37,41 ---- ! class CPPUT_API InvalidColumnIndex : public std::invalid_argument { public: *************** *** 47,51 **** ! class BadTableCellCast : public std::runtime_error { public: --- 47,51 ---- ! class CPPUT_API BadTableCellCast : public std::runtime_error { public: *************** *** 60,64 **** /*! \brief Table data for use with table test cases. */ ! class Table : public CppTL::IntrusiveCount { public: --- 60,64 ---- /*! \brief Table data for use with table test cases. */ ! class CPPUT_API Table : public CppTL::IntrusiveCount { public: *************** *** 160,164 **** * \see Table. */ ! class TableRowHelper { public: --- 160,164 ---- * \see Table. */ ! class CPPUT_API TableRowHelper { public: *************** *** 200,204 **** * \see CPPUT_TABLE_FETCH() */ ! class TableRow { public: --- 200,204 ---- * \see CPPUT_TABLE_FETCH() */ ! class CPPUT_API TableRow { public: *************** *** 300,304 **** ! class TestFunctionTableSuiteFactory { public: --- 300,304 ---- ! class CPPUT_API TestFunctionTableSuiteFactory { public: --- NEW FILE: inputbasedtest.h --- #ifndef CPPUT_INPUTTEST_H_INCLUDED # define CPPUT_INPUTTEST_H_INCLUDED # include "forwards.h" # include <json/value.h> # include <cpptl/any.h> # include <cpptl/reflection.h> namespace CppUT { // input based test are factory based. // Input data is provided to the factory // test is executed based on the input and assertion are done. // This is a single test case. // Fixture is stand-alone and not related to test case in anyway. class CPPUT_API TableDataSource { public: virtual ~TableDataSource() { } virtual CppTL::Any getCellValue( int column, int row ) const = 0; virtual int rowCount() const = 0; virtual int columnCount() const = 0; }; class CPPUT_API JsonTableDataSource : public TableDataSource { public: JsonTableDataSource( const Json::Value &data ) : data_( data ) { } public: // overridden from TableDataSource virtual CppTL::Any getCellValue( int column, int row ) const { const Json::Value &value = data_[row][column]; switch ( value.type() ) { case Json::nullValue: return CppTL::Any(); case Json::intValue: return CppTL::Any( value.asInt() ); case Json::uintValue: return CppTL::Any( value.asUInt() ); case Json::realValue: return CppTL::Any( value.asDouble() ); case Json::stringValue: return CppTL::Any( value.asString() ); case Json::booleanValue: return CppTL::Any( value.asBool() ); default: return CppTL::Any(); // unsupported conversion, will blow on compare or get/set. } } virtual int rowCount() const { return data_.size(); } virtual int columnCount() const { int column = 0; return data_[column].size(); } Json::Value data_; }; class CPPUT_API InputTest { public: virtual ~InputTest() { } virtual void operator()( const TableDataSource &table ) = 0; }; template<class Functor> struct Bind234 { typedef CPPTL_TYPENAME Functor::result_type result_type; typedef CPPTL_TYPENAME Functor::arg1_type arg1_type; typedef arg1_type first_argument_type; typedef CPPTL_TYPENAME Functor::arg2_type arg2_type; typedef CPPTL_TYPENAME Functor::arg3_type arg3_type; typedef CPPTL_TYPENAME Functor::arg4_type arg4_type; typedef CppTL::Functor1<arg1_type> functor_type; Bind234( const Functor &functor, arg2_type a2, arg3_type a3, arg4_type a4 ) : functor_( functor ), a2_( a2 ), a3_( a3 ), a4_( a4 ) { } void operator()( const arg1_type &arg1 ) const { functor_( arg1, a2_, a3_, a4_ ); } private: Functor functor_; arg2_type a2_; arg3_type a3_; arg4_type a4_; }; /// @todo Extends functor API to allow not binding all parameters. template<typename Functor, typename A2, typename A3, typename A4> CppTL::Functor1<CPPTL_TYPENAME Functor::arg1_type> bind234( const Functor &functor, A2 a2, A3 a3, A4 a4 ) { return fn1( Bind234<Functor>( functor, a2, a3, a4 ) ); } /* \brief Input based test for table with action based on column header. * \code * class OperationInputTest; * CPPTL_DECLARE_TYPE_AND_PTR_INFO( OperationInputTest ); // Not required if RTTI are always enabled * CPPTL_REFLECT_REGISTER_CLASS( OperationInputTest ) * class OperationInputTest : public CppUT::ColumnInputTest * { * public: * CPPUT_INPUT_FIXTURE_BEGIN( OperationInputTest ) * CPPTL_REFLECT_METHOD_WITH_RETURN( result ) * CPPTL_REFLECT_RENAMED_ATTRIBUT( lhs_, "leftHandSide" ) * CPPTL_REFLECT_RENAMED_ATTRIBUT( rhs_, "rightHandSide" ) * CPPTL_REFLECT_RENAMED_ATTRIBUT( operation_, "operation" ) * CPPUT_INPUT_FIXTURE_END() * int result() * { * if ( operation_ == "add" ) * return lhs_ + rhs_; * else if ( operation_ == "substract" ) * return lhs_ - rhs_; * CPPUT_CHECKING_FAIL( "Unsupported operation: " + operation_ ); * return 0; * } * std::string operation_; * int lhs_; * int rhs_; * }; * \endcode */ class CPPUT_API ColumnInputTest : public InputTest { public: ColumnInputTest() { this_ = CppTL::makeAny( this ); } virtual const CppTL::Class *getClass() const = 0; virtual CppTL::Any getThis() = 0; public: // overridden from InputTest virtual void operator()( const TableDataSource &table ) { // Parse the header: // For each column, generate an action that process the value. // Assign order to each action: setup or execution ? assertion ? this_ = getThis(); int rowCount = table.rowCount(); int columnCount = table.columnCount(); if ( rowCount < 1 || columnCount < 1) { CPPUT_CHECKING_FAIL( "Table row header is missing." ); return; } const CppTL::Class *aClass = getClass(); if ( !aClass ) { CPPUT_CHECKING_FAIL( "Reflection class not found for input test." ); return; } for ( int column = 0; column < columnCount; ++column ) { CppTL::Any value = table.getCellValue( column, 0 ); const std::string *headerName = ::get( &value, CppTL::Type<std::string>() ); if ( headerName == 0 ) { CPPUT_CHECKING_FAIL( "Can not convert header column to string." ); // @todo add col index return; } if ( headerName->empty() ) continue; if ( headerName->at( headerName->length() - 1 ) == '?' ) // check action { CppTL::ConstString name( headerName->c_str(), headerName->c_str() + headerName->length() - 1 ); CppTL::Functor0R<CppTL::Any> actual; const CppTL::Attribut *attribut = aClass->findAttribut( name ); if ( attribut != 0 ) { actual = CppTL::bindr( CppTL::memfn1r( this, &ColumnInputTest::actionGetAttribut ), CppTL::cref( *attribut ) ); } else { const CppTL::Method *method = aClass->findMethod( name ); if ( method == 0 ) { CPPUT_CHECKING_FAIL( "No method or attribut found by reflection matching header name: " + name ); return; } actual = CppTL::bindr( CppTL::memfn1r( this, &ColumnInputTest::actionGetResult ), CppTL::cref( *method ) ); } Action action = bind234( CppTL::memfn4( this, &ColumnInputTest::actionCheckEquals ), column, CppTL::cref( table ), actual ); checkActions_.push_back( action ); } else // set attribut or invoke method action { const CppTL::Attribut *attribut = aClass->findAttribut( headerName->c_str() ); if ( attribut != 0 ) { Action action = bind234( CppTL::memfn4( this, &ColumnInputTest::actionSetAttribut ), column, CppTL::cref( table ), CppTL::cref( *attribut ) ); setAttributActions_.push_back( action ); } else { const CppTL::Method *method = aClass->findMethod( headerName->c_str() ); if ( method == 0 ) { CPPUT_CHECKING_FAIL( "No method or attribut found by reflection matching header name: " + *headerName ); return; } Action action = bind234( CppTL::memfn4( this, &ColumnInputTest::actionInvokeMethod ), column, CppTL::cref( table ), CppTL::cref( *method ) ); checkActions_.push_back( action ); } } } for ( int row = 1; row < rowCount; ++row ) { processActions( setAttributActions_, row ); processActions( invokeActions_, row ); processActions( checkActions_, row ); } } private: typedef CppTL::Functor1<int> Action; typedef std::deque<Action> Actions; private: void processActions( const Actions &actions, int row ) { Actions::const_iterator it = actions.begin(); Actions::const_iterator itEnd = actions.end(); for ( ; it != itEnd; ++it ) { const Action &action = *it; action( row ); } } void actionSetAttribut( int row, int column, const TableDataSource &table, const CppTL::Attribut &attribut ) { attribut.set( this_, table.getCellValue( column, row ) ); } void actionInvokeMethod( int row, int column, const TableDataSource &table, const CppTL::Method &method ) { CppTL::MethodParameters parameters; parameters.push_back( table.getCellValue( column, row ) ); method.invoke( this_, parameters ); } void actionCheckEquals( int row, int column, const TableDataSource &table, CppTL::Functor0R<CppTL::Any> actual ) { CppTL::Any actualValue = actual(); CppTL::Any expectedValue = table.getCellValue( column, row ); bool hasSameType = actualValue.hasSameType( expectedValue ); CPPUT_CHECK( hasSameType, "Can not compare cell value: different type!" ); // @todo dump type if ( !hasSameType ) return; typedef CppTL::Type<int> TypeInt; typedef CppTL::Type<double> TypeDouble; typedef CppTL::Type<std::string> TypeString; if ( actualValue.type() == CppTL::typeId( TypeInt() ) ) { CPPUT_CHECK_EQUAL( any_cast( expectedValue, TypeInt() ), any_cast( actualValue, TypeInt() ) ); } else if ( actualValue.type() == CppTL::typeId( TypeDouble() ) ) { CPPUT_CHECK_EQUAL( any_cast( expectedValue, TypeDouble() ), any_cast( actualValue, TypeDouble() ) ); } else if ( actualValue.type() == CppTL::typeId( TypeString() ) ) { CPPUT_CHECK_EQUAL( any_cast( expectedValue, TypeString() ), any_cast( actualValue, TypeString() ) ); } else { CPPUT_CHECKING_FAIL( "Unsupported type for equality test in cell value." ); } } CppTL::Any actionGetAttribut( const CppTL::Attribut &attribut ) { return attribut.get( this_ ); } CppTL::Any actionGetResult( const CppTL::Method &method ) { CppTL::MethodParameters parameters; return method.invoke( this_, parameters ); } private: CppTL::Any this_; Actions setAttributActions_; Actions invokeActions_; Actions checkActions_; }; #define CPPUT_INPUT_FIXTURE_BEGIN( ClassType ) \ public: /* overridden from ColumnInputTest */ \ virtual CppTL::Any getThis() \ { \ return CppTL::makeAny( this ); \ } \ CPPTL_REFLECT_CLASS_BEGIN( ClassType ) \ #define CPPUT_INPUT_FIXTURE_END() \ CPPTL_REFLECT_CLASS_END() } // namespace CppUT #endif // CPPUT_INPUTTEST_H_INCLUDED |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:07
|
Update of /cvsroot/cppunit/cppunit2/doc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331/doc Modified Files: cpput.dox cpput_todo.dox Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. Index: cpput.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput.dox,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** cpput.dox 15 Aug 2007 17:35:39 -0000 1.8 --- cpput.dox 16 Aug 2007 15:51:04 -0000 1.9 *************** *** 255,258 **** --- 255,274 ---- \see CPPUT_TEST_TABLE(), CPPUT_REGISTER_TEST_FUNCTION_TABLE_IN(), CPPUT_TEST_FUNCTION_TABLE_IN(). + \subsection section_inputfixture Creating TestCase: input fixture + + Input fixture are intended to run functional test cases with externalized input data. + + They usually rely on a reflection mecanism for interaction between the input data and testing. + + Currently, only column based fixture is implemented. Data takes the form of a table. The + header row indicates the role of each column. For each row, the same sequence of operation + will be done: + - if column name match an attribute name, then set the attribute value to the cell value + - if column name match a method name, then invoke the method and pass the cell value + - if column name ends with '?' then, if the column name match an attribute then get its value, + otherwise invoke the matching method name and retrieve its return value. Finally, compares the + retrieved value for equality with the cell value. + + \see ColumnInputTest <hr> Index: cpput_todo.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput_todo.dox,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** cpput_todo.dox 15 Aug 2007 17:35:39 -0000 1.4 --- cpput_todo.dox 16 Aug 2007 15:51:04 -0000 1.5 *************** *** 2,6 **** <hr> ! \section todo_input_driven_testing Input driven testing Needs: provide testers with a way to add test cases without writing code. --- 2,6 ---- <hr> ! \section todo_input_driven_testing Input driven testing [working but still drafty] Needs: provide testers with a way to add test cases without writing code. |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:07
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331/include/cpptl Modified Files: reflection.h reflection.inl Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. Index: reflection.inl =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflection.inl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** reflection.inl 13 Nov 2005 10:12:01 -0000 1.5 --- reflection.inl 16 Aug 2007 15:51:04 -0000 1.6 *************** *** 131,135 **** Method::getArgCount() const { ! return invokable_.argTypes_.size(); } --- 131,135 ---- Method::getArgCount() const { ! return size_type(invokable_.argTypes_.size()); } Index: reflection.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/reflection.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** reflection.h 13 Nov 2005 10:12:01 -0000 1.6 --- reflection.h 16 Aug 2007 15:51:04 -0000 1.7 *************** *** 240,243 **** --- 240,247 ---- # define CPPTL_REFLECT_CLASS_BEGIN( ClassType ) \ typedef ClassType _Reflection_SelfType; \ + virtual const ::CppTL::Class *getClass() const \ + { \ + return ::CppTL::Class::findClass( #ClassType ); \ + } \ static void registerClassReflection() \ { \ |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:51:07
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6331 Modified Files: changelog.txt sconstruct Log Message: Added initial support for column fixture supported by fitness. Still missing automatic type convertion and correct reporting of error with regard to originating cell. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** sconstruct 15 Aug 2007 17:35:39 -0000 1.34 --- sconstruct 16 Aug 2007 15:51:04 -0000 1.35 *************** *** 173,176 **** --- 173,177 ---- buildProjectInDirectory( 'examples/test_function' ) buildProjectInDirectory( 'examples/table_fixture' ) + buildProjectInDirectory( 'examples/input_test' ) ##buildProjectInDirectory( 'examples/opentest_demo' ) #buildProjectInDirectory( 'src/qttestdriver' ) Index: changelog.txt =================================================================== RCS file: /cvsroot/cppunit/cppunit2/changelog.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** changelog.txt 15 Aug 2007 17:35:39 -0000 1.3 --- changelog.txt 16 Aug 2007 15:51:04 -0000 1.4 *************** *** 1,2 **** --- 1,7 ---- + * 2007/08/16 blep + Added initial support for column fixture supported by fitness. Still missing + automatic type convertion and correct reporting of error with regard to + originating cell. + * 2007/08/15 blep Added support for light test fixture (a la CppUnitLite). |
From: Baptiste L. <bl...@us...> - 2007-08-16 15:33:05
|
Update of /cvsroot/cppunit/cppunit2/examples/input_test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32041/input_test Log Message: Directory /cvsroot/cppunit/cppunit2/examples/input_test added to the repository |
From: Baptiste L. <bl...@us...> - 2007-08-16 08:54:51
|
Update of /cvsroot/cppunit/cppunit2/makefiles/vs80 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5910/vs80 Log Message: Directory /cvsroot/cppunit/cppunit2/makefiles/vs80 added to the repository |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:48:32
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24866 Added Files: lightfixture.h testfunction.h Log Message: Added support for light test fixture (a la CppUnitLite). See lightfixture.h and example/light_fixture. Added support for direct declaration and registration of test in plain C function. See testfunction.h and example/test_function. --- NEW FILE: testfunction.h --- #ifndef CPPUT_TESTFUNCTION_H_INCLUDED # define CPPUT_TESTFUNCTION_H_INCLUDED # include "forwards.h" # include "extendeddata.h" # include "testcase.h" # include "registry.h" namespace CppUT { class TestFunctionFactory { public: typedef TestPtr result_type; // Functor return type typedef void (*TestFn)(); TestFunctionFactory( TestFn test, const char *name ) : test_( test ) , name_( name ) { } TestPtr operator()() const { return makeTestCase( test_, name_ ); } TestFn test_; const char *name_; }; } // end namespace CppUT /*! \brief Make the specified C function a test case and register it in the default Registry suite. * \code * static void myTest1() { * CPPUT_ASSERT_TRUE( false ); * } * CPPUT_REGISTER_TEST_FUNCTION( myTest1 ); * \endcode */ #define CPPUT_REGISTER_TEST_FUNCTION( testFunction ) \ CPPUT_REGISTER_TESTFACTORY_TO_DEFAULT( \ ::CppTL::fn0r( ::CppUT::TestFunctionFactory( &testFunction, #testFunction ) ) ) /*! \brief Make the specified C function a test case and register it in the specified Registry suite. * \code * static void myTest1() { * CPPUT_ASSERT_TRUE( false ); * } * CPPUT_REGISTER_TEST_FUNCTION_IN( myTest1, "BoolTest" ); * \endcode */ #define CPPUT_REGISTER_TEST_FUNCTION_IN( testFunction, parentSuiteName ) \ CPPUT_REGISTER_TESTFACTORY_IN( \ ::CppTL::fn0r( ::CppUT::TestFunctionFactory( &testFunction, #testFunction )), \ parentSuiteName ) /*! \brief Declare and register a simple test case in the default Registry suite. * The function is declared as a static void testFunction(). * \code * CPPUT_TEST_FUNCTION( myTest1 ) { * CPPUT_ASSERT_TRUE( false ); * } * \endcode */ #define CPPUT_TEST_FUNCTION( testFunctionName ) \ static void testFunctionName(); \ CPPUT_REGISTER_TEST_FUNCTION( testFunctionName ); \ static void testFunctionName() /*! \brief Declare and register a simple test case in the specified Registry suite. * The function is declared as a static void testFunction(). * \code * CPPUT_TEST_FUNCTION_IN( myTest1, "BoolTests" ) { * CPPUT_ASSERT_TRUE( false ); * } * \endcode */ #define CPPUT_TEST_FUNCTION_IN( testFunctionName, parentSuiteName ) \ static void testFunctionName(); \ CPPUT_REGISTER_TEST_FUNCTION_IN( testFunctionName, parentSuiteName ); \ static void testFunctionName() /* @todo support for extended test data CPPUT_REGISTER_TEST_FUNCTION_IN_DEFAULT_WITH_SPECIFICS( myTest, (timeOut(0.2), describe("Always fails")) ) */ #endif // CPPUT_TESTFUNCTION_H_INCLUDED --- NEW FILE: lightfixture.h --- #ifndef CPPUT_LIGHTFIXTURE_H_INCLUDED # define CPPUT_LIGHTFIXTURE_H_INCLUDED # include "forwards.h" # include "extendeddata.h" # include "testcase.h" # include "registry.h" /*! \bief Implementation detail for light fixture: make class name. */ #define _CPPUT_LF_CLASS( FixtureType, testName ) \ FixtureType##_##testName /*! \brief Implementation detail for light fixture. * Implementation Notes: a class deriving from the \c FixtureType is created * for each test. The user actually implement the member function named after \c testName. */ #define _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, specificsCode ) \ class _CPPUT_LF_CLASS(FixtureType,testName) : public FixtureType \ , public ::CppUT::TestExtendedDataFactory \ { \ public: \ static ::CppUT::TestPtr cpputMakeTest() /* TestFactory */ \ { \ ::CppUT::TestPtr test( ::CppUT::makeTestCase( \ &_CPPUT_LF_CLASS(FixtureType,testName)::cpputTest, #testName ) ); \ specificsCode \ return test; \ } \ public: \ static void cpputTest() \ { \ _CPPUT_LF_CLASS(FixtureType,testName) fixture; \ fixture.testName(); \ } \ void testName(); \ }; \ CPPUT_REGISTER_TESTFACTORY_IN( &_CPPUT_LF_CLASS(FixtureType,testName)::cpputMakeTest, \ #FixtureType ); \ void _CPPUT_LF_CLASS(FixtureType,testName)::testName() /*! \brief Declare and register a light fixture test case. * The test case is named after the function name and register in the suite named after * FixtureType. * \code * struct A // The fixture * { * A() * : text_( "hello" ) * { * } * std::string text_; * }; * CPPUT_TEST_LIGHT_FIXTURE( A, testInit ) // Defines a test case for the fixture. * { * CPPUT_CHECK_TRUE( text_ == "hello" ); // Directly access fixture members. * } * \endCode */ #define CPPUT_TEST_LIGHT_FIXTURE( FixtureType, testName ) \ _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, (void)0; ) /*! \brief Declare and register a light fixture test case with extended data. * The test case is named after the function name and register in the suite named after * FixtureType. * \code * struct A // The fixture * { * A() * : text_( "hello" ) * { * } * std::string text_; * }; * CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( A, testInit, (timeout(0.2), group("init")) ) * { * CPPUT_CHECK_TRUE( text_ == "hello" ); // Directly access fixture members. * } * \endCode */ #define CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( FixtureType, testName, specifics ) \ _CPPUT_TEST_LIGHT_FIXTURE_IMPL( FixtureType, testName, \ ( specifics ).apply( *test ); ) /*! \brief register the light fixture suite to the default Registry suite. */ #define CPPUT_REGISTER_LIGHT_FIXTURE( FixtureType ) \ CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( #FixtureType ) /*! \brief register the light fixture suite to the specified Registry suite. */ #define CPPUT_REGISTER_LIGHT_FIXTURE_IN( FixtureType, parentSuiteName ) \ CPPUT_REGISTER_SUITE_RELATIONSHIP( #FixtureType, parentSuiteName ) #endif // CPPUT_LIGHTFIXTURE_H_INCLUDED |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143 Modified Files: changelog.txt sconstruct Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** sconstruct 15 Aug 2007 11:20:57 -0000 1.33 --- sconstruct 15 Aug 2007 17:35:39 -0000 1.34 *************** *** 172,175 **** --- 172,176 ---- buildProjectInDirectory( 'examples/light_fixture' ) buildProjectInDirectory( 'examples/test_function' ) + buildProjectInDirectory( 'examples/table_fixture' ) ##buildProjectInDirectory( 'examples/opentest_demo' ) #buildProjectInDirectory( 'src/qttestdriver' ) Index: changelog.txt =================================================================== RCS file: /cvsroot/cppunit/cppunit2/changelog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** changelog.txt 15 Aug 2007 11:20:57 -0000 1.2 --- changelog.txt 15 Aug 2007 17:35:39 -0000 1.3 *************** *** 4,7 **** --- 4,9 ---- Added support for direct declaration and registration of test in plain C function. See testfunction.h and example/test_function. + Added initial support for table fixture (still like cell value automatic + conversion, but it is usable). * 2007/08/14 blep |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/examples/table_fixture In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/examples/table_fixture Added Files: .cvsignore SConscript main.cpp Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). --- NEW FILE: .cvsignore --- *.plg *.old *.WW *.old --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/tablefixture.h> #include <cpput/testfixture.h> #include <cpput/registry.h> #include <cpput/assertcommon.h> // table fixture in a TestFixture: class MyTableTest : public CppUT::TestFixture { CPPUT_TESTSUITE_BEGIN( MyTableTest ); CPPUT_TEST_TABLE( testSum ); CPPUT_TESTSUITE_END(); static void testSumData( CppUT::Table &table ) { table.addColumn( "value1" ); table.addColumn( "value2" ); table.addColumn( "sum" ); table.newRow("positive") << 1 << 2 << 3; table.newRow("negative") << -5 << -6 << -11; } void testSum( const CppUT::TableRow &row ) { CPPUT_TABLE_FETCH( int, value1 ); CPPUT_TABLE_FETCH( int, value2 ); CPPUT_TABLE_FETCH( int, sum ); CPPUT_CHECK( value1+value2 == sum ); } }; CPPUT_REGISTER_SUITE_TO_DEFAULT( MyTableTest ); // table fixture as plain C function // 1) Plain C function and late registration static void testSumData( CppUT::Table &table ) { table.addColumn( "value1" ); table.addColumn( "value2" ); table.addColumn( "sum" ); table.newRow("positive") << 1 << 2 << 3; table.newRow("negative") << -5 << -6 << -11; } static void testSum( const CppUT::TableRow &row ) { CPPUT_TABLE_FETCH( int, value1 ); CPPUT_TABLE_FETCH( int, value2 ); CPPUT_TABLE_FETCH( int, sum ); CPPUT_CHECK( value1+value2 == sum ); } // Register the suite using the table setup and test functions in the default test suite. CPPUT_REGISTER_TEST_FUNCTION_TABLE( testSum ); // 2) Plain C function with macroed declaration + register in a named suite static void testSum2Data( CppUT::Table &table ) { testSumData( table ); } // Also register the table suite, but declare the C function for testing CPPUT_TEST_FUNCTION_TABLE_IN( testSum2, "MyCFunctionTableTest" ) { CPPUT_TABLE_FETCH( int, value1 ); CPPUT_TABLE_FETCH( int, value2 ); CPPUT_TABLE_FETCH( int, sum ); CPPUT_CHECK( value1+value2 == sum ); } // Makes MyCFunctionTableTest a child of default. CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( "MyCFunctionTableTest" ); int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests(); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'table_fixture' ) |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/include/cpptl Modified Files: any.h Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). Index: any.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/any.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** any.h 13 Nov 2005 10:12:01 -0000 1.3 --- any.h 15 Aug 2007 17:35:39 -0000 1.4 *************** *** 289,293 **** if ( value->type() != CppTL::typeId( CppTL::Type<ValueType>() ) ) return 0; ! return static_cast<CppTL::Impl::AnyHolderImpl<ValueType> *>( value->holder_ )->value(); } --- 289,293 ---- if ( value->type() != CppTL::typeId( CppTL::Type<ValueType>() ) ) return 0; ! return &( static_cast<CppTL::Impl::AnyHolderImpl<ValueType> *>( value->holder_ )->value() ); } |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/examples/test_function In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/examples/test_function Added Files: .cvsignore SConscript main.cpp Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). --- NEW FILE: .cvsignore --- *.plg *.old *.WW *.old --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/testfunction.h> static void test1() { CPPUT_CHECK( 1 == 2, "1 is not equal to 2..." ); CPPUT_CHECK_EXPR( 1 + 2 == 4 ); } // Register function test1 in the default test suite CPPUT_REGISTER_TEST_FUNCTION( test1 ); // Register function test1 in the test suite named "MyTestSuite" CPPUT_REGISTER_TEST_FUNCTION_IN( test1, "MyTestSuite" ); // Declare and register a function test2 in the default test suite CPPUT_TEST_FUNCTION( test2 ) { CPPUT_CHECK_FALSE( 1 == 1, "1 is equal to 1..." ); CPPUT_CHECK_EXPR_FALSE( 1 + 1 == 2 ); } // Declare and register a function test2 in the test suite named "MyTestSuite" CPPUT_TEST_FUNCTION_IN( test3, "MyTestSuite" ) { CPPUT_CHECK_EQUAL( 1, 2 ); CPPUT_CHECK_NOT_EQUAL( 34, 34 ); } // Makes MyTestSuite a child of default. CPPUT_REGISTER_SUITE_RELATIONSHIP_TO_DEFAULT( "MyTestSuite" ); int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests(); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'test_function' ) |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/doc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/doc Modified Files: cpput.dox cpput_todo.dox Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). Index: cpput.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput.dox,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** cpput.dox 15 Aug 2007 11:20:57 -0000 1.7 --- cpput.dox 15 Aug 2007 17:35:39 -0000 1.8 *************** *** 248,251 **** --- 248,257 ---- A test case can be implemented as a plain C function "void test()". + \subsection section_tablefixture Creating TestCase: using table fixture in test cases + + Sometimes when writing test cases, you need to repeat the same test with different + input values. Table fixture are a way to do this. + + \see CPPUT_TEST_TABLE(), CPPUT_REGISTER_TEST_FUNCTION_TABLE_IN(), CPPUT_TEST_FUNCTION_TABLE_IN(). Index: cpput_todo.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput_todo.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cpput_todo.dox 15 Aug 2007 11:20:57 -0000 1.3 --- cpput_todo.dox 15 Aug 2007 17:35:39 -0000 1.4 *************** *** 92,96 **** <hr> ! \section todo_c_function_testcase Easy creation and registration of test case without fixture Needs: Using TestFixture is overkill when you need to write --- 92,96 ---- <hr> ! \section todo_c_function_testcase Easy creation and registration of test case without fixture [DONE] Needs: Using TestFixture is overkill when you need to write *************** *** 153,157 **** <hr> ! \section todo_table_based_testcase Table based test case factory Needs: It is frequent to have the needs to validate the result of a given sequence call against a set of input values. Resorting --- 153,157 ---- <hr> ! \section todo_table_based_testcase Table based test case factory [DONE] Needs: It is frequent to have the needs to validate the result of a given sequence call against a set of input values. Resorting |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/include/cpput Modified Files: tablefixture.h Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). Index: tablefixture.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/tablefixture.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tablefixture.h 27 Feb 2005 14:38:26 -0000 1.3 --- tablefixture.h 15 Aug 2007 17:35:39 -0000 1.4 *************** *** 2,10 **** # define CPPUT_TABLEFIXTURE_H_INCLUDED ! # include <cpput/testcase.h> # include <map> namespace CppUT { class CellBinder; class TableFixture; --- 2,382 ---- # define CPPUT_TABLEFIXTURE_H_INCLUDED ! # include "testcase.h" ! # include "testsuite.h" ! # include "translate.h" ! # include <cpptl/any.h> ! # include <deque> # include <map> namespace CppUT { + class Table; + class TableRow; + class TableRowHelper; + typedef CppTL::IntrusivePtr<Table> TablePtr; + + + class InvalidColumnName : public std::invalid_argument + { + public: + InvalidColumnName( const std::string &columnName ) + : std::invalid_argument( translate( "Table has no column named: " ) + columnName ) + { + } + }; + + + class DuplicateColumnName : public std::invalid_argument + { + public: + DuplicateColumnName( const std::string &columnName ) + : std::invalid_argument( translate( "Table already has a column named: " ) + columnName ) + { + } + }; + + + class InvalidColumnIndex : public std::invalid_argument + { + public: + InvalidColumnIndex() + : std::invalid_argument( translate( "Can not add cell. All columns already set." ) ) + { + } + }; + + + class BadTableCellCast : public std::runtime_error + { + public: + BadTableCellCast( const char *columnName ) + : std::runtime_error( + translate( "Column value can not be converted to specified type: " ) + columnName ) + { + } + }; + + + /*! \brief Table data for use with table test cases. + */ + class Table : public CppTL::IntrusiveCount + { + public: + /*! \brief Add a column to the table. + */ + void addColumn( const std::string &columnName ) + { + int index = int(columnsByName_.size()); + if ( !(columnsByName_.insert( ColumnsByName::value_type( columnName.c_str(), index ) ).second) ) + throw DuplicateColumnName( columnName ); + } + + /*! \brief Add a new row to the table with the specified testName. + */ + TableRowHelper newRow( const std::string &testName ); + + /*! \brief Returns the test name associated to a row. + */ + const char *rowTestName( int row ) const + { + CPPTL_ASSERT_MESSAGE( row < int(rows_.size()), "Invalid row for cell." ); + return rows_[row].testName_.c_str(); + } + + /*! \brief Returns the number of rows in the table. + */ + int rowCount() const + { + return int( rows_.size() ); + } + + /*! \brief Set the value of a cell. + * \exception InvalidColumnIndex if all cells are set. + */ + void setCellValue( int column, int row, const CppTL::Any &value ) + { + CPPTL_ASSERT_MESSAGE( row < int(rows_.size()), "Invalid row for cell." ); + if ( column > int(columnsByName_.size()) ) + throw InvalidColumnIndex(); + rows_[row].cells_[column] = value; + } + + /*! \brief Set the value of a cell. + * \exception InvalidColumnName if there is no column matching the specified name. + */ + void setCellValue( const std::string &columnName, int row, const CppTL::Any &value ) + { + CPPTL_ASSERT_MESSAGE( row < int(rows_.size()), "Invalid row for cell." ); + ColumnsByName::const_iterator it = columnsByName_.find( columnName ); + if ( it == columnsByName_.end() ) + throw InvalidColumnName( columnName ); + int column = it->second; + rows_[row].cells_[column] = value; + } + + /*! \brief Get the value of a cell. + * \exception InvalidColumnName if there is no column matching the specified name. + */ + const CppTL::Any &getCellValue( const char *columnName, int row ) const + { + CPPTL_ASSERT_MESSAGE( row < int(rows_.size()), "Invalid row for cell." ); + ColumnsByName::const_iterator it = columnsByName_.find( columnName ); + if ( it == columnsByName_.end() ) + throw InvalidColumnName( columnName ); + int column = it->second; + return rows_[row].cells_[column]; + } + + /// Returns new row index. + int addRow( const std::string &testName ) + { + rows_.push_back( Row( testName, int(columnsByName_.size()) ) ); + return int( rows_.size() - 1 ); + } + + private: + typedef std::vector<CppTL::Any> RowData; + struct Row + { + Row( const std::string &testName, int columnCount ) + : testName_( testName ) + , cells_( columnCount ) + { + } + + RowData cells_; + CppTL::ConstString testName_; + }; + typedef std::deque< Row > Rows; + // std::vector<CppTL::ConstString> columns_; + typedef std::map<CppTL::ConstString,int> ColumnsByName; + ColumnsByName columnsByName_; + Rows rows_; + }; + + + + /*! \brief Table helper to add data in a row. + * \see Table. + */ + class TableRowHelper + { + public: + TableRowHelper( Table &table, int row ) + : table_(table) + , row_( row ) + , column_( 0 ) + { + } + + TableRowHelper &operator <<( const CppTL::Any &value ) + { + table_.setCellValue( column_++, row_, value ); + return *this; + } + + TableRowHelper &set( const std::string &columnName, const CppTL::Any &value ) + { + table_.setCellValue( columnName, row_, value ); + return *this; + } + + private: + Table &table_; + int row_; + int column_; + }; + + + inline TableRowHelper + Table::newRow( const std::string &testName ) + { + int row = addRow( testName ); + return TableRowHelper( *this, row ); + } + + + /*! \brief Table row proxy passed to the test case. + * \see CPPUT_TABLE_FETCH() + */ + class TableRow + { + public: + TableRow( const TablePtr &table, int row ) + : table_( table ) + , row_( row ) + { + } + + const CppTL::Any &getCellValue( const char *columnName ) const + { + return table_->getCellValue( columnName, row_ ); + } + + private: + TablePtr table_; + int row_; + }; + + + // implementation detail. + template<class ValueType> + const ValueType & + getTableCell( const TableRow &row, const char *columnName, CppTL::Type<ValueType> type ) + { + const ValueType *value = ::get( &(row.getCellValue( columnName )), type ); + if ( value == 0 ) + throw BadTableCellCast( columnName ); + return *value; + } + + + /*! \brief Fetch the value of the cell with the specified column name. + * \exception InvalidColumnName if there is no column matching the specified name. + * \exception BadTableCellCast if the cell value can not be converted into the specified type. + * \todo allow usage of converter for convertion between similar types. + */ + #define CPPUT_TABLE_FETCH( CellType, columnName ) \ + CellType columnName = ::CppUT::getTableCell( row, #columnName, ::CppTL::Type<CellType>() ); + + + /*! \brief Declares a table test case for a TestFixture. + * Create a nested TestSuite in the fixture and instantiate a test case for each row + * of the table. + * \param testMethod Must have the following signature: void testMethod( const TableRow &row ); + * Another static function with the name of testMethod suffixed with Data + * must exist with the following signature: + * void testMethodData( Table &table ); + * \code + * class MyTableTest : public TestTableFixture + * { + * CPPUT_TESTSUITE_BEGIN( MyTableTest ); + * CPPUT_TABLE_TEST( testSum ); + * CPPUT_TESTSUITE_END(); + * static void testSumData( CppUT::Table &table ) + * { + * table.addColumn( "value1" ); + * table.addColumn( "value2" ); + * table.addColumn( "sum" ); + * table.newRow("positive") << 1 << 2 << 3; + * table.newRow("negative") << -5 << -6 << -11; + * } + * + * void testSum( const CppUT::TableRow &row ) + * { + * CPPUT_TABLE_FETCH( int, v1 ); + * CPPUT_TABLE_FETCH( int, v2 ); + * CPPUT_TABLE_FETCH( int, sum ); + * CPPUT_CHECK_TRUE( v1+v2 == sum ); + * } + * }; + * \endcode + * Implementation notes: + * - Create a suite named after the test function. + * - Create Table and initialize TablePtr. + * - Generate the table calling the static data population function taking the Table as parameter. + * Function is static to avoid possible interaction between test cases. + * - For each row, create a test case and bind it to a TableRow, adding it to the TestSuite. + * \see Table, TableRowHelper, CPPUT_TABLE_FETCH. + * \todo handle exception thrown during data setup. + */ + # define CPPUT_TEST_TABLE( testMethod ) \ + { \ + ::CppUT::TestSuitePtr tableSuite = ::CppUT::makeTestSuite( #testMethod ); \ + ::CppUT::TablePtr table( new ::CppUT::Table() ); \ + testMethod##Data( *table ); \ + int rowCount = table->rowCount(); \ + for ( int row = 0; row < rowCount; ++row ) \ + { \ + fixture = fixtureFactory(); \ + tableSuite->add( ::CppUT::makeFixtureTestCase( fixture, \ + ::CppTL::bind( ::CppTL::memfn1( fixture, \ + &CppUT_ThisType::testMethod ), \ + ::CppUT::TableRow( table, row ) ), \ + table->rowTestName(row) ) ); \ + } \ + suite->add( tableSuite ); \ + } + + + class TestFunctionTableSuiteFactory + { + public: + typedef TestPtr result_type; + typedef void (*DataFn)( Table &table ); + typedef void (*TestFn)( const TableRow &row ); + + TestFunctionTableSuiteFactory( const char *suiteName, DataFn data, TestFn test ) + : suiteName_( suiteName ) + , data_( data ) + , test_( test ) + { + } + + /*! \brief create the test suite and populate it with test case from the table. + * \todo handle exception thrown during data setup. + */ + TestPtr operator()() const + { + TestSuitePtr suite( new TestSuite( suiteName_ ) ); + TablePtr table( new Table() ); + data_( *table ); + int rowCount = table->rowCount(); + for ( int row = 0; row < rowCount; ++row ) + { + suite->add( makeTestCase( CppTL::bind( CppTL::cfn1( test_ ), + TableRow( table, row ) ), + table->rowTestName(row) ) ); + } + return suite.get(); + } + + private: + const char *suiteName_; + DataFn data_; + TestFn test_; + }; + + + /*! \brief Create a table fixture TestSuite and register it to the default Registry suite. + * + * Generate test case for a table in a suite using a C function to setup the table, and + * another one to execute the test cases. + * + * \param testFunction Must have the following signature: void testFunction( const TableRow &row ) + * Another static function with the name of testMethod suffixed with Data + * must exist with the following signature: + * void testMethodData( Table &table ); + * + * + */ + # define CPPUT_REGISTER_TEST_FUNCTION_TABLE( testFunction ) \ + CPPUT_REGISTER_TESTFACTORY_TO_DEFAULT( \ + CppTL::fn0r( ::CppUT::TestFunctionTableSuiteFactory( #testFunction, \ + testFunction##Data, \ + testFunction ) ) ) + + # define CPPUT_REGISTER_TEST_FUNCTION_TABLE_IN( testFunction, parentSuiteName ) \ + CPPUT_REGISTER_TESTFACTORY_IN( \ + CppTL::fn0r( ::CppUT::TestFunctionTableSuiteFactory( #testFunction, \ + testFunction##Data, \ + testFunction ) ), \ + parentSuiteName ) + + # define CPPUT_TEST_FUNCTION_TABLE( testFunction ) \ + static void testFunction( const ::CppUT::TableRow &row ); \ + CPPUT_REGISTER_TEST_FUNCTION_TABLE( testFunction ); \ + static void testFunction( const ::CppUT::TableRow &row ) + + # define CPPUT_TEST_FUNCTION_TABLE_IN( testFunction, parentSuiteName ) \ + static void testFunction( const ::CppUT::TableRow &row ); \ + CPPUT_REGISTER_TEST_FUNCTION_TABLE_IN( testFunction, parentSuiteName ); \ + static void testFunction( const ::CppUT::TableRow &row ) + + + #if 0 + + // old stuff + class CellBinder; class TableFixture; *************** *** 117,121 **** Actions actions_; }; ! } // namespace CppUT --- 489,493 ---- Actions actions_; }; ! # endif } // namespace CppUT |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:35:47
|
Update of /cvsroot/cppunit/cppunit2/examples/light_fixture In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20143/examples/light_fixture Added Files: .cvsignore SConscript main.cpp Log Message: Added initial support for table fixture (still like cell value automatic conversion, but it is usable). --- NEW FILE: .cvsignore --- *.plg *.old *.WW *.old --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/lightfixture.h> struct Point { Point( int x, int y ) : x_( x ) , y_( y ) { } int squaredLength() const { return x_*x_ + y_*y_; } void add( const Point &other ) { x_ += other.x_; y_ += other.y_; } int x_; int y_; }; struct LineTest { LineTest() : p1_( 1, 0 ) , p2_( 0, 2 ) { } Point p1_; Point p2_; }; // In the light fixture test you can directly access fixture members CPPUT_TEST_LIGHT_FIXTURE( LineTest, testSquaredLength ) { CPPUT_CHECK_EQUAL( 1, p1_.squaredLength() ); CPPUT_CHECK_EQUAL( 2*2, p2_.squaredLength() ); } CPPUT_TEST_LIGHT_FIXTURE_WITH_SPECIFICS( LineTest, testAdd, timeOut(0.2) ) { p1_.add( p2_ ); CPPUT_CHECK_EQUAL( 1+2*2, p1_.squaredLength() ); } // Register the light fixture test suite to the default test suite. CPPUT_REGISTER_LIGHT_FIXTURE( LineTest ); int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests(); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'light_fixture' ) |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:33:38
|
Update of /cvsroot/cppunit/cppunit2/examples/light_fixture In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19409/light_fixture Log Message: Directory /cvsroot/cppunit/cppunit2/examples/light_fixture added to the repository |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:32:58
|
Update of /cvsroot/cppunit/cppunit2/examples/table_fixture In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19042/table_fixture Log Message: Directory /cvsroot/cppunit/cppunit2/examples/table_fixture added to the repository |
From: Baptiste L. <bl...@us...> - 2007-08-15 17:32:21
|
Update of /cvsroot/cppunit/cppunit2/examples/test_function In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19019/test_function Log Message: Directory /cvsroot/cppunit/cppunit2/examples/test_function added to the repository |
From: Baptiste L. <bl...@us...> - 2007-08-15 11:21:02
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8069/include/cpptl Modified Files: config.h Log Message: Added support for light test fixture (a la CppUnitLite). See lightfixture.h and example/light_fixture. Added support for direct declaration and registration of test in plain C function. See testfunction.h and example/test_function. Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/config.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** config.h 6 Sep 2006 19:23:26 -0000 1.22 --- config.h 15 Aug 2007 11:20:57 -0000 1.23 *************** *** 296,299 **** --- 296,317 ---- } + template<class TargetType, class SourceType> + TargetType checkedCast( SourceType *pointer, Type<TargetType> ) + { + TargetType casted = dynamic_cast<TargetType>( pointer ); + CPPTL_ASSERT_MESSAGE( casted != 0, "CPPTL_CHECKED_CAST: wrong TargetType." ); + return casted; + } + + #if defined(NDEBUG) || defined(CPPTL_NO_RTTI) + # define CPPTL_CHECKED_CAST( TargetType, pointer ) \ + static_cast<TargetType>( pointer ) + #else + # define CPPTL_CHECKED_CAST( TargetType, pointer ) \ + ::CppTL::checkedCast( pointer, ::CppTL::Type<TargetType>() ) + #endif + + + } // namespace CppTL |
From: Baptiste L. <bl...@us...> - 2007-08-15 11:21:02
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8069 Modified Files: TODO changelog.txt sconstruct Log Message: Added support for light test fixture (a la CppUnitLite). See lightfixture.h and example/light_fixture. Added support for direct declaration and registration of test in plain C function. See testfunction.h and example/test_function. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** sconstruct 14 Aug 2007 17:30:52 -0000 1.32 --- sconstruct 15 Aug 2007 11:20:57 -0000 1.33 *************** *** 170,173 **** --- 170,175 ---- buildProjectInDirectory( 'examples/log_demo' ) buildProjectInDirectory( 'examples/stringize_demo' ) + buildProjectInDirectory( 'examples/light_fixture' ) + buildProjectInDirectory( 'examples/test_function' ) ##buildProjectInDirectory( 'examples/opentest_demo' ) #buildProjectInDirectory( 'src/qttestdriver' ) Index: changelog.txt =================================================================== RCS file: /cvsroot/cppunit/cppunit2/changelog.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** changelog.txt 14 Aug 2007 17:30:52 -0000 1.1 --- changelog.txt 15 Aug 2007 11:20:57 -0000 1.2 *************** *** 1,7 **** * 2007/08/14 blep Modified assertion implementation to force evaluation of user condition expression first, while preserving delegation to function, overloading and optional parameters feature. ! See CPPUT_BEGIN_ASSERTION_MACRO() documentation in testinfo.h for an example ! to update your custom assertion code. --- 1,13 ---- + * 2007/08/15 blep + Added support for light test fixture (a la CppUnitLite). + See lightfixture.h and example/light_fixture. + Added support for direct declaration and registration of test in plain C + function. See testfunction.h and example/test_function. + * 2007/08/14 blep Modified assertion implementation to force evaluation of user condition expression first, while preserving delegation to function, overloading and optional parameters feature. ! See CPPUT_BEGIN_ASSERTION_MACRO() documentation in testinfo.h for an ! example to update your custom assertion code. Index: TODO =================================================================== RCS file: /cvsroot/cppunit/cppunit2/TODO,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TODO 14 Aug 2007 17:30:52 -0000 1.4 --- TODO 15 Aug 2007 11:20:57 -0000 1.5 *************** *** 1 **** --- 1,2 ---- * complete works on the CommandLines library => likely moved to opentest. + * add support for ExtendedData in C function test case (CPPUT_TEST_FUNCTION...) |