Removed mocked output logging tests in favour of approval tests

This commit is contained in:
Phil Nash
2012-12-01 09:13:36 +00:00
parent 8255acf88f
commit 37ce023a30
6 changed files with 237 additions and 632 deletions

View File

@@ -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;
}