Converted all test case names to "modern" style (freeform text + tags)

This commit is contained in:
Phil Nash 2013-11-19 07:21:03 +00:00
parent a9fd5b3f14
commit 337dc25ed7
17 changed files with 587 additions and 1217 deletions

View file

@ -28,33 +28,33 @@ namespace
}
}
TEST_CASE( "./succeeding/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" )
TEST_CASE( "When checked exceptions are thrown they can be expected or unexpected", "" )
{
REQUIRE_THROWS_AS( thisThrows(), std::domain_error );
REQUIRE_NOTHROW( thisDoesntThrow() );
REQUIRE_THROWS( thisThrows() );
}
TEST_CASE( "./failing/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" )
TEST_CASE( "Expected exceptions that don't throw or unexpected exceptions fail the test", "[.][failing]" )
{
CHECK_THROWS_AS( thisThrows(), std::string );
CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error );
CHECK_NOTHROW( thisThrows() );
}
TEST_CASE( "./failing/exceptions/implicit", "When unchecked exceptions are thrown they are always failures" )
TEST_CASE( "When unchecked exceptions are thrown directly they are always failures", "[.][failing]" )
{
if( Catch::isTrue( true ) )
throw std::domain_error( "unexpected exception" );
}
TEST_CASE( "./failing/exceptions/implicit/2", "An unchecked exception reports the line of the last assertion" )
TEST_CASE( "An unchecked exception reports the line of the last assertion", "[.][failing]" )
{
CHECK( 1 == 1 );
if( Catch::isTrue( true ) )
throw std::domain_error( "unexpected exception" );
}
TEST_CASE( "./failing/exceptions/implicit/3", "When unchecked exceptions are thrown they are always failures" )
TEST_CASE( "When unchecked exceptions are thrown from sections they are always failures", "[.][failing]" )
{
SECTION( "section name", "" )
{
@ -63,12 +63,12 @@ TEST_CASE( "./failing/exceptions/implicit/3", "When unchecked exceptions are thr
}
}
TEST_CASE( "./failing/exceptions/implicit/4", "When unchecked exceptions are thrown they are always failures" )
TEST_CASE( "When unchecked exceptions are thrown from functions they are always failures", "[.][failing]" )
{
CHECK( thisThrows() == 0 );
}
TEST_CASE( "./succeeding/exceptions/implicit", "When unchecked exceptions are thrown, but caught, they do not affect the test" )
TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "" )
{
try
{
@ -105,7 +105,7 @@ CATCH_TRANSLATE_EXCEPTION( double& ex )
return Catch::toString( ex );
}
TEST_CASE( "./failing/exceptions/custom", "Unexpected custom exceptions can be translated" )
TEST_CASE("Unexpected custom exceptions can be translated", "[.][failing]" )
{
if( Catch::isTrue( true ) )
throw CustomException( "custom exception" );
@ -116,18 +116,18 @@ inline void throwCustom() {
throw CustomException( "custom exception - not std" );
}
TEST_CASE( "./failing/exceptions/custom/nothrow", "Custom exceptions can be translated when testing for nothrow" )
TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing]" )
{
REQUIRE_NOTHROW( throwCustom() );
}
TEST_CASE( "./failing/exceptions/custom/throw", "Custom exceptions can be translated when testing for throwing as something else" )
TEST_CASE( "Custom exceptions can be translated when testing for throwing as something else", "[.][failing]" )
{
REQUIRE_THROWS_AS( throwCustom(), std::exception );
}
TEST_CASE( "./failing/exceptions/custom/double", "Unexpected custom exceptions can be translated" )
TEST_CASE( "Unexpected exceptions can be translated", "[.][failing]" )
{
if( Catch::isTrue( true ) )
throw double( 3.14 );
@ -137,7 +137,7 @@ inline int thisFunctionNotImplemented( int ) {
CATCH_NOT_IMPLEMENTED;
}
TEST_CASE( "./succeeding/exceptions/notimplemented", "" )
TEST_CASE( "NotImplemented exception", "" )
{
REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) );
}