From 777b8af589e4443409abbc83000d18b6f8d546cd Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 29 Feb 2012 08:39:46 +0000 Subject: [PATCH] regen single include --- single_include/catch.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 88a0e5bf..e32e6aec 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1956,20 +1956,15 @@ inline bool isTrue /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_TEST( expr, isNot, stopOnFailure, macroName ) \ - try \ - { \ + do{ try{ \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr, isNot )->*expr ), stopOnFailure ); \ if( Catch::isTrue( false ) ){ bool internal_catch_dummyResult = ( expr ); Catch::isTrue( internal_catch_dummyResult ); } \ - } \ - catch( Catch::TestFailureException& ) \ - { \ + }catch( Catch::TestFailureException& ){ \ throw; \ - } \ - catch( ... ) \ - { \ + } catch( ... ){ \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false ); \ throw; \ - } + }}while(0) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \