lazily stringify expressions

This commit is contained in:
Mickey Rose authored and Martin Hořeňovský committed 2017-01-14 21:56:16 +01:00
1 parent 3b7511e564
commit a1e9b841ff
7 files changed
+223 -110

No files matched your search

+1 -7
View File
@@ -132,13 +132,7 @@
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \
try { \
std::string matcherAsString = (matcher).toString(); \
__catchResult \
.setLhs( Catch::toString( arg ) ) \
.setRhs( matcherAsString == Catch::Detail::unprintableString ? #matcher : matcherAsString ) \
.setOp( "matches" ) \
.setResultType( (matcher).match( arg ) ); \
__catchResult.captureExpression(); \
__catchResult.captureMatch( arg, matcher, #matcher ); \
} catch( ... ) { \
__catchResult.useActiveException( resultDisposition | Catch::ResultDisposition::ContinueOnFailure ); \
} \