mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-21 12:05:39 +02:00
Removed mocked output logging tests in favour of approval tests
This commit is contained in:
@@ -140,29 +140,6 @@ TEST_CASE( "./failing/exceptions/in-section", "Exceptions thrown from sections r
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
TEST_CASE( "./succeeding/exceptions/error messages", "The error messages produced by exceptions caught by Catch matched the expected form" )
|
||||
{
|
||||
Catch::EmbeddedRunner runner;
|
||||
using namespace Catch::Matchers;
|
||||
|
||||
SECTION( "custom, unexpected", "" )
|
||||
{
|
||||
runner.runMatching( "./failing/exceptions/custom" );
|
||||
// CHECK_THAT( runner.getLog(), Contains( "Unexpected exception" ) ); // Mock reporter doesn't say this
|
||||
CHECK_THAT( runner.getLog(), Contains( "custom exception" ) );
|
||||
}
|
||||
|
||||
SECTION( "in section", "" )
|
||||
{
|
||||
runner.runMatching( "./failing/exceptions/in-section" );
|
||||
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_THAT( runner.getLog(), Contains( CATCH_GET_LINE_INFO( "the section2" ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline int thisFunctionNotImplemented( int ) {
|
||||
CATCH_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user