[Cppunit-cvs] cppunit2/src/cpput cpput.vcproj,1.27,1.28 exceptionguard.cpp,1.2,1.3 testcase.cpp,1.9,
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-02-27 14:38:40
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11085/src/cpput Modified Files: cpput.vcproj exceptionguard.cpp testcase.cpp testsuite.cpp Removed Files: functor.py Log Message: * changed cppunit 2 to use the new functors (cpptl/functor.h). bind_cfn & bind_memfn simplified some of the test code. Index: cpput.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/cpput.vcproj,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** cpput.vcproj 27 Feb 2005 10:16:37 -0000 1.27 --- cpput.vcproj 27 Feb 2005 14:38:27 -0000 1.28 *************** *** 212,218 **** </File> <File - RelativePath="..\..\include\cpptl\functor3.h"> - </File> - <File RelativePath="..\..\include\cpptl\sharedptr.h"> </File> --- 212,215 ---- *************** *** 360,369 **** </File> <File - RelativePath="..\..\include\cpput\functor.h"> - </File> - <File - RelativePath=".\functor.py"> - </File> - <File RelativePath="..\..\include\cpput\message.h"> </File> --- 357,360 ---- Index: testsuite.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testsuite.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** testsuite.cpp 27 Feb 2005 10:17:05 -0000 1.6 --- testsuite.cpp 27 Feb 2005 14:38:27 -0000 1.7 *************** *** 1,4 **** #include <cpput/testsuite.h> - #include <cpput/functor.h> #include <cpput/testvisitor.h> --- 1,3 ---- Index: testcase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testcase.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testcase.cpp 27 Feb 2005 10:17:05 -0000 1.9 --- testcase.cpp 27 Feb 2005 14:38:27 -0000 1.10 *************** *** 1,5 **** #include <cpput/testcase.h> #include <cpput/assert.h> ! #include <cpput/functor.h> #include <cpput/message.h> #include <cpput/exceptionguard.h> --- 1,5 ---- #include <cpput/testcase.h> #include <cpput/assert.h> ! #include <cpptl/functor.h> #include <cpput/message.h> #include <cpput/exceptionguard.h> *************** *** 45,55 **** AbstractTestCase::runTest( const ExceptionGuard &guardsChain ) { ! bool initialized = guardsChain.protect( makeMemFn0( this, ! &AbstractTestCase::setUp ) ); if ( initialized ) { ! guardsChain.protect( makeMemFn0( this, &AbstractTestCase::run ) ); ! guardsChain.protect( makeMemFn0( this, &AbstractTestCase::tearDown) ); } --- 45,55 ---- AbstractTestCase::runTest( const ExceptionGuard &guardsChain ) { ! bool initialized = guardsChain.protect( CppTL::memfn0( this, ! &AbstractTestCase::setUp ) ); if ( initialized ) { ! guardsChain.protect( CppTL::memfn0( this, &AbstractTestCase::run ) ); ! guardsChain.protect( CppTL::memfn0( this, &AbstractTestCase::tearDown) ); } *************** *** 74,78 **** // //////////////////////////////////////////////////////////////////// ! TestCase::TestCase( const Functor0 &run, const CppTL::ConstString &name ) : AbstractTestCase( name ) --- 74,78 ---- // //////////////////////////////////////////////////////////////////// ! TestCase::TestCase( const CppTL::Functor0 &run, const CppTL::ConstString &name ) : AbstractTestCase( name ) *************** *** 82,88 **** ! TestCase::TestCase( const Functor0 &setUp, ! const Functor0 &run, ! const Functor0 &tearDown, const CppTL::ConstString &name ) : AbstractTestCase( name ) --- 82,88 ---- ! TestCase::TestCase( const CppTL::Functor0 &setUp, ! const CppTL::Functor0 &run, ! const CppTL::Functor0 &tearDown, const CppTL::ConstString &name ) : AbstractTestCase( name ) *************** *** 119,124 **** ! TestPtr makeTestCase( const Functor0 &run, ! const CppTL::ConstString &name ) { return TestPtr( new TestCase( run, name ) ); --- 119,124 ---- ! TestPtr makeTestCase( const CppTL::Functor0 &run, ! const CppTL::ConstString &name ) { return TestPtr( new TestCase( run, name ) ); *************** *** 126,133 **** ! TestPtr makeTestCase( const Functor0 &setUp, ! const Functor0 &run, ! const Functor0 &tearDown, ! const CppTL::ConstString &name ) { return TestPtr( new TestCase( setUp, run, tearDown, name ) ); --- 126,133 ---- ! TestPtr makeTestCase( const CppTL::Functor0 &setUp, ! const CppTL::Functor0 &run, ! const CppTL::Functor0 &tearDown, ! const CppTL::ConstString &name ) { return TestPtr( new TestCase( setUp, run, tearDown, name ) ); --- functor.py DELETED --- Index: exceptionguard.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/exceptionguard.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** exceptionguard.cpp 27 Feb 2005 10:17:05 -0000 1.2 --- exceptionguard.cpp 27 Feb 2005 14:38:27 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- #include <cpput/testinfo.h> #include <cpput/typehelper.h> + #include <cpptl/functor.h> namespace CppUT { *************** *** 10,19 **** struct ExceptionGuardElement::Context { ! Context( Functor0 test ) : test_( test ) { } ! Functor0 test_; }; --- 11,20 ---- struct ExceptionGuardElement::Context { ! Context( CppTL::Functor0 test ) : test_( test ) { } ! CppTL::Functor0 test_; }; *************** *** 130,134 **** bool ! ExceptionGuard::protect( Functor0 test ) const { ExceptionGuardElement::Context context( test ); --- 131,135 ---- bool ! ExceptionGuard::protect( CppTL::Functor0 test ) const { ExceptionGuardElement::Context context( test ); |