catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Extend exception type in _THROWS_ with const& unconditionally
- Commit
efd79aa0bdeb7d02be2d9b3db01685c7f0467568- Author
- Martin Hořeňovský ·
- Parents
4a1e898eaeab
Changes
include/internal/catch_capture.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index 9a7714cc..1c862505 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -130,7 +130,7 @@ static_cast<void>(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ - catch( exceptionType ) { \ + catch( exceptionType const& ) { \ __catchResult.captureResult( Catch::ResultWas::Ok ); \ } \ catch( ... ) { \ @@ -194,7 +194,7 @@ static_cast<void>(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ - catch( exceptionType ex ) { \ + catch( exceptionType const& ex ) { \ __catchResult.captureMatch( ex, matcher, #matcher ); \ } \ catch( ... ) { \