Description I switched from Catch 1.35 to Catch 2.2.2. Now some tests do not compile anymore on some platforms. Steps to reproduce Try the variants of REQUIRE, CHECK, REQUIRE_NOTHROW, CHECK_NOTHROW ... using C++ blocks inside, for exampl...
by disabling the generation of assertion-local try-catch blocks for non-exception family of assertion macros ({REQUIRE,CHECK}{``,_FALSE, `_THAT`}). This disables translation of exceptions thrown under these assertions, but should not lead to false negatives. ...
This compile-time flag speeds up compilation of assertion macros by ~20%, by disabling the generation of assertion-local try-catch blocks for non-exception family of assertion macros ({REQUIRE,CHECK}{``,_FALSE, _THAT}). This disables translation of exceptions thrown under these assertions, but...
c++ catch2中是否有一个结构来表达输入值与期望值的Map?是的,这是可能的,但documentation缺乏好的...
emplace_back([&]() { ++cnt; ++cnt; ++cnt; ++cnt; CHECK(cnt == 16); }); } for (auto& t : threads) { t.join(); } REQUIRE(cnt == 16); We currently do not plan to support thread-safe assertions. Process isolation in a test Catch does not support running tests in isolated ...
REQUIRE_THAT( performComputation(), WithinUlps( 2.1, 2 )); // two epsilons from 2.1 These matchers are type-sensitive (float vs. double). */ #define approx_abs(D) \ Catch::WithinAbs( (D), approx_margin((D)) ) #define approx_rel(D) \ Catch::WithinRel( (D), approx_epsilon(...
This compile-time flag speeds up compilation of assertion macros by ~20%, by disabling the generation of assertion-local try-catch blocks for non-exception family of assertion macros ({REQUIRE,CHECK}{``,_FALSE, `_THAT`}). This disables translation of exceptions thrown under these assertions, ...