mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00:00
stdout retained for all sections
Fixed issue where stdout was dropped between sections
This commit is contained in:
parent
458e5eec16
commit
b13ad46532
6 changed files with 40 additions and 4 deletions
|
@ -49,3 +49,29 @@ TEST_CASE( "./failing/message/fail", "FAIL aborts the test" )
|
|||
{
|
||||
FAIL( "This is a " << "failure" ); // This should output the message and abort
|
||||
}
|
||||
|
||||
TEST_CASE( "./failing/message/sections", "Output from all sections is reported" )
|
||||
{
|
||||
SECTION( "one", "" )
|
||||
{
|
||||
FAIL( "Message from section one" );
|
||||
}
|
||||
|
||||
SECTION( "two", "" )
|
||||
{
|
||||
FAIL( "Message from section two" );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "./succeeding/message/sections/stdout", "Output from all sections is reported" )
|
||||
{
|
||||
SECTION( "one", "" )
|
||||
{
|
||||
std::cout << "Message from section one" << std::endl;
|
||||
}
|
||||
|
||||
SECTION( "two", "" )
|
||||
{
|
||||
std::cout << "Message from section two" << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue