This commit is contained in:
Phil Nash 2014-04-18 08:30:31 +01:00
parent 7303b2b60e
commit 9d469b6cb5
3 changed files with 20 additions and 27 deletions

View File

@ -1,6 +1,6 @@
![catch logo](catch-logo-small.png) ![catch logo](catch-logo-small.png)
*v1.0 build 36 (master branch)* *v1.0 build 37 (master branch)*
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch) Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)

View File

@ -13,7 +13,7 @@
namespace Catch { namespace Catch {
// These numbers are maintained by a script // These numbers are maintained by a script
Version libraryVersion( 1, 0, 36, "master" ); Version libraryVersion( 1, 0, 37, "master" );
} }
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED

View File

@ -1,6 +1,6 @@
/* /*
* CATCH v1.0 build 36 (master branch) * CATCH v1.0 build 37 (master branch)
* Generated: 2014-04-15 18:42:33.686099 * Generated: 2014-04-18 08:30:06.534609
* ---------------------------------------------------------- * ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly * This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@ -1580,26 +1580,19 @@ struct TestFailureException{};
} // end namespace Catch } // end namespace Catch
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ASSERTIONINFO_NAME INTERNAL_CATCH_UNIQUE_NAME( __assertionInfo )
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ACCEPT_EXPR( evaluatedExpr, resultDisposition, originalExpr ) \ #define INTERNAL_CATCH_ACCEPT_EXPR( evaluatedExpr, resultDisposition, originalExpr ) \
if( Catch::ResultAction::Value internal_catch_action = Catch::getResultCapture().acceptExpression( evaluatedExpr, INTERNAL_CATCH_ASSERTIONINFO_NAME ) ) { \ if( Catch::ResultAction::Value internal_catch_action = Catch::getResultCapture().acceptExpression( evaluatedExpr, __assertionInfo ) ) { \
if( internal_catch_action & Catch::ResultAction::Debug ) CATCH_BREAK_INTO_DEBUGGER(); \ if( internal_catch_action & Catch::ResultAction::Debug ) CATCH_BREAK_INTO_DEBUGGER(); \
if( internal_catch_action & Catch::ResultAction::Abort ) throw Catch::TestFailureException(); \ if( internal_catch_action & Catch::ResultAction::Abort ) throw Catch::TestFailureException(); \
if( !Catch::shouldContinueOnFailure( resultDisposition ) ) throw Catch::TestFailureException(); \ if( !Catch::shouldContinueOnFailure( resultDisposition ) ) throw Catch::TestFailureException(); \
Catch::isTrue( false && originalExpr ); \ Catch::isTrue( false && originalExpr ); \
} }
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ACCEPT_INFO( expr, macroName, resultDisposition ) \
Catch::AssertionInfo INTERNAL_CATCH_ASSERTIONINFO_NAME( macroName, CATCH_INTERNAL_LINEINFO, expr, resultDisposition );
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ) \ #define INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \ try { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionDecomposer()->*expr ).endExpression( resultDisposition ), resultDisposition, expr ); \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionDecomposer()->*expr ).endExpression( resultDisposition ), resultDisposition, expr ); \
} catch( Catch::TestFailureException& ) { \ } catch( Catch::TestFailureException& ) { \
@ -1623,7 +1616,7 @@ struct TestFailureException{};
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_NO_THROW( expr, resultDisposition, macroName ) \ #define INTERNAL_CATCH_NO_THROW( expr, resultDisposition, macroName ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \ try { \
expr; \ expr; \
INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( Catch::ResultWas::Ok ), resultDisposition, false ); \ INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( Catch::ResultWas::Ok ), resultDisposition, false ); \
@ -1651,14 +1644,14 @@ struct TestFailureException{};
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_THROWS( expr, exceptionType, resultDisposition, macroName ) \ #define INTERNAL_CATCH_THROWS( expr, exceptionType, resultDisposition, macroName ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
INTERNAL_CATCH_THROWS_IMPL( expr, exceptionType, resultDisposition ) \ INTERNAL_CATCH_THROWS_IMPL( expr, exceptionType, resultDisposition ) \
} while( Catch::isTrue( false ) ) } while( Catch::isTrue( false ) )
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_THROWS_AS( expr, exceptionType, resultDisposition, macroName ) \ #define INTERNAL_CATCH_THROWS_AS( expr, exceptionType, resultDisposition, macroName ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
INTERNAL_CATCH_THROWS_IMPL( expr, exceptionType, resultDisposition ) \ INTERNAL_CATCH_THROWS_IMPL( expr, exceptionType, resultDisposition ) \
catch( ... ) { \ catch( ... ) { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionResultBuilder( Catch::ResultWas::ThrewException ) << Catch::translateActiveException() ), \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionResultBuilder( Catch::ResultWas::ThrewException ) << Catch::translateActiveException() ), \
@ -1670,13 +1663,13 @@ struct TestFailureException{};
#ifdef CATCH_CONFIG_VARIADIC_MACROS #ifdef CATCH_CONFIG_VARIADIC_MACROS
#define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, ... ) \ #define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, ... ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( "", macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \
INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << __VA_ARGS__ +::Catch::StreamEndStop(), resultDisposition, true ) \ INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << __VA_ARGS__ +::Catch::StreamEndStop(), resultDisposition, true ) \
} while( Catch::isTrue( false ) ) } while( Catch::isTrue( false ) )
#else #else
#define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, log ) \ #define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, log ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( "", macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \
INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << log, resultDisposition, true ) \ INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( messageType ) << log, resultDisposition, true ) \
} while( Catch::isTrue( false ) ) } while( Catch::isTrue( false ) )
#endif #endif
@ -1688,7 +1681,7 @@ struct TestFailureException{};
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CHECK_THAT( arg, matcher, resultDisposition, macroName ) \ #define INTERNAL_CHECK_THAT( arg, matcher, resultDisposition, macroName ) \
do { \ do { \
INTERNAL_CATCH_ACCEPT_INFO( #arg " " #matcher, macroName, resultDisposition ); \ Catch::AssertionInfo __assertionInfo( macroName, CATCH_INTERNAL_LINEINFO, #arg " " #matcher, resultDisposition ); \
try { \ try { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::expressionResultBuilderFromMatcher( ::Catch::Matchers::matcher, arg, #matcher ) ), resultDisposition, false ); \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::expressionResultBuilderFromMatcher( ::Catch::Matchers::matcher, arg, #matcher ) ), resultDisposition, false ); \
} catch( Catch::TestFailureException& ) { \ } catch( Catch::TestFailureException& ) { \
@ -5093,17 +5086,17 @@ namespace Catch {
Version( unsigned int _majorVersion, Version( unsigned int _majorVersion,
unsigned int _minorVersion, unsigned int _minorVersion,
unsigned int _buildNumber, unsigned int _buildNumber,
std::string const& _branchName ) char const* const _branchName )
: majorVersion( _majorVersion ), : majorVersion( _majorVersion ),
minorVersion( _minorVersion ), minorVersion( _minorVersion ),
buildNumber( _buildNumber ), buildNumber( _buildNumber ),
branchName( _branchName ) branchName( _branchName )
{} {}
const unsigned int majorVersion; unsigned int const majorVersion;
const unsigned int minorVersion; unsigned int const minorVersion;
const unsigned int buildNumber; unsigned int const buildNumber;
const std::string branchName; char const* const branchName;
private: private:
void operator=( Version const& ); void operator=( Version const& );
@ -5229,7 +5222,7 @@ namespace Catch {
std::cout << "\nCatch v" << libraryVersion.majorVersion << "." std::cout << "\nCatch v" << libraryVersion.majorVersion << "."
<< libraryVersion.minorVersion << " build " << libraryVersion.minorVersion << " build "
<< libraryVersion.buildNumber; << libraryVersion.buildNumber;
if( libraryVersion.branchName != "master" ) if( libraryVersion.branchName != std::string( "master" ) )
std::cout << " (" << libraryVersion.branchName << " branch)"; std::cout << " (" << libraryVersion.branchName << " branch)";
std::cout << "\n"; std::cout << "\n";
@ -6623,7 +6616,7 @@ namespace Catch {
namespace Catch { namespace Catch {
// These numbers are maintained by a script // These numbers are maintained by a script
Version libraryVersion( 1, 0, 36, "master" ); Version libraryVersion( 1, 0, 37, "master" );
} }
// #included from: catch_message.hpp // #included from: catch_message.hpp
@ -8081,7 +8074,7 @@ namespace Catch {
<< " is a Catch v" << libraryVersion.majorVersion << "." << " is a Catch v" << libraryVersion.majorVersion << "."
<< libraryVersion.minorVersion << " b" << libraryVersion.minorVersion << " b"
<< libraryVersion.buildNumber; << libraryVersion.buildNumber;
if( libraryVersion.branchName != "master" ) if( libraryVersion.branchName != std::string( "master" ) )
stream << " (" << libraryVersion.branchName << ")"; stream << " (" << libraryVersion.branchName << ")";
stream << " host application.\n" stream << " host application.\n"
<< "Run with -? for options\n\n"; << "Run with -? for options\n\n";