Merge remote branch 'socketpuppet/master'

This commit is contained in:
Phil Nash 2010-12-28 17:18:06 +00:00
commit 3000f6a3b1
7 changed files with 29 additions and 18 deletions

View File

@ -142,6 +142,8 @@ namespace Catch
case ResultWas::ExplicitFailure: case ResultWas::ExplicitFailure:
m_config.stream() << "failed with message: '" << resultInfo.getMessage() << "'"; m_config.stream() << "failed with message: '" << resultInfo.getMessage() << "'";
break; break;
default:
break;
} }
if( resultInfo.hasExpression() ) if( resultInfo.hasExpression() )

View File

@ -101,8 +101,13 @@ namespace Catch
m_currentStats = &m_testSuiteStats; m_currentStats = &m_testSuiteStats;
} }
virtual void StartSection( const std::string& sectionName, const std::string description ){(sectionName,description);} virtual void StartSection( const std::string& sectionName, const std::string description )
virtual void EndSection( const std::string& sectionName, std::size_t succeeded, std::size_t failed ){(sectionName, succeeded, failed);} {
}
virtual void EndSection( const std::string& sectionName, std::size_t succeeded, std::size_t failed )
{
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) virtual void StartTestCase( const Catch::TestCaseInfo& testInfo )

View File

@ -130,6 +130,8 @@ namespace Catch
.writeText( resultInfo.getMessage() ); .writeText( resultInfo.getMessage() );
m_currentTestSuccess = false; m_currentTestSuccess = false;
break; break;
default:
break;
} }
if( resultInfo.hasExpression() ) if( resultInfo.hasExpression() )
m_xml.endElement(); m_xml.endElement();

View File

@ -157,6 +157,8 @@ namespace Catch
return setErrorMode( m_command + " does not accept arguments" ); return setErrorMode( m_command + " does not accept arguments" );
m_config.setShouldDebugBreak( true ); m_config.setShouldDebugBreak( true );
break; break;
default:
break;
} }
m_args.clear(); m_args.clear();
m_mode = mode; m_mode = mode;

View File

@ -40,20 +40,20 @@ namespace Catch
public: public:
ResultInfo() ResultInfo()
: m_result( ResultWas::Unknown ), : m_line( 0 ),
m_result( ResultWas::Unknown ),
m_isNot( false ), m_isNot( false ),
m_line( 0 ),
m_expressionIncomplete( false ) m_expressionIncomplete( false )
{} {}
ResultInfo( const std::string& expr, ResultWas::OfType result, bool isNot, const std::string& filename, std::size_t line, const std::string& macroName ) ResultInfo( const std::string& expr, ResultWas::OfType result, bool isNot, const std::string& filename, std::size_t line, const std::string& macroName )
: m_expr( expr ), : m_macroName( macroName ),
m_result( result ),
m_isNot( isNot ),
m_op( m_expr[0] == '!' ? "!" : "" ),
m_filename( filename ), m_filename( filename ),
m_line( line ), m_line( line ),
m_macroName( macroName ), m_expr( expr ),
m_op( m_expr[0] == '!' ? "!" : "" ),
m_result( result ),
m_isNot( isNot ),
m_expressionIncomplete( false ) m_expressionIncomplete( false )
{ {
} }

View File

@ -74,9 +74,9 @@ namespace Catch
{ {
public: public:
explicit Runner( const RunnerConfig& config ) explicit Runner( const RunnerConfig& config )
: m_successes( 0 ), : m_config( config ),
m_successes( 0 ),
m_failures( 0 ), m_failures( 0 ),
m_config( config ),
m_reporter( m_config.getReporter() ) m_reporter( m_config.getReporter() )
{ {
m_reporter->StartTesting(); m_reporter->StartTesting();

View File

@ -43,8 +43,8 @@ namespace Catch
RunnerConfig() RunnerConfig()
: m_listSpec( listNone ), : m_reporter( NULL ),
m_reporter( NULL ), m_listSpec( listNone ),
m_shouldDebugBreak( false ) m_shouldDebugBreak( false )
{} {}