mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Fixed line/no regression for SECTIONs
Unexpected exceptions within a section now get the SECTION's line no. again (instead of TEST_CASE line/no)
This commit is contained in:
@@ -151,7 +151,7 @@ TEST_CASE( "./succeeding/exceptions/error messages", "The error messages produce
|
||||
INFO( runner.getLog() );
|
||||
// CHECK( runner.getLog().find( "Unexpected exception" ) != std::string::npos ); // Mock reporter doesn't say this
|
||||
CHECK_THAT( runner.getLog(), Contains( "Exception from section" ) );
|
||||
// CHECK( runner.getLog().find( CATCH_GET_LINE_INFO( "the section2" ) ) != std::string::npos ); // Mock reporter doesn't say this
|
||||
CHECK_THAT( runner.getLog(), Contains( CATCH_GET_LINE_INFO( "the section2" ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results"
|
||||
SECTION( "selftest/test counts/succeeding tests",
|
||||
"Number of 'succeeding' tests is fixed" ) {
|
||||
Totals totals = runner.runMatching( "./succeeding/*" );
|
||||
CHECK( totals.assertions.passed == 288 );
|
||||
CHECK( totals.assertions.passed == 289 );
|
||||
CHECK( totals.assertions.failed == 0 );
|
||||
}
|
||||
|
||||
|
@@ -34,6 +34,8 @@ namespace Catch{
|
||||
void MockReporter::Result( const AssertionResult& assertionResult ) {
|
||||
if( assertionResult.getResultType() == ResultWas::Ok )
|
||||
return;
|
||||
|
||||
m_log << assertionResult.getSourceInfo() << " ";
|
||||
|
||||
switch( assertionResult.getResultType() ) {
|
||||
case ResultWas::Info:
|
||||
|
@@ -551,11 +551,7 @@
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES;
|
||||
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = (
|
||||
CATCH_CONFIG_USE_ANSI_COLOUR_CODES,
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WARNING_CFLAGS = (
|
||||
"-Weverything",
|
||||
|
Reference in New Issue
Block a user