cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 18)
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...> - 2005-09-06 07:14:57
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13773/include/cpptl Modified Files: config.h Log Message: * added CPPTL_ARRAY_SIZE * added typedef LargestInt and LargestUnsignedInt Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/config.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** config.h 4 Jul 2005 08:09:29 -0000 1.19 --- config.h 6 Sep 2005 07:14:49 -0000 1.20 *************** *** 34,38 **** # if _MSC_VER >= 1310 // VC++ 7.1 # define CPPTL_HAS_INT64 1 ! //# define CPPTL_HAS_LONGLONG 1 // support but not by default. # pragma warning( disable : 4800 ) // forcing value to bool performance warning # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch --- 34,38 ---- # if _MSC_VER >= 1310 // VC++ 7.1 # define CPPTL_HAS_INT64 1 ! //# define CPPTL_HAS_LONGLONG 1 // supported but not by default. # pragma warning( disable : 4800 ) // forcing value to bool performance warning # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch *************** *** 44,47 **** --- 44,49 ---- # endif + # define CPPTL_HAS__SNPRINTF 1 + # endif *************** *** 202,205 **** --- 204,210 ---- } + /// Evaluates to the number of elements in the array + #define CPPTL_ARRAY_SIZE( array ) (sizeof(array)/sizeof((array)[0])) + /////////////////////////////////////////////////////////////////////////// *************** *** 227,230 **** --- 232,245 ---- # endif + + #ifndef CPPTL_NO_INT64 + typedef CppTL::int64_t LargestInt; + typedef CppTL::uint64_t LargestUnsignedInt; + #else + typedef int LargestInt; + typedef unsigned int LargestUnsignedInt; + #endif + + typedef unsigned int size_type; |
From: Baptiste L. <bl...@us...> - 2005-09-06 07:14:57
|
Update of /cvsroot/cppunit/cppunit2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13773/src Modified Files: cpput_lib.suo Log Message: * added CPPTL_ARRAY_SIZE * added typedef LargestInt and LargestUnsignedInt Index: cpput_lib.suo =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput_lib.suo,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 Binary files /tmp/cvsdPmZfZ and /tmp/cvsUCFNA0 differ |
From: Baptiste L. <bl...@us...> - 2005-09-06 07:14:57
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13773/src/cpput Modified Files: cpput.vcproj Log Message: * added CPPTL_ARRAY_SIZE * added typedef LargestInt and LargestUnsignedInt Index: cpput.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/cpput.vcproj,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** cpput.vcproj 8 Aug 2005 22:10:21 -0000 1.38 --- cpput.vcproj 6 Sep 2005 07:14:49 -0000 1.39 *************** *** 133,140 **** Filter=""> <File ! RelativePath=".\SConscript"> </File> <File ! RelativePath="..\cpputtest\SConscript"> </File> <File --- 133,140 ---- Filter=""> <File ! RelativePath="..\cpputtest\SConscript"> </File> <File ! RelativePath=".\SConscript"> </File> <File *************** *** 451,454 **** --- 451,457 ---- </File> <File + RelativePath="..\..\include\cpput\inputtest.h"> + </File> + <File RelativePath=".\lighttestrunner.cpp"> </File> |
From: Baptiste L. <bl...@us...> - 2005-09-06 07:14:57
|
Update of /cvsroot/cppunit/cppunit2/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13773/doc Modified Files: cppunit2todo.txt opentesttodo.txt Log Message: * added CPPTL_ARRAY_SIZE * added typedef LargestInt and LargestUnsignedInt Index: opentesttodo.txt =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/opentesttodo.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** opentesttodo.txt 15 Nov 2004 20:41:12 -0000 1.1 --- opentesttodo.txt 6 Sep 2005 07:14:49 -0000 1.2 *************** *** 108,112 **** * optionally select test to run from the command-line ! Status: partially implemented in opentest/texttestdriver.h. Test monitoring --- 108,114 ---- * optionally select test to run from the command-line ! *Status*: ! ! * 2004/11/22: partially implemented in opentest/texttestdriver.h. Test monitoring Index: cppunit2todo.txt =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cppunit2todo.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cppunit2todo.txt 16 Nov 2004 08:47:29 -0000 1.2 --- cppunit2todo.txt 6 Sep 2005 07:14:49 -0000 1.3 *************** *** 42,45 **** --- 42,47 ---- * testrunresult.h + *Status*: done (2004/11/22) + What need to be changed? ------------------------ *************** *** 50,53 **** --- 52,57 ---- * TestResult should be integrated to TestRunner. + *Status*: done (2004/11/22) + Features to add =============== *************** *** 63,66 **** --- 67,73 ---- Should also find a way to integrate this with test fixture declaration. + *Status*: done (2004/11/22). A warning doc has been written. Update of + info after declaration will simply not be taken in account. + Test configuration information ------------------------------ *************** *** 82,85 **** --- 89,94 ---- actual values, assertion location... + *Status*: done (2004/11/22). + Logging stream -------------- *************** *** 96,99 **** --- 105,115 ---- strategy is used (one log per thread, one log for all thread...). + *Status*: + + * 2004/11/22: Study show that it can not be done. std::basic_stream are + not thread-safe. An alternative solution could be to embed the stream in + TestInfoData and returning it from a function. Further study are required + to see how this would work with context switch. + Checking assertions vs. aborting assertions ------------------------------------------- *************** *** 112,115 **** --- 128,136 ---- be replaced by direct update of the current assertion `Properties`. + *Status*: + + * 2004/11/22: framework has been modified to support checking assertions. Macro need to + be added to correctly set the assertion mode (CPPUT_CHECK_xxx). + Test plug-in wrapper application -------------------------------- |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:38:52
|
Update of /cvsroot/cppunit/cppunit2/examples/log_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26205/examples/log_demo Modified Files: main.cpp Log Message: * Removed bad comment Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/log_demo/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 11 Aug 2005 07:18:23 -0000 1.1 --- main.cpp 11 Aug 2005 07:38:44 -0000 1.2 *************** *** 6,11 **** - // Checking assertion do not abort the test uppon failure: - // all the failing assertions below will be reported by the test framework static void testLogDemo() { --- 6,9 ---- |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:32
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/src/cpput Modified Files: lighttestrunner.cpp testinfo.cpp Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. Index: lighttestrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lighttestrunner.cpp 10 Aug 2005 21:34:29 -0000 1.7 --- lighttestrunner.cpp 11 Aug 2005 07:18:24 -0000 1.8 *************** *** 74,77 **** --- 74,79 ---- printf( "Testing %s : ", getTestPath().c_str() ); assertions_.clear(); + logs_.clear(); + results_.clear(); ++testRun_; bool succeeded = testCase->runTest(); *************** *** 85,91 **** : "assertion"; report_ += "-> " + getTestPath() + " : " + resultType + "\n"; ! Assertions::const_iterator it = assertions_.begin(); ! for ( ; it != assertions_.end(); ++it ) ! reportFailure( *it ); report_ += "\n"; } --- 87,102 ---- : "assertion"; report_ += "-> " + getTestPath() + " : " + resultType + "\n"; ! //Assertions::const_iterator it = assertions_.begin(); ! //for ( ; it != assertions_.end(); ++it ) ! // reportFailure( *it ); ! ResultElements::const_iterator it = results_.begin(); ! for ( ; it != results_.end(); ++it ) ! { ! const ResultElement &result = *it; ! if ( result.isLog_ ) ! reportLog( logs_[result.index_] ); ! else ! reportFailure( assertions_[ result.index_ ] ); ! } report_ += "\n"; } *************** *** 95,100 **** LightTestRunner::addResultLog( const OpenTest::Value &log ) { ! // discard log for the time being. Need to incorporate them ! // into a single list with assertions. } --- 106,114 ---- LightTestRunner::addResultLog( const OpenTest::Value &log ) { ! ResultElement element; ! element.isLog_ = true; ! element.index_ = int(logs_.size()); ! results_.push_back( element ); ! logs_.push_back( log ); } *************** *** 103,116 **** LightTestRunner::addResultAssertion( const Assertion &assertion ) { assertions_.push_back( assertion ); } - void - LightTestRunner::setTestStatus( const TestStatus &status ) - { - } - - CppTL::ConstString LightTestRunner::getTestPath() const --- 117,128 ---- LightTestRunner::addResultAssertion( const Assertion &assertion ) { + ResultElement element; + element.isLog_ = false; + element.index_ = int(assertions_.size()); + results_.push_back( element ); assertions_.push_back( assertion ); } CppTL::ConstString LightTestRunner::getTestPath() const *************** *** 149,152 **** --- 161,177 ---- + void + LightTestRunner::reportLog( const OpenTest::Value &log ) + { + report_ += "Log:\n"; + if ( log.isConvertibleTo( OpenTest::Value::vtString ) ) + report_ += log.asString(); + else + report_ += log.toString(); + if ( report_[ report_.length() -1 ] != '\n' ) + report_ += "\n\n"; + } + + } // namespace CppUT Index: testinfo.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testinfo.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** testinfo.cpp 10 Aug 2005 21:34:29 -0000 1.14 --- testinfo.cpp 11 Aug 2005 07:18:24 -0000 1.15 *************** *** 337,340 **** --- 337,345 ---- } + void log( const CppTL::ConstString &log ) + { + TestInfo::threadInstance().log( log ); + } + |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:32
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/include/cpput Modified Files: lighttestrunner.h testinfo.h Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. Index: testinfo.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/testinfo.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** testinfo.h 10 Aug 2005 21:34:29 -0000 1.13 --- testinfo.h 11 Aug 2005 07:18:24 -0000 1.14 *************** *** 133,138 **** virtual void addResultAssertion( const Assertion &assertion ) = 0; - - virtual void setTestStatus( const TestStatus &status ) = 0; }; --- 133,136 ---- *************** *** 215,218 **** --- 213,219 ---- void CPPUT_API log( const OpenTest::Value &log ); + // This overload allows usage of StringConcatenator... + void CPPUT_API log( const CppTL::ConstString &log ); + } // namespace CppUT Index: lighttestrunner.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/lighttestrunner.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lighttestrunner.h 8 Aug 2005 22:10:20 -0000 1.3 --- lighttestrunner.h 11 Aug 2005 07:18:24 -0000 1.4 *************** *** 28,33 **** virtual void addResultAssertion( const Assertion &assertion ); - virtual void setTestStatus( const TestStatus &status ); - private: void runTest( const TestPtr &test ); --- 28,31 ---- *************** *** 36,39 **** --- 34,44 ---- CppTL::ConstString getTestPath() const; void reportFailure( const Assertion &failure ); + void reportLog( const OpenTest::Value &log ); + + struct ResultElement + { + int index_; + bool isLog_; + }; typedef std::deque<TestPtr> Tests; *************** *** 42,47 **** --- 47,56 ---- TestPath testPath_; CppTL::StringBuffer report_; + typedef std::deque<OpenTest::Value> Logs; + Logs logs_; typedef std::deque<Assertion> Assertions; Assertions assertions_; + typedef std::deque<ResultElement> ResultElements; + ResultElements results_; unsigned int testRun_; unsigned int testFailed_; |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:32
|
Update of /cvsroot/cppunit/cppunit2/examples/input_based_test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/examples/input_based_test Modified Files: input_based_test.vcproj Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. Index: input_based_test.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/input_based_test/input_based_test.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** input_based_test.vcproj 8 Aug 2005 22:07:58 -0000 1.2 --- input_based_test.vcproj 11 Aug 2005 07:18:23 -0000 1.3 *************** *** 71,75 **** <Tool Name="VCCLCompilerTool" ! AdditionalIncludeDirectories="..\..\include" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="0" --- 71,75 ---- <Tool Name="VCCLCompilerTool" ! AdditionalIncludeDirectories="..\..\include;../.." PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="0" |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:31
|
Update of /cvsroot/cppunit/cppunit2/examples/log_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/examples/log_demo Added Files: SConscript main.cpp Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/testcase.h> #include <opentest/texttestdriver.h> #include <opentest/properties.h> #include <cpptl/stringtools.h> // Checking assertion do not abort the test uppon failure: // all the failing assertions below will be reported by the test framework static void testLogDemo() { for ( int index =0; index < 5; ++index ) { CppUT::log( "index is " + CppTL::toString(index) ); CPPUT_CHECK_EXPR( index % 2 == 0 ); } } int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testLogDemo ), "testLogDemo" ) ); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'log_demo' ) |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:31
|
Update of /cvsroot/cppunit/cppunit2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/src Modified Files: cpput_lib.suo Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. Index: cpput_lib.suo =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput_lib.suo,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 Binary files /tmp/cvsMvV3i2 and /tmp/cvsuDWP8v differ |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:31
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769 Modified Files: sconstruct Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** sconstruct 8 Aug 2005 22:11:14 -0000 1.14 --- sconstruct 11 Aug 2005 07:18:23 -0000 1.15 *************** *** 130,132 **** --- 130,133 ---- buildProjectInDirectory( 'examples/parametrized_test' ) buildProjectInDirectory( 'examples/checking_assertions' ) + buildProjectInDirectory( 'examples/log_demo' ) #buildProjectInDirectory( 'src/qttestdriver' ) |
From: Baptiste L. <bl...@us...> - 2005-08-11 07:16:51
|
Update of /cvsroot/cppunit/cppunit2/examples/log_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23677/examples/log_demo Log Message: Directory /cvsroot/cppunit/cppunit2/examples/log_demo added to the repository |
From: Baptiste L. <bl...@us...> - 2005-08-10 21:34:49
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27815/include/cpput Modified Files: assert.h forwards.h testinfo.h Log Message: * Replaced function in namespace TestInfo by exposing the TestInfoData class and renaming it TestInfo. TestInfo in now an exposed per thread singleton. * startNewTest() is now called from TestCase::runTest() instead of being the test runner responsability. There still a few call to this method in cpput bootstrap test (which use assertion without run a test case). Index: testinfo.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/testinfo.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** testinfo.h 10 Aug 2005 07:42:52 -0000 1.12 --- testinfo.h 10 Aug 2005 21:34:29 -0000 1.13 *************** *** 4,7 **** --- 4,8 ---- # include <cpput/forwards.h> # include <cpput/message.h> + # include <cpptl/intrusiveptr.h> # include <opentest/properties.h> *************** *** 122,126 **** ! class CPPUT_API TestResultUpdater { public: --- 123,127 ---- ! class CPPUT_API TestResultUpdater : public CppTL::IntrusiveCount { public: *************** *** 148,152 **** }; ! namespace TestInfo { class CPPUT_API ScopedContextOverride { --- 149,155 ---- }; ! class TestInfo : public CppTL::IntrusiveCount ! { ! public: class CPPUT_API ScopedContextOverride { *************** *** 157,192 **** private: ! TestInfoDataPtr context_; }; ! void CPPUT_API setTestResultUpdater( TestResultUpdater &updater ); ! ! void CPPUT_API startNewTest(); ! TestStatus &CPPUT_API getUpdatedTestStatus(); ! void CPPUT_API newAssertion( AssertionType type, ! const char *fileName, ! unsigned int lineNumber, ! const char *functionName = 0 ); ! Assertion &CPPUT_API currentAssertion(); ! /// Realize the current assertion. ! /// Add data about the current assertion to the test result. ! /// @exception AbortingAssertionException If assertionType was set to ! /// abortingAssertion. ! void CPPUT_API realizeAssertion(); ! void CPPUT_API handleUnexpectedException( const Assertion &fault ); ! void CPPUT_API log( const OpenTest::Value &log ); - /// Only for using for unit test of the framework itself void setAbortingAssertionMode( AbortingAssertionMode mode ); ! } // namespace TestInfo } // namespace CppUT --- 160,217 ---- private: ! TestInfoPtr context_; }; + static TestInfo &threadInstance(); ! TestInfo(); ! void setTestResultUpdater( TestResultUpdater &updater ); ! void startNewTest(); ! TestStatus &getUpdatedTestStatus(); ! void newAssertion( AssertionType type, ! const char *fileName, ! unsigned int lineNumber, ! const char *functionName = 0 ); ! ! Assertion ¤tAssertion(); ! void realizeAssertion(); ! void handleUnexpectedException( const Assertion &fault ); void setAbortingAssertionMode( AbortingAssertionMode mode ); ! void log( const OpenTest::Value &log ); ! ! private: ! TestResultUpdater *updater_; ! TestStatus testStatus_; ! Assertion currentAssertion_; ! AssertionType assertionType_; ! AbortingAssertionMode abortingAssertionMode_; ! unsigned int assertionCount_; ! unsigned int failedAssertionCount_; ! }; ! ! ! //void CPPUT_API newAssertion( AssertionType type, ! // const char *fileName, ! // unsigned int lineNumber, ! // const char *functionName = 0 ); ! ! Assertion &CPPUT_API currentAssertion(); ! ! /// Realize the current assertion. ! /// Add data about the current assertion to the test result. ! /// @exception AbortingAssertionException If assertionType was set to ! /// abortingAssertion. ! void CPPUT_API realizeAssertion(); ! ! void CPPUT_API log( const OpenTest::Value &log ); } // namespace CppUT Index: assert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/assert.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** assert.h 8 Aug 2005 22:10:20 -0000 1.11 --- assert.h 10 Aug 2005 21:34:29 -0000 1.12 *************** *** 116,121 **** // Available if __C99__FUNC__ is defined: // http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.vacpp7a.doc/language/ref/clrapxaix_macros.htm ! # define CPPUT_CHECK_POINT( assertionType ) \ ! ::CppUT::TestInfo::newAssertion( ::CppUT::assertionType, __FILE__, __LINE__) # define CPPUT_BEGIN_ASSERTION_MACRO() \ --- 116,123 ---- // Available if __C99__FUNC__ is defined: // http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.vacpp7a.doc/language/ref/clrapxaix_macros.htm ! # define CPPUT_CHECK_POINT( assertionType ) \ ! ::CppUT::TestInfo::threadInstance().newAssertion( ::CppUT::assertionType, \ ! __FILE__, \ ! __LINE__ ) # define CPPUT_BEGIN_ASSERTION_MACRO() \ *************** *** 227,243 **** // result of the assertion (did it failed), and the test result // properties are captured for later inspection. ! # define _CPPUT_ASSERT_ASSERTION_FAIL_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionFail( assertionFailed, message ); \ } --- 229,245 ---- // result of the assertion (did it failed), and the test result // properties are captured for later inspection. ! # define _CPPUT_ASSERT_ASSERTION_FAIL_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::threadInstance().getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionFail( assertionFailed, message ); \ } *************** *** 254,270 **** CPPUT_CHECK_ASSERTION_FAIL_MESSAGE( assertion, ::CppUT::Message() ) ! # define _CPPUT_ASSERT_ASSERTION_PASS_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionPass( assertionFailed, message ); \ } --- 256,272 ---- CPPUT_CHECK_ASSERTION_FAIL_MESSAGE( assertion, ::CppUT::Message() ) ! # define _CPPUT_ASSERT_ASSERTION_PASS_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::threadInstance().getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionPass( assertionFailed, message ); \ } Index: forwards.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/forwards.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** forwards.h 6 Aug 2005 22:24:53 -0000 1.17 --- forwards.h 10 Aug 2005 21:34:29 -0000 1.18 *************** *** 18,22 **** class ExceptionGuardElement; class ExceptionGuard; ! class TestInfoData; class TestResultUpdater; class TestSuite; --- 18,22 ---- class ExceptionGuardElement; class ExceptionGuard; ! class TestInfo; class TestResultUpdater; class TestSuite; *************** *** 27,33 **** typedef CppTL::SharedPtr<ExceptionGuardElement> ExceptionGuardElementPtr; typedef CppTL::IntrusivePtr<Test> TestPtr; ! typedef CppTL::SharedPtr<TestInfoData> TestInfoDataPtr; typedef CppTL::IntrusivePtr<TestSuite> TestSuitePtr; ! typedef CppTL::SharedPtr<TestResultUpdater> TestResultUpdaterPtr; --- 27,33 ---- typedef CppTL::SharedPtr<ExceptionGuardElement> ExceptionGuardElementPtr; typedef CppTL::IntrusivePtr<Test> TestPtr; ! typedef CppTL::IntrusivePtr<TestInfo> TestInfoPtr; typedef CppTL::IntrusivePtr<TestSuite> TestSuitePtr; ! typedef CppTL::IntrusivePtr<TestResultUpdater> TestResultUpdaterPtr; |
From: Baptiste L. <bl...@us...> - 2005-08-10 21:34:49
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27815/src/cpputtest Modified Files: testbasicassertion.cpp testexceptionguard.cpp testfunctor.cpp testtestcase.cpp testtestsuite.cpp Log Message: * Replaced function in namespace TestInfo by exposing the TestInfoData class and renaming it TestInfo. TestInfo in now an exposed per thread singleton. * startNewTest() is now called from TestCase::runTest() instead of being the test runner responsability. There still a few call to this method in cpput bootstrap test (which use assertion without run a test case). Index: testbasicassertion.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testbasicassertion.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testbasicassertion.cpp 27 Feb 2005 16:50:35 -0000 1.9 --- testbasicassertion.cpp 10 Aug 2005 21:34:29 -0000 1.10 *************** *** 6,10 **** static bool testAssertThrow() { ! CppUT::TestInfo::startNewTest(); try { --- 6,10 ---- static bool testAssertThrow() { ! CppUT::TestInfo::threadInstance().startNewTest(); try { *************** *** 17,21 **** } ! CppUT::TestInfo::startNewTest(); try { --- 17,21 ---- } ! CppUT::TestInfo::threadInstance().startNewTest(); try { *************** *** 34,38 **** static bool testAssertNoThrow() { ! CppUT::TestInfo::startNewTest(); try { --- 34,38 ---- static bool testAssertNoThrow() { ! CppUT::TestInfo::threadInstance().startNewTest(); try { *************** *** 46,50 **** } ! CppUT::TestInfo::startNewTest(); try { --- 46,50 ---- } ! CppUT::TestInfo::threadInstance().startNewTest(); try { *************** *** 77,81 **** return false; ! CppUT::TestInfo::startNewTest(); try { --- 77,81 ---- return false; ! CppUT::TestInfo::threadInstance().startNewTest(); try { Index: testtestsuite.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestsuite.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testtestsuite.cpp 27 Feb 2005 16:50:36 -0000 1.8 --- testtestsuite.cpp 10 Aug 2005 21:34:29 -0000 1.9 *************** *** 33,37 **** try { ! CppUT::TestInfo::startNewTest(); MockTestVisitor visitor; CppUT::TestSuitePtr suite1 = CppUT::makeTestSuite( "Suite 1" ); --- 33,37 ---- try { ! CppUT::TestInfo::threadInstance().startNewTest(); MockTestVisitor visitor; CppUT::TestSuitePtr suite1 = CppUT::makeTestSuite( "Suite 1" ); Index: testtestcase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestcase.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** testtestcase.cpp 20 Jul 2005 21:06:51 -0000 1.16 --- testtestcase.cpp 10 Aug 2005 21:34:29 -0000 1.17 *************** *** 235,239 **** try { ! CppUT::TestInfo::startNewTest(); testCaseSimpleRun(); testCaseSetUpRunTearDown(); --- 235,239 ---- try { ! CppUT::TestInfo::threadInstance().startNewTest(); testCaseSimpleRun(); testCaseSetUpRunTearDown(); Index: testexceptionguard.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testexceptionguard.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testexceptionguard.cpp 28 Feb 2005 20:43:02 -0000 1.1 --- testexceptionguard.cpp 10 Aug 2005 21:34:29 -0000 1.2 *************** *** 112,116 **** try { - CppUT::TestInfo::startNewTest(); testExceptionGuardRunFunctor(); testExceptionGuardCatchStandardException(); --- 112,115 ---- Index: testfunctor.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testfunctor.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testfunctor.cpp 27 Feb 2005 16:50:36 -0000 1.10 --- testfunctor.cpp 10 Aug 2005 21:34:29 -0000 1.11 *************** *** 230,234 **** try { ! CppUT::TestInfo::startNewTest(); testFunctor(); testFunctor1(); --- 230,234 ---- try { ! CppUT::TestInfo::threadInstance().startNewTest(); testFunctor(); testFunctor1(); |
From: Baptiste L. <bl...@us...> - 2005-08-10 21:34:49
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27815/src/cpput Modified Files: assert.cpp exceptionguard.cpp lighttestrunner.cpp testcase.cpp testinfo.cpp Log Message: * Replaced function in namespace TestInfo by exposing the TestInfoData class and renaming it TestInfo. TestInfo in now an exposed per thread singleton. * startNewTest() is now called from TestCase::runTest() instead of being the test runner responsability. There still a few call to this method in cpput bootstrap test (which use assertion without run a test case). Index: assert.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/assert.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** assert.cpp 10 Aug 2005 07:45:23 -0000 1.12 --- assert.cpp 10 Aug 2005 21:34:29 -0000 1.13 *************** *** 12,17 **** fail( const Message &message ) { ! TestInfo::currentAssertion().setMessages( message ); ! TestInfo::realizeAssertion(); } --- 12,17 ---- fail( const Message &message ) { ! currentAssertion().setMessages( message ); ! realizeAssertion(); } Index: exceptionguard.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/exceptionguard.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** exceptionguard.cpp 8 Aug 2005 22:10:21 -0000 1.6 --- exceptionguard.cpp 10 Aug 2005 21:34:29 -0000 1.7 *************** *** 73,77 **** messages.add( "caught unexpected exception of unknown type (not a subclass of std::exception)." ); fault.setMessages( messages ); ! TestInfo::handleUnexpectedException( fault ); } --- 73,77 ---- messages.add( "caught unexpected exception of unknown type (not a subclass of std::exception)." ); fault.setMessages( messages ); ! TestInfo::threadInstance().handleUnexpectedException( fault ); } *************** *** 91,95 **** fault.setTestData( "expection-type", exceptionType ); fault.setTestData( "expection-message", what ); ! TestInfo::handleUnexpectedException( fault ); } }; --- 91,95 ---- fault.setTestData( "expection-type", exceptionType ); fault.setTestData( "expection-message", what ); ! TestInfo::threadInstance().handleUnexpectedException( fault ); } }; Index: lighttestrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lighttestrunner.cpp 10 Aug 2005 07:45:23 -0000 1.6 --- lighttestrunner.cpp 10 Aug 2005 21:34:29 -0000 1.7 *************** *** 30,34 **** LightTestRunner::runAllTests() { ! TestInfo::setTestResultUpdater( *this ); for ( Tests::iterator it = tests_.begin(); it != tests_.end(); ++it ) runTest( *it ); --- 30,34 ---- LightTestRunner::runAllTests() { ! TestInfo::threadInstance().setTestResultUpdater( *this ); for ( Tests::iterator it = tests_.begin(); it != tests_.end(); ++it ) runTest( *it ); *************** *** 74,78 **** printf( "Testing %s : ", getTestPath().c_str() ); assertions_.clear(); - TestInfo::startNewTest(); ++testRun_; bool succeeded = testCase->runTest(); --- 74,77 ---- Index: testinfo.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testinfo.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** testinfo.cpp 10 Aug 2005 07:42:52 -0000 1.13 --- testinfo.cpp 10 Aug 2005 21:34:29 -0000 1.14 *************** *** 18,21 **** --- 18,22 ---- } + void Assertion::setLocation( const SourceLocation &location ) *************** *** 24,27 **** --- 25,29 ---- } + const SourceLocation & Assertion::location() const *************** *** 30,33 **** --- 32,36 ---- } + void Assertion::setKind( Kind kind ) *************** *** 36,39 **** --- 39,43 ---- } + Assertion::Kind Assertion::kind() const *************** *** 42,45 **** --- 46,50 ---- } + void Assertion::setMessages( const Message &messages ) *************** *** 48,51 **** --- 53,57 ---- } + const Message & Assertion::messages() const *************** *** 54,57 **** --- 60,64 ---- } + void Assertion::setTestDataType( const CppTL::ConstString &type ) *************** *** 60,63 **** --- 67,71 ---- } + const CppTL::ConstString & Assertion::testDataType() const *************** *** 66,69 **** --- 74,78 ---- } + void Assertion::setTestData( const CppTL::ConstString &name, *************** *** 75,78 **** --- 84,88 ---- } + const OpenTest::Properties & Assertion::testData() const *************** *** 81,84 **** --- 91,95 ---- } + CppTL::ConstString Assertion::toString() const *************** *** 107,110 **** --- 118,123 ---- } + + // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// *************** *** 157,325 **** // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! // Class TestInfoData // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! class TestInfoData { ! public: ! TestInfoData() ! : assertionType_( abortingAssertion ) ! , assertionCount_( 0 ) ! , failedAssertionCount_( 0 ) ! , updater_( 0 ) ! { ! } - void startNewTest() - { - testStatus_ = TestStatus( TestStatus::passed ); - currentAssertion_ = Assertion(); - assertionCount_ = 0; - failedAssertionCount_ = 0; - assertionType_ = abortingAssertion; - } ! void realizeAssertion() ! { ! ++failedAssertionCount_; ! if ( updater_ ) ! updater_->addResultAssertion( currentAssertion_ ); - if ( assertionType_ == abortingAssertion ) - { - std::string message; - if ( abortingAssertionMode_ != fastAbortingAssertion ) - message = currentAssertion_.toString().c_str(); - throw AbortingAssertionException( message ); - } - } ! TestStatus &getUpdatedTestStatus() ! { ! if ( !testStatus_.hasFailed() && failedAssertionCount_ > 0 ) ! testStatus_.setStatus( TestStatus::failed ); ! return testStatus_; ! } - TestResultUpdater *updater_; - TestStatus testStatus_; - Assertion currentAssertion_; - AssertionType assertionType_; - AbortingAssertionMode abortingAssertionMode_; - unsigned int assertionCount_; - unsigned int failedAssertionCount_; - }; ! // ////////////////////////////////////////////////////////////////// ! // ////////////////////////////////////////////////////////////////// ! // Namespace TestInfo ! // ////////////////////////////////////////////////////////////////// ! // ////////////////////////////////////////////////////////////////// - namespace TestInfo { - CppTL::ThreadLocalStorage<TestInfoDataPtr> staticData; ! static TestInfoData &data() ! { ! TestInfoDataPtr &data = staticData.get(); ! if ( !data ) ! data.reset( new TestInfoData() ); ! return *data; ! } - void setTestResultUpdater( TestResultUpdater &updater ) - { - data().updater_ = &updater; - } ! void startNewTest() ! { ! data().startNewTest(); ! } ! void newAssertion( AssertionType type, ! const char *fileName, ! unsigned int lineNumber, ! const char *functionName ) ! { ! data().currentAssertion_ = Assertion( Assertion::assertion, ! SourceLocation( fileName, ! lineNumber, ! functionName ) ); ! ++(data().assertionCount_); ! data().assertionType_ = type; ! } ! void setAssertionType( AssertionType type ) { ! data().assertionType_ = type; } - AssertionType assertionType() - { - return data().assertionType_; - } ! void realizeAssertion() ! { ! data().realizeAssertion(); ! } - void log( const OpenTest::Value &log ) - { - if ( data().updater_ ) - data().updater_->addResultLog( log ); - } ! void handleUnexpectedException( const Assertion &fault ) ! { ! if ( data().updater_ ) ! data().updater_->addResultAssertion( fault ); ! data().testStatus_.setStatus( TestStatus::failed ); ! } - void setAbortingAssertionMode( AbortingAssertionMode mode ) - { - data().abortingAssertionMode_ = mode; - } - Assertion & - currentAssertion() - { - return data().currentAssertion_; - } ! TestStatus & ! getUpdatedTestStatus() ! { ! return data().getUpdatedTestStatus(); ! } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! // Class ScopedContextOverride // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// - ScopedContextOverride::ScopedContextOverride() - : context_( staticData.get() ) - { - staticData.get().reset( new TestInfoData() ); - } ! ScopedContextOverride::~ScopedContextOverride() ! { ! staticData = context_; ! } ! } // namespace TestInfo --- 170,339 ---- // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! // Class TestInfo // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// + static CppTL::ThreadLocalStorage<TestInfoPtr> perThreadStaticData; + + TestInfo & + TestInfo::threadInstance() + { + TestInfoPtr &data = perThreadStaticData.get(); + if ( !data ) + data.reset( new TestInfo() ); + return *data; + } + ! TestInfo::TestInfo() ! : assertionType_( abortingAssertion ) ! , assertionCount_( 0 ) ! , failedAssertionCount_( 0 ) ! , updater_( 0 ) { ! } ! void ! TestInfo::setTestResultUpdater( TestResultUpdater &updater ) ! { ! updater_ = &updater; ! } ! void ! TestInfo::startNewTest() ! { ! testStatus_ = TestStatus( TestStatus::passed ); ! currentAssertion_ = Assertion(); ! assertionCount_ = 0; ! failedAssertionCount_ = 0; ! assertionType_ = abortingAssertion; ! } ! TestStatus & ! TestInfo::getUpdatedTestStatus() ! { ! if ( !testStatus_.hasFailed() && failedAssertionCount_ > 0 ) ! testStatus_.setStatus( TestStatus::failed ); ! return testStatus_; ! } ! void ! TestInfo::newAssertion( AssertionType type, ! const char *fileName, ! unsigned int lineNumber, ! const char *functionName ) ! { ! currentAssertion_ = Assertion( Assertion::assertion, ! SourceLocation( fileName, ! lineNumber, ! functionName ) ); ! ++assertionCount_; ! assertionType_ = type; ! } ! Assertion & ! TestInfo::currentAssertion() ! { ! return currentAssertion_; ! } ! void ! TestInfo::realizeAssertion() ! { ! ++failedAssertionCount_; ! if ( updater_ ) ! updater_->addResultAssertion( currentAssertion_ ); ! if ( assertionType_ == abortingAssertion ) { ! std::string message; ! if ( abortingAssertionMode_ != fastAbortingAssertion ) ! message = currentAssertion_.toString().c_str(); ! throw AbortingAssertionException( message ); } + } ! void ! TestInfo::handleUnexpectedException( const Assertion &fault ) ! { ! if ( updater_ ) ! updater_->addResultAssertion( fault ); ! testStatus_.setStatus( TestStatus::failed ); ! } ! void ! TestInfo::setAbortingAssertionMode( AbortingAssertionMode mode ) ! { ! abortingAssertionMode_ = mode; ! } + void + TestInfo::log( const OpenTest::Value &log ) + { + if ( updater_ ) + updater_->addResultLog( log ); + } ! // ////////////////////////////////////////////////////////////////// ! // ////////////////////////////////////////////////////////////////// ! // Class ScopedContextOverride ! // ////////////////////////////////////////////////////////////////// ! // ////////////////////////////////////////////////////////////////// + TestInfo::ScopedContextOverride::ScopedContextOverride() + : context_( perThreadStaticData.get() ) + { + perThreadStaticData.get().reset( new TestInfo() ); + } + TestInfo::ScopedContextOverride::~ScopedContextOverride() + { + perThreadStaticData = context_; + } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! // Short-hand functions in namespace CppUT // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ! //void newAssertion( AssertionType type, ! // const char *fileName, ! // unsigned int lineNumber, ! // const char *functionName ) ! //{ ! // TestInfo::data().newAssertion( type, fileName, lineNumber, functionName ); ! //} ! Assertion & ! currentAssertion() ! { ! return TestInfo::threadInstance().currentAssertion(); ! } ! ! ! void realizeAssertion() ! { ! TestInfo::threadInstance().realizeAssertion(); ! } ! ! ! void log( const OpenTest::Value &log ) ! { ! TestInfo::threadInstance().log( log ); ! } Index: testcase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testcase.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testcase.cpp 8 Aug 2005 22:10:21 -0000 1.11 --- testcase.cpp 10 Aug 2005 21:34:29 -0000 1.12 *************** *** 45,48 **** --- 45,49 ---- AbstractTestCase::runTest( const ExceptionGuard &guardsChain ) { + TestInfo::threadInstance().startNewTest(); bool initialized = guardsChain.protect( CppTL::memfn0( this, &AbstractTestCase::setUp ) ); *************** *** 54,58 **** } ! return !TestInfo::getUpdatedTestStatus().hasFailed(); } --- 55,59 ---- } ! return !TestInfo::threadInstance().getUpdatedTestStatus().hasFailed(); } |
From: Baptiste L. <bl...@us...> - 2005-08-10 21:34:37
|
Update of /cvsroot/cppunit/cppunit2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27815/src Modified Files: cpput_lib.suo Log Message: * Replaced function in namespace TestInfo by exposing the TestInfoData class and renaming it TestInfo. TestInfo in now an exposed per thread singleton. * startNewTest() is now called from TestCase::runTest() instead of being the test runner responsability. There still a few call to this method in cpput bootstrap test (which use assertion without run a test case). Index: cpput_lib.suo =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput_lib.suo,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 Binary files /tmp/cvsWmf33P and /tmp/cvs3L1Msi differ |
From: Baptiste L. <bl...@us...> - 2005-08-10 07:45:30
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2587/src/cpput Modified Files: assert.cpp lighttestrunner.cpp Log Message: * Enhanced failure report output Index: lighttestrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lighttestrunner.cpp 9 Aug 2005 08:05:32 -0000 1.5 --- lighttestrunner.cpp 10 Aug 2005 07:45:23 -0000 1.6 *************** *** 35,39 **** if ( testFailed_ > 0 ) { ! printf( "Failure report:\n%s\n", report_.c_str() ); printf( "%d/%d tests passed, %d tests failed.", testRun_ - testFailed_, --- 35,39 ---- if ( testFailed_ > 0 ) { ! printf( "Failure report:\n%s", report_.c_str() ); printf( "%d/%d tests passed, %d tests failed.", testRun_ - testFailed_, *************** *** 127,131 **** LightTestRunner::reportFailure( const Assertion &failure ) { // @todo duplicated in Assertion::toString(). - report_ += "* "; if ( failure.location().isValid() ) { --- 127,130 ---- *************** *** 147,150 **** --- 146,150 ---- report_ += testData.toString() + "\n"; } + report_ += "\n"; } Index: assert.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/assert.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** assert.cpp 8 Aug 2005 22:10:21 -0000 1.11 --- assert.cpp 10 Aug 2005 07:45:23 -0000 1.12 *************** *** 25,29 **** Message newMessage( message ); ! newMessage.insertAt( 0, translate( "Assertion failed: expression did not evaluate to true." ) ); fail( newMessage ); } --- 25,29 ---- Message newMessage( message ); ! newMessage.insertAt( 0, translate( "expression did not evaluate to true." ) ); fail( newMessage ); } *************** *** 38,42 **** Message newMessage( message ); ! newMessage.insertAt( 0, translate( "Assertion failed: expression did not evaluate to false." ) ); fail( newMessage ); } --- 38,42 ---- Message newMessage( message ); ! newMessage.insertAt( 0, translate( "expression did not evaluate to false." ) ); fail( newMessage ); } |
From: Baptiste L. <bl...@us...> - 2005-08-10 07:43:01
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2263/src/cpput Modified Files: testinfo.cpp Log Message: Made context related function private. Index: testinfo.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testinfo.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** testinfo.cpp 8 Aug 2005 22:10:21 -0000 1.12 --- testinfo.cpp 10 Aug 2005 07:42:52 -0000 1.13 *************** *** 282,297 **** } - TestInfoDataPtr saveAndResetContext() - { - TestInfoDataPtr oldData = staticData.get(); - staticData.get().reset( new TestInfoData() ); - return oldData; - } - - void restoreContext( const TestInfoDataPtr &oldContext ) - { - staticData = oldContext; - } - void setAbortingAssertionMode( AbortingAssertionMode mode ) { --- 282,285 ---- *************** *** 322,332 **** ScopedContextOverride::ScopedContextOverride() ! : context_( saveAndResetContext() ) { } ScopedContextOverride::~ScopedContextOverride() { ! restoreContext( context_ ); } --- 310,321 ---- ScopedContextOverride::ScopedContextOverride() ! : context_( staticData.get() ) { + staticData.get().reset( new TestInfoData() ); } ScopedContextOverride::~ScopedContextOverride() { ! staticData = context_; } |
From: Baptiste L. <bl...@us...> - 2005-08-10 07:43:01
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2263/include/cpput Modified Files: testinfo.h Log Message: Made context related function private. Index: testinfo.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/testinfo.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testinfo.h 8 Aug 2005 22:10:20 -0000 1.11 --- testinfo.h 10 Aug 2005 07:42:52 -0000 1.12 *************** *** 166,169 **** --- 166,171 ---- void CPPUT_API startNewTest(); + TestStatus &CPPUT_API getUpdatedTestStatus(); + void CPPUT_API newAssertion( AssertionType type, const char *fileName, *************** *** 173,178 **** Assertion &CPPUT_API currentAssertion(); - void CPPUT_API handleUnexpectedException( const Assertion &fault ); - /// Realize the current assertion. /// Add data about the current assertion to the test result. --- 175,178 ---- *************** *** 181,195 **** void CPPUT_API realizeAssertion(); ! TestStatus &CPPUT_API getUpdatedTestStatus(); void CPPUT_API log( const OpenTest::Value &log ); /// Only for using for unit test of the framework itself - TestInfoDataPtr CPPUT_API saveAndResetContext(); - - /// Only for using for unit test of the framework itself - void CPPUT_API restoreContext( const TestInfoDataPtr &oldContext ); - - /// Only for using for unit test of the framework itself void setAbortingAssertionMode( AbortingAssertionMode mode ); --- 181,189 ---- void CPPUT_API realizeAssertion(); ! void CPPUT_API handleUnexpectedException( const Assertion &fault ); void CPPUT_API log( const OpenTest::Value &log ); /// Only for using for unit test of the framework itself void setAbortingAssertionMode( AbortingAssertionMode mode ); |
From: Baptiste L. <bl...@us...> - 2005-08-10 04:14:23
|
Update of /cvsroot/cppunit/cppunit2/examples/checking_assertions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30949/examples/checking_assertions Modified Files: main.cpp Log Message: * Centralized test running logic in examples/common/examplecommon.h Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/checking_assertions/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 1 Mar 2005 22:17:41 -0000 1.1 --- main.cpp 8 Aug 2005 22:07:57 -0000 1.2 *************** *** 1,6 **** #include <cpput/testcase.h> - #include <cpput/testsuite.h> - #include <cpput/testrunner.h> // cppunit2 testrunner for opentest - #include <cpput/assert.h> #include <opentest/texttestdriver.h> #include <opentest/properties.h> --- 1,4 ---- + #include <examples/common/examplecommon.h> #include <cpput/testcase.h> #include <opentest/texttestdriver.h> #include <opentest/properties.h> *************** *** 26,36 **** allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ), "testBasicCheckingAssertion" ) ); ! CppUT::TestRunner runner; ! CppUT::AbstractTestSuitePtr rootSuite = ! CppTL::staticPointerCast<CppUT::AbstractTestSuite>( allSuite ); ! runner.setRootSuite( rootSuite ); ! ! OpenTest::TextTestDriver driver( runner ); ! bool sucessful = driver.run(); ! return sucessful ? 0 : 1; } --- 24,27 ---- allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testBasicCheckingAssertion ), "testBasicCheckingAssertion" ) ); ! return runExampleTests( argc, argv, allSuite.get() ); } |
From: Baptiste L. <bl...@us...> - 2005-08-10 03:49:38
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32056 Modified Files: .cvsignore sconstruct Log Message: * share examples/common in all examples. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** sconstruct 24 Jun 2005 19:51:28 -0000 1.13 --- sconstruct 8 Aug 2005 22:11:14 -0000 1.14 *************** *** 81,86 **** def buildCppUnitExample( env, target_sources, target_name ): exe = env.Program( target=target_name, ! source=target_sources ) global bin_dir env.Install( bin_dir, exe ) --- 81,88 ---- def buildCppUnitExample( env, target_sources, target_name ): + env = env.Copy() + env.Append( CPPPATH = ['#'] ) exe = env.Program( target=target_name, ! source=target_sources ) global bin_dir env.Install( bin_dir, exe ) *************** *** 124,128 **** buildProjectInDirectory( 'src/opentest' ) buildProjectInDirectory( 'src/cpputtest' ) ! buildProjectInDirectory( 'examples/input_based_test' ) buildProjectInDirectory( 'examples/parametrized_test' ) buildProjectInDirectory( 'examples/checking_assertions' ) --- 126,131 ---- buildProjectInDirectory( 'src/opentest' ) buildProjectInDirectory( 'src/cpputtest' ) ! buildProjectInDirectory( 'src/opentesttest' ) ! #buildProjectInDirectory( 'examples/input_based_test' ) buildProjectInDirectory( 'examples/parametrized_test' ) buildProjectInDirectory( 'examples/checking_assertions' ) Index: .cvsignore =================================================================== RCS file: /cvsroot/cppunit/cppunit2/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 26 Feb 2005 12:54:38 -0000 1.4 --- .cvsignore 8 Aug 2005 22:11:14 -0000 1.5 *************** *** 5,6 **** --- 5,7 ---- libs gcc-options.txt + dependencies |
From: Baptiste L. <bl...@us...> - 2005-08-10 03:20:24
|
Update of /cvsroot/cppunit/cppunit2/src/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31446/src/opentest Modified Files: SConscript Log Message: Rewrote failure reporting during test. It now provides more structure while still providing some flexibility. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/opentest/SConscript,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SConscript 30 Jun 2005 21:48:09 -0000 1.5 --- SConscript 8 Aug 2005 22:10:21 -0000 1.6 *************** *** 3,10 **** buildLibary( env, Split( """ interfaces.cpp - remoteinterfaces.cpp serializer.cpp - sharedmemorytransport.cpp texttestdriver.cpp """ ), 'opentest' ) --- 3,11 ---- buildLibary( env, Split( """ interfaces.cpp serializer.cpp texttestdriver.cpp """ ), 'opentest' ) + + # remoteinterfaces.cpp + # sharedmemorytransport.cpp |
From: Baptiste L. <bl...@us...> - 2005-08-10 03:05:47
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31446/include/cpput Modified Files: assert.h lighttestrunner.h message.h testinfo.h Log Message: Rewrote failure reporting during test. It now provides more structure while still providing some flexibility. Index: testinfo.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/testinfo.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testinfo.h 2 Jul 2005 20:27:35 -0000 1.10 --- testinfo.h 8 Aug 2005 22:10:20 -0000 1.11 *************** *** 3,6 **** --- 3,7 ---- # include <cpput/forwards.h> + # include <cpput/message.h> # include <opentest/properties.h> *************** *** 18,21 **** --- 19,125 ---- }; + class SourceLocation + { + public: + SourceLocation( const char *file = 0, + unsigned int line =0, + const char *function = 0 ) + : file_( file ) + , line_( line ) + , function_( function ) + { + } + + void clear() + { + file_ = 0; + function_ = 0; + line_ = 0; + } + + bool isValid() const + { + return file_ != 0; + } + + const char *file_; + const char *function_; + unsigned int line_; + }; + + class CPPUT_API Assertion + { + public: + enum Kind + { + fault = 1, + assertion = 2 + }; + + Assertion( Kind kind = assertion, + const SourceLocation &sourceLocation = SourceLocation() ); + + void setLocation( const SourceLocation &location ); + const SourceLocation &location() const; + + void setKind( Kind kind_ ); + Kind kind() const; + + void setMessages( const Message &messages ); + const Message &messages() const; + + void setTestDataType( const CppTL::ConstString &type ); + const CppTL::ConstString &testDataType() const; + + void setTestData( const CppTL::ConstString &name, + const OpenTest::Value &value, + const CppTL::ConstString &type = "basic" ); + + const OpenTest::Properties &testData() const; + + CppTL::ConstString toString() const; + + private: + Message messages_; + OpenTest::Properties testData_; + CppTL::ConstString testDataType_; + SourceLocation location_; + Kind kind_; + }; + + + + class CPPUT_API TestStatus + { + public: + enum Status + { + passed = 1, + skipped, + failed + }; + + TestStatus( Status status = passed ); + + void setStatus( Status status ); + + Status status() const; + + bool hasFailed() const; + + void setStatistics( const CppTL::ConstString &name, + const OpenTest::Value &value ); + //OpenTest::Value getStatistics( const CppTL::ConstString &name ); + + void addSpecific( const CppTL::ConstString &type, + const OpenTest::Value &value ); + private: + OpenTest::Properties statistics_; + OpenTest::Properties specifics_; + Status status_; + }; + + + class CPPUT_API TestResultUpdater { *************** *** 25,35 **** } ! virtual void mergeInResult( const OpenTest::Properties &result ) = 0; ! virtual void mergeInResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ) = 0; ! virtual void appendToResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ) = 0; }; --- 129,137 ---- } ! virtual void addResultLog( const OpenTest::Value &log ) = 0; ! virtual void addResultAssertion( const Assertion &assertion ) = 0; ! virtual void setTestStatus( const TestStatus &status ) = 0; }; *************** *** 58,69 **** }; - void CPPUT_API setTestResultUpdater( TestResultUpdater &updater ); - void CPPUT_API startNewTest(); ! // Flush test statistics ! void CPPUT_API updateTestStatistics(); ! OpenTest::PropertiesAccessor CPPUT_API result(); void CPPUT_API newAssertion( AssertionType type, --- 160,168 ---- }; ! void CPPUT_API setTestResultUpdater( TestResultUpdater &updater ); ! void CPPUT_API startNewTest(); void CPPUT_API newAssertion( AssertionType type, *************** *** 72,82 **** const char *functionName = 0 ); ! void CPPUT_API setAssertionType( AssertionType type ); ! ! AssertionType CPPUT_API assertionType(); ! OpenTest::Properties &CPPUT_API currentAssertion(); ! OpenTest::Properties &CPPUT_API currentAssertionActual(); ! OpenTest::Properties &CPPUT_API currentAssertionExpected(); /// Realize the current assertion. --- 171,177 ---- const char *functionName = 0 ); ! Assertion &CPPUT_API currentAssertion(); ! void CPPUT_API handleUnexpectedException( const Assertion &fault ); /// Realize the current assertion. *************** *** 86,112 **** void CPPUT_API realizeAssertion(); ! /// Returns the number of assertions done by the test ! unsigned int CPPUT_API assertionCount(); ! ! /// Returns the number of assertions that failed done by the test ! unsigned int CPPUT_API failedAssertionCount(); ! ! /// Returns the number of faults that occurred ! unsigned int CPPUT_API faultCount(); ! ! /// Returns true if an assertion failed or a fault occured. ! bool CPPUT_API testHasFailed(); ! ! void CPPUT_API log( const CppTL::ConstString &text ); ! ! void CPPUT_API appendFaultToResult( const OpenTest::Properties &fault ); ! ! void CPPUT_API mergeInResult( const OpenTest::Properties &result ); ! ! void CPPUT_API mergeInResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ); ! void CPPUT_API appendToResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ); /// Only for using for unit test of the framework itself --- 181,187 ---- void CPPUT_API realizeAssertion(); ! TestStatus &CPPUT_API getUpdatedTestStatus(); ! void CPPUT_API log( const OpenTest::Value &log ); /// Only for using for unit test of the framework itself Index: message.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/message.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** message.h 5 Mar 2005 12:21:07 -0000 1.8 --- message.h 8 Aug 2005 22:10:20 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- # include <cpput/config.h> # include <cpptl/conststring.h> + # include <opentest/properties.h> # include <vector> *************** *** 88,92 **** CppTL::ConstString toString() const { ! CppTL::ConstString message; Details::const_iterator it = details_.begin(); Details::const_iterator itEnd = details_.end(); --- 89,93 ---- CppTL::ConstString toString() const { ! CppTL::StringBuffer message; Details::const_iterator it = details_.begin(); Details::const_iterator itEnd = details_.end(); *************** *** 104,135 **** } ! //Properties &properties() ! //{ ! // return properties_; ! //} ! ! //const Properties &properties() const ! //{ ! // return properties_; ! //} ! ! //void setStatus( bool succeeded ) ! //{ ! // properties().set( "cpput.status", succeeded ); ! //} ! ! //void setResultType( const CppTL::ConstString &resultType ) ! //{ ! // properties().set( "cpput.result_type", resultType ); ! //} ! ! //bool hasResultType() const ! //{ ! // return properties().has( "cpput.result_type" ); ! //} private: - //Properties properties_; - typedef std::vector<CppTL::ConstString> Details; Details details_; --- 105,117 ---- } ! OpenTest::Properties asProperties() const ! { ! OpenTest::Properties messages; ! for ( int index =0; index < details_.size(); ++index ) ! messages.append( details_[index] ); ! return messages; ! } private: typedef std::vector<CppTL::ConstString> Details; Details details_; Index: assert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/assert.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** assert.h 6 Mar 2005 18:38:03 -0000 1.10 --- assert.h 8 Aug 2005 22:10:20 -0000 1.11 *************** *** 228,246 **** // properties are captured for later inspection. # define _CPPUT_ASSERT_ASSERTION_FAIL_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! OpenTest::Properties result; \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::failedAssertionCount() != 0; \ ! if ( ::CppUT::TestInfo::result().isValid() ) \ ! result = ::CppUT::TestInfo::result().properties(); \ ! } \ ! ::CppUT::checkAssertionFail( assertionFailed, message ); \ } --- 228,243 ---- // properties are captured for later inspection. # define _CPPUT_ASSERT_ASSERTION_FAIL_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionFail( assertionFailed, message ); \ } *************** *** 258,276 **** # define _CPPUT_ASSERT_ASSERTION_PASS_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! OpenTest::Properties result; \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::failedAssertionCount() != 0; \ ! if ( ::CppUT::TestInfo::result().isValid() ) \ ! result = ::CppUT::TestInfo::result().properties(); \ ! } \ ! ::CppUT::checkAssertionPass( assertionFailed, message ); \ } --- 255,270 ---- # define _CPPUT_ASSERT_ASSERTION_PASS_MESSAGE_IMPL( assertionType, assertion, message ) \ ! { \ ! CPPUT_CHECK_POINT( assertionType ); \ ! bool assertionFailed = false; \ ! { \ ! ::CppUT::TestInfo::ScopedContextOverride contextSwitch; \ ! try { \ ! assertion; \ ! } catch ( const ::CppUT::AbortingAssertionException & ) { \ ! } \ ! assertionFailed = ::CppUT::TestInfo::getUpdatedTestStatus().hasFailed(); \ ! } \ ! ::CppUT::checkAssertionPass( assertionFailed, message ); \ } Index: lighttestrunner.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/lighttestrunner.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lighttestrunner.h 20 Jul 2005 21:06:49 -0000 1.2 --- lighttestrunner.h 8 Aug 2005 22:10:20 -0000 1.3 *************** *** 24,34 **** private: // overridden from TestResultUpdater ! virtual void mergeInResult( const OpenTest::Properties &result ); ! virtual void mergeInResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ); ! virtual void appendToResult( const OpenTest::PropertyPath &path, ! const OpenTest::Value &value ); private: --- 24,32 ---- private: // overridden from TestResultUpdater ! virtual void addResultLog( const OpenTest::Value &log ); ! virtual void addResultAssertion( const Assertion &assertion ); ! virtual void setTestStatus( const TestStatus &status ); private: *************** *** 37,42 **** void runTestCase( const AbstractTestCasePtr &testCase ); CppTL::ConstString getTestPath() const; ! void reportFailure( const OpenTest::Properties &failure, ! bool isAssertion ); typedef std::deque<TestPtr> Tests; --- 35,39 ---- void runTestCase( const AbstractTestCasePtr &testCase ); CppTL::ConstString getTestPath() const; ! void reportFailure( const Assertion &failure ); typedef std::deque<TestPtr> Tests; *************** *** 45,49 **** TestPath testPath_; CppTL::StringBuffer report_; ! OpenTest::Properties result_; unsigned int testRun_; unsigned int testFailed_; --- 42,47 ---- TestPath testPath_; CppTL::StringBuffer report_; ! typedef std::deque<Assertion> Assertions; ! Assertions assertions_; unsigned int testRun_; unsigned int testFailed_; |
From: Baptiste L. <bl...@us...> - 2005-08-10 01:28:37
|
Update of /cvsroot/cppunit/cppunit2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23992/src Modified Files: cpput_lib.suo Log Message: Fixed bug: result report was not print. Index: cpput_lib.suo =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput_lib.suo,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Binary files /tmp/cvshXPcAO and /tmp/cvskzY30U differ |
From: Baptiste L. <bl...@us...> - 2005-08-10 01:28:20
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23992/src/cpput Modified Files: lighttestrunner.cpp Log Message: Fixed bug: result report was not print. Index: lighttestrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lighttestrunner.cpp 8 Aug 2005 22:10:21 -0000 1.4 --- lighttestrunner.cpp 9 Aug 2005 08:05:32 -0000 1.5 *************** *** 35,39 **** if ( testFailed_ > 0 ) { ! printf( "Failure report:\n", report_.c_str() ); printf( "%d/%d tests passed, %d tests failed.", testRun_ - testFailed_, --- 35,39 ---- if ( testFailed_ > 0 ) { ! printf( "Failure report:\n%s\n", report_.c_str() ); printf( "%d/%d tests passed, %d tests failed.", testRun_ - testFailed_, |