diff --git a/include/internal/catch_resultinfo.h b/include/internal/catch_assertionresult.h similarity index 100% rename from include/internal/catch_resultinfo.h rename to include/internal/catch_assertionresult.h diff --git a/include/internal/catch_resultinfo.hpp b/include/internal/catch_assertionresult.hpp similarity index 98% rename from include/internal/catch_resultinfo.hpp rename to include/internal/catch_assertionresult.hpp index bc322983..20c25005 100644 --- a/include/internal/catch_resultinfo.hpp +++ b/include/internal/catch_assertionresult.hpp @@ -8,7 +8,7 @@ #ifndef TWOBLUECUBES_CATCH_ASSERTIONRESULT_HPP_INCLUDED #define TWOBLUECUBES_CATCH_ASSERTIONRESULT_HPP_INCLUDED -#include "catch_resultinfo.h" +#include "catch_assertionresult.h" namespace Catch { diff --git a/include/internal/catch_resultinfo_builder.h b/include/internal/catch_assertionresult_builder.h similarity index 98% rename from include/internal/catch_resultinfo_builder.h rename to include/internal/catch_assertionresult_builder.h index d4c42918..9f1f2d82 100644 --- a/include/internal/catch_resultinfo_builder.h +++ b/include/internal/catch_assertionresult_builder.h @@ -9,7 +9,7 @@ #define TWOBLUECUBES_CATCH_ASSERTIONRESULT_BUILDER_H_INCLUDED #include "catch_tostring.hpp" -#include "catch_resultinfo.h" +#include "catch_assertionresult.h" #include "catch_result_type.h" #include "catch_evaluate.hpp" #include "catch_common.h" diff --git a/include/internal/catch_resultinfo_builder.hpp b/include/internal/catch_assertionresult_builder.hpp similarity index 98% rename from include/internal/catch_resultinfo_builder.hpp rename to include/internal/catch_assertionresult_builder.hpp index 368abe0b..6e5af250 100644 --- a/include/internal/catch_resultinfo_builder.hpp +++ b/include/internal/catch_assertionresult_builder.hpp @@ -8,7 +8,7 @@ #ifndef TWOBLUECUBES_CATCH_ASSERTIONRESULT_BUILDER_HPP_INCLUDED #define TWOBLUECUBES_CATCH_ASSERTIONRESULT_BUILDER_HPP_INCLUDED -#include "catch_resultinfo_builder.h" +#include "catch_assertionresult_builder.h" namespace Catch { diff --git a/include/internal/catch_expression.hpp b/include/internal/catch_expression.hpp index 33958f9a..60aaa626 100644 --- a/include/internal/catch_expression.hpp +++ b/include/internal/catch_expression.hpp @@ -8,7 +8,7 @@ #ifndef TWOBLUECUBES_CATCH_EXPRESSION_HPP_INCLUDED #define TWOBLUECUBES_CATCH_EXPRESSION_HPP_INCLUDED -#include "catch_resultinfo_builder.h" +#include "catch_assertionresult_builder.h" #include "catch_evaluate.hpp" namespace Catch { diff --git a/include/internal/catch_expression_builder.hpp b/include/internal/catch_expression_builder.hpp index e04dcae6..b342ce20 100644 --- a/include/internal/catch_expression_builder.hpp +++ b/include/internal/catch_expression_builder.hpp @@ -9,9 +9,9 @@ #define TWOBLUECUBES_CATCH_EXPRESSION_BUILDER_HPP_INCLUDED #include "catch_expression.hpp" -#include "catch_resultinfo_builder.h" +#include "catch_assertionresult_builder.h" #include "catch_tostring.hpp" -#include "catch_resultinfo.h" +#include "catch_assertionresult.h" #include "catch_result_type.h" #include "catch_context.h" #include "catch_common.h" diff --git a/include/internal/catch_impl.hpp b/include/internal/catch_impl.hpp index b4c4662b..64099b5d 100644 --- a/include/internal/catch_impl.hpp +++ b/include/internal/catch_impl.hpp @@ -22,8 +22,8 @@ #include "catch_context_impl.hpp" #include "catch_console_colour_impl.hpp" #include "catch_generators_impl.hpp" -#include "catch_resultinfo.hpp" -#include "catch_resultinfo_builder.hpp" +#include "catch_assertionresult.hpp" +#include "catch_assertionresult_builder.hpp" #include "catch_test_case_info.hpp" #include "catch_tags.hpp" diff --git a/include/internal/catch_interfaces_capture.h b/include/internal/catch_interfaces_capture.h index e8130a82..9477017b 100644 --- a/include/internal/catch_interfaces_capture.h +++ b/include/internal/catch_interfaces_capture.h @@ -36,7 +36,7 @@ namespace Catch { virtual ResultAction::Value acceptResult( bool result ) = 0; virtual ResultAction::Value acceptResult( ResultWas::OfType result ) = 0; - virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& resultInfo ) = 0; + virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& assertionResult ) = 0; virtual void acceptMessage( const std::string& msg ) = 0; virtual std::string getCurrentTestName() const = 0; diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp index 4c7f19ad..449f2467 100644 --- a/include/internal/catch_runner_impl.hpp +++ b/include/internal/catch_runner_impl.hpp @@ -140,8 +140,8 @@ namespace Catch { return actOnCurrentResult(); } - virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& resultInfo ) { - m_currentResult = resultInfo; + virtual ResultAction::Value acceptExpression( const AssertionResultBuilder& assertionResult ) { + m_currentResult = assertionResult; return actOnCurrentResult(); } diff --git a/include/reporters/catch_reporter_basic.hpp b/include/reporters/catch_reporter_basic.hpp index 8a09606a..48939163 100644 --- a/include/reporters/catch_reporter_basic.hpp +++ b/include/reporters/catch_reporter_basic.hpp @@ -159,21 +159,21 @@ namespace Catch { m_sectionSpans.pop_back(); } - virtual void Result( const AssertionResult& resultInfo ) { - if( !m_config.includeSuccessfulResults && resultInfo.getResultType() == ResultWas::Ok ) + virtual void Result( const AssertionResult& assertionResult ) { + if( !m_config.includeSuccessfulResults && assertionResult.getResultType() == ResultWas::Ok ) return; startSpansLazily(); - if( !resultInfo.getFilename().empty() ) { + if( !assertionResult.getFilename().empty() ) { TextColour colour( TextColour::FileName ); - m_config.stream << SourceLineInfo( resultInfo.getFilename(), resultInfo.getLine() ); + m_config.stream << SourceLineInfo( assertionResult.getFilename(), assertionResult.getLine() ); } - if( resultInfo.hasExpression() ) { + if( assertionResult.hasExpression() ) { TextColour colour( TextColour::OriginalExpression ); - m_config.stream << resultInfo.getExpression(); - if( resultInfo.ok() ) { + m_config.stream << assertionResult.getExpression(); + if( assertionResult.ok() ) { TextColour successColour( TextColour::Success ); m_config.stream << " succeeded"; } @@ -182,36 +182,36 @@ namespace Catch { m_config.stream << " failed"; } } - switch( resultInfo.getResultType() ) { + switch( assertionResult.getResultType() ) { case ResultWas::ThrewException: { TextColour colour( TextColour::Error ); - if( resultInfo.hasExpression() ) + if( assertionResult.hasExpression() ) m_config.stream << " with unexpected"; else m_config.stream << "Unexpected"; - m_config.stream << " exception with message: '" << resultInfo.getMessage() << "'"; + m_config.stream << " exception with message: '" << assertionResult.getMessage() << "'"; } break; case ResultWas::DidntThrowException: { TextColour colour( TextColour::Error ); - if( resultInfo.hasExpression() ) + if( assertionResult.hasExpression() ) m_config.stream << " because no exception was thrown where one was expected"; else m_config.stream << "No exception thrown where one was expected"; } break; case ResultWas::Info: - streamVariableLengthText( "info", resultInfo.getMessage() ); + streamVariableLengthText( "info", assertionResult.getMessage() ); break; case ResultWas::Warning: - m_config.stream << "warning:\n'" << resultInfo.getMessage() << "'"; + m_config.stream << "warning:\n'" << assertionResult.getMessage() << "'"; break; case ResultWas::ExplicitFailure: { TextColour colour( TextColour::Error ); - m_config.stream << "failed with message: '" << resultInfo.getMessage() << "'"; + m_config.stream << "failed with message: '" << assertionResult.getMessage() << "'"; } break; case ResultWas::Unknown: // These cases are here to prevent compiler warnings @@ -219,8 +219,8 @@ namespace Catch { case ResultWas::FailureBit: case ResultWas::ExpressionFailed: case ResultWas::Exception: - if( !resultInfo.hasExpression() ) { - if( resultInfo.ok() ) { + if( !assertionResult.hasExpression() ) { + if( assertionResult.ok() ) { TextColour colour( TextColour::Success ); m_config.stream << " succeeded"; } @@ -232,14 +232,14 @@ namespace Catch { break; } - if( resultInfo.hasExpandedExpression() ) { + if( assertionResult.hasExpandedExpression() ) { m_config.stream << " for: "; - if( resultInfo.getExpandedExpression().size() > 40 ) + if( assertionResult.getExpandedExpression().size() > 40 ) m_config.stream << "\n"; - if( resultInfo.getExpandedExpression().size() < 70 ) + if( assertionResult.getExpandedExpression().size() < 70 ) m_config.stream << "\t"; TextColour colour( TextColour::ReconstructedExpression ); - m_config.stream << resultInfo.getExpandedExpression(); + m_config.stream << assertionResult.getExpandedExpression(); } m_config.stream << std::endl; } diff --git a/include/reporters/catch_reporter_junit.hpp b/include/reporters/catch_reporter_junit.hpp index 8e35e279..e811ab73 100644 --- a/include/reporters/catch_reporter_junit.hpp +++ b/include/reporters/catch_reporter_junit.hpp @@ -97,19 +97,19 @@ namespace Catch { m_currentStats->m_testCaseStats.push_back( TestCaseStats( testInfo.getName() ) ); } - virtual void Result( const Catch::AssertionResult& resultInfo ) { - if( resultInfo.getResultType() != ResultWas::Ok || m_config.includeSuccessfulResults ) { + virtual void Result( const Catch::AssertionResult& assertionResult ) { + if( assertionResult.getResultType() != ResultWas::Ok || m_config.includeSuccessfulResults ) { TestCaseStats& testCaseStats = m_currentStats->m_testCaseStats.back(); TestStats stats; std::ostringstream oss; - if( !resultInfo.getMessage().empty() ) - oss << resultInfo.getMessage() << " at "; - oss << SourceLineInfo( resultInfo.getFilename(), resultInfo.getLine() ); + if( !assertionResult.getMessage().empty() ) + oss << assertionResult.getMessage() << " at "; + oss << SourceLineInfo( assertionResult.getFilename(), assertionResult.getLine() ); stats.m_content = oss.str(); - stats.m_message = resultInfo.getExpandedExpression(); - stats.m_resultType = resultInfo.getTestMacroName(); + stats.m_message = assertionResult.getExpandedExpression(); + stats.m_resultType = assertionResult.getTestMacroName(); - switch( resultInfo.getResultType() ) { + switch( assertionResult.getResultType() ) { case ResultWas::ThrewException: stats.m_element = "error"; m_currentStats->m_errorsCount++; diff --git a/include/reporters/catch_reporter_xml.hpp b/include/reporters/catch_reporter_xml.hpp index d74b591b..78e658ca 100644 --- a/include/reporters/catch_reporter_xml.hpp +++ b/include/reporters/catch_reporter_xml.hpp @@ -75,42 +75,42 @@ namespace Catch { m_currentTestSuccess = true; } - virtual void Result( const Catch::AssertionResult& resultInfo ) { - if( !m_config.includeSuccessfulResults && resultInfo.getResultType() == ResultWas::Ok ) + virtual void Result( const Catch::AssertionResult& assertionResult ) { + if( !m_config.includeSuccessfulResults && assertionResult.getResultType() == ResultWas::Ok ) return; - if( resultInfo.hasExpression() ) { + if( assertionResult.hasExpression() ) { m_xml.startElement( "Expression" ) - .writeAttribute( "success", resultInfo.ok() ) - .writeAttribute( "filename", resultInfo.getFilename() ) - .writeAttribute( "line", resultInfo.getLine() ); + .writeAttribute( "success", assertionResult.ok() ) + .writeAttribute( "filename", assertionResult.getFilename() ) + .writeAttribute( "line", assertionResult.getLine() ); m_xml.scopedElement( "Original" ) - .writeText( resultInfo.getExpression() ); + .writeText( assertionResult.getExpression() ); m_xml.scopedElement( "Expanded" ) - .writeText( resultInfo.getExpandedExpression() ); - m_currentTestSuccess &= resultInfo.ok(); + .writeText( assertionResult.getExpandedExpression() ); + m_currentTestSuccess &= assertionResult.ok(); } - switch( resultInfo.getResultType() ) { + switch( assertionResult.getResultType() ) { case ResultWas::ThrewException: m_xml.scopedElement( "Exception" ) - .writeAttribute( "filename", resultInfo.getFilename() ) - .writeAttribute( "line", resultInfo.getLine() ) - .writeText( resultInfo.getMessage() ); + .writeAttribute( "filename", assertionResult.getFilename() ) + .writeAttribute( "line", assertionResult.getLine() ) + .writeText( assertionResult.getMessage() ); m_currentTestSuccess = false; break; case ResultWas::Info: m_xml.scopedElement( "Info" ) - .writeText( resultInfo.getMessage() ); + .writeText( assertionResult.getMessage() ); break; case ResultWas::Warning: m_xml.scopedElement( "Warning" ) - .writeText( resultInfo.getMessage() ); + .writeText( assertionResult.getMessage() ); break; case ResultWas::ExplicitFailure: m_xml.scopedElement( "Failure" ) - .writeText( resultInfo.getMessage() ); + .writeText( assertionResult.getMessage() ); m_currentTestSuccess = false; break; case ResultWas::Unknown: @@ -121,7 +121,7 @@ namespace Catch { case ResultWas::DidntThrowException: break; } - if( resultInfo.hasExpression() ) + if( assertionResult.hasExpression() ) m_xml.endElement(); } diff --git a/projects/SelfTest/catch_self_test.cpp b/projects/SelfTest/catch_self_test.cpp index 58c064c6..bca9f284 100644 --- a/projects/SelfTest/catch_self_test.cpp +++ b/projects/SelfTest/catch_self_test.cpp @@ -31,11 +31,11 @@ namespace Catch{ return totals; } - void MockReporter::Result( const AssertionResult& resultInfo ) { - if( resultInfo.getResultType() == ResultWas::Ok ) + void MockReporter::Result( const AssertionResult& assertionResult ) { + if( assertionResult.getResultType() == ResultWas::Ok ) return; - switch( resultInfo.getResultType() ) { + switch( assertionResult.getResultType() ) { case ResultWas::Info: m_log << "Info"; break; @@ -70,14 +70,14 @@ namespace Catch{ break; } - if( resultInfo.hasExpression() ) - m_log << resultInfo.getExpression(); + if( assertionResult.hasExpression() ) + m_log << assertionResult.getExpression(); - if( resultInfo.hasMessage() ) - m_log << "'" << resultInfo.getMessage() << "'"; + if( assertionResult.hasMessage() ) + m_log << "'" << assertionResult.getMessage() << "'"; - if( resultInfo.hasExpandedExpression() ) - m_log << resultInfo.getExpandedExpression(); + if( assertionResult.hasExpandedExpression() ) + m_log << assertionResult.getExpandedExpression(); } void MockReporter::openLabel( const std::string& label, const std::string& arg ) { diff --git a/projects/SelfTest/catch_self_test.hpp b/projects/SelfTest/catch_self_test.hpp index c0f9a271..f31a8e99 100644 --- a/projects/SelfTest/catch_self_test.hpp +++ b/projects/SelfTest/catch_self_test.hpp @@ -95,7 +95,7 @@ namespace Catch { closeLabel( recordTestCases, testInfo.getName() ); } - virtual void Result( const AssertionResult& resultInfo ); + virtual void Result( const AssertionResult& assertionResult ); private: diff --git a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj index 77d02dcb..bf490fdf 100644 --- a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj +++ b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj @@ -105,7 +105,7 @@ 4A6D0C5A149B3E3D00DB3EAA /* catch_reporter_registrars.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_reporter_registrars.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 4A6D0C5B149B3E3D00DB3EAA /* catch_reporter_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_registry.hpp; sourceTree = ""; }; 4A6D0C5C149B3E3D00DB3EAA /* catch_result_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_result_type.h; sourceTree = ""; }; - 4A6D0C5D149B3E3D00DB3EAA /* catch_resultinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_resultinfo.h; sourceTree = ""; }; + 4A6D0C5D149B3E3D00DB3EAA /* catch_assertionresult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_assertionresult.h; sourceTree = ""; }; 4A6D0C5E149B3E3D00DB3EAA /* catch_runner_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_runner_impl.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 4A6D0C5F149B3E3D00DB3EAA /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_section.hpp; sourceTree = ""; }; 4A6D0C60149B3E3D00DB3EAA /* catch_stream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_stream.hpp; sourceTree = ""; }; @@ -120,10 +120,10 @@ 4A8E4DCC160A344100194CBD /* catch_tags.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_tags.hpp; sourceTree = ""; }; 4A8E4DD0160A352200194CBD /* catch_tags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_tags.cpp; path = ../../../SelfTest/SurrogateCpps/catch_tags.cpp; sourceTree = ""; }; 4A90B59B15D0F61A00EF71BC /* catch_interfaces_generators.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_generators.h; sourceTree = ""; }; - 4A90B59D15D24FE900EF71BC /* catch_resultinfo.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_resultinfo.hpp; sourceTree = ""; }; - 4A90B59E15D2521E00EF71BC /* catch_resultinfo_builder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_resultinfo_builder.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; + 4A90B59D15D24FE900EF71BC /* catch_assertionresult.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_assertionresult.hpp; sourceTree = ""; }; + 4A90B59E15D2521E00EF71BC /* catch_assertionresult_builder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_assertionresult_builder.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 4A9D84B11558FC0400FBB209 /* catch_tostring.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_tostring.hpp; sourceTree = ""; }; - 4A9D84B315599AC900FBB209 /* catch_resultinfo_builder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_resultinfo_builder.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A9D84B315599AC900FBB209 /* catch_assertionresult_builder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_assertionresult_builder.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4AA7FF4115F3E89D009AD7F9 /* BDDTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BDDTests.cpp; sourceTree = ""; }; 4AB1C73514F97BDA00F31DF7 /* catch_console_colour_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_console_colour_impl.hpp; sourceTree = ""; }; 4AB1C73714F97C1300F31DF7 /* catch_console_colour.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_console_colour.hpp; sourceTree = ""; }; @@ -275,8 +275,8 @@ 4A6D0C62149B3E3D00DB3EAA /* catch_test_case_registry_impl.hpp */, 4AB1C73514F97BDA00F31DF7 /* catch_console_colour_impl.hpp */, 4A4B0F9B15CEF8C400AE2392 /* catch_notimplemented_exception.hpp */, - 4A90B59D15D24FE900EF71BC /* catch_resultinfo.hpp */, - 4A90B59E15D2521E00EF71BC /* catch_resultinfo_builder.hpp */, + 4A90B59D15D24FE900EF71BC /* catch_assertionresult.hpp */, + 4A90B59E15D2521E00EF71BC /* catch_assertionresult_builder.hpp */, 4A084F1C15DACEEA0027E631 /* catch_test_case_info.hpp */, ); name = impl; @@ -288,8 +288,8 @@ 4A6D0C4D149B3E3D00DB3EAA /* catch_evaluate.hpp */, 4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */, 4A6D0C5C149B3E3D00DB3EAA /* catch_result_type.h */, - 4A6D0C5D149B3E3D00DB3EAA /* catch_resultinfo.h */, - 4A9D84B315599AC900FBB209 /* catch_resultinfo_builder.h */, + 4A6D0C5D149B3E3D00DB3EAA /* catch_assertionresult.h */, + 4A9D84B315599AC900FBB209 /* catch_assertionresult_builder.h */, 4A6D0C5F149B3E3D00DB3EAA /* catch_section.hpp */, 4A3D7DD01503869D005F9203 /* catch_matchers.hpp */, 4A9D84B11558FC0400FBB209 /* catch_tostring.hpp */,