Skip to content

Commit 6ab99d3

Browse files
committed
Use SUCCEED macro to report Ok results failures to Catch2
The previous approach buries the list of which trompeloil requirements were matched in the expansion of the REQUIRE expression: PASSED: REQUIRE( trompeloeil_mock_calls_done_correctly != 0 ) with expansion: "spy.rowsAboutToBeInserted(QModelIndex{},1,1)" != 0 Using SUCCESS puts the real message up front, with no extra quoting. PASSED: with message: spy.rowsAboutToBeInserted(QModelIndex{},1,1) SUCCEED has been available since Catch2 1.2.0
1 parent 29169e6 commit 6ab99d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/catch2/trompeloeil.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ namespace trompeloeil
5959
const char* trompeloeil_mock_calls_done_correctly)
6060
{
6161
#ifdef CATCH_CONFIG_PREFIX_ALL
62-
CATCH_REQUIRE(trompeloeil_mock_calls_done_correctly != 0);
62+
CATCH_SUCCEED(trompeloeil_mock_calls_done_correctly);
6363
#else
64-
REQUIRE(trompeloeil_mock_calls_done_correctly != 0);
64+
SUCCEED(trompeloeil_mock_calls_done_correctly);
6565
#endif
6666
}
6767
}

0 commit comments

Comments
 (0)