Closed mKlus closed 12 years ago
I'm not quite sure what you want to achieve here. CHECK & REQUIRE already capture FILE and LINE internally, which are used when reporting the results. Do you want to be able to pass different values for these? If so why? As for the expression definition - usually the captured form of the expression is enough. If you do want more custom context you can preceed the assertion with INFO( message expression ), which is only logged in the event of a subsequent failure.
Hi Phil,
thanks for your comment. I tried to explain why I need the macro in #92. I haven't thought about using INFO before. Maybe that can solve my problem.
Thanks, Marek
I'm going to close this as I don't think it's an issue with CATCH. You are welcome to continue the dialog if you email me directly on my philnash.me domain (put anything before the @)
Would it be possible to add CHECK/REQUIRE macros that we can pass file, line and possibly custom expression description as parameters?
define CHECK_DFL( expr, exprDesc, file, line ) INTERNAL_CATCH_TEST_DFL( expr, false, false, "CHECK", exprDesc, file, line )
define INTERNAL_CATCH_TEST_DFL( expr, isNot, stopOnFailure, macroName, exprDesc, file, line ) \