mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Test for FAIL that doesn’t take an argument
This commit is contained in:
		@@ -159,7 +159,7 @@ struct TestFailureException{};
 | 
			
		||||
    #define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, log ) \
 | 
			
		||||
        do { \
 | 
			
		||||
            INTERNAL_CATCH_ACCEPT_INFO( "", macroName, resultDisposition ); \
 | 
			
		||||
            INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << log +::Catch::StreamEndStop(), resultDisposition, true ) \
 | 
			
		||||
            INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << log, resultDisposition, true ) \
 | 
			
		||||
        } while( Catch::isTrue( false ) )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,14 @@ TEST_CASE( "FAIL aborts the test", "[failing][messages][.]" )
 | 
			
		||||
        FAIL( "This is a " << "failure" );    // This should output the message and abort
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef CATCH_CONFIG_VARIADIC_MACROS
 | 
			
		||||
TEST_CASE( "FAIL does not require an argument", "[failing][messages][.]" )
 | 
			
		||||
{
 | 
			
		||||
	if( Catch::isTrue( true ) )
 | 
			
		||||
        FAIL();
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
TEST_CASE( "Output from all sections is reported", "[failing][messages][.]" )
 | 
			
		||||
{
 | 
			
		||||
    SECTION( "one", "" )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user