Add STATIC_REQUIRE assertion

By default, it expands into a `static_assert` + `SUCCEED` pair, but
it can also be deferred to runtime by defining
`CATCH_CONFIG_RUNTIME_STATIC_REQUIRE`, which causes it to expand
into plain old `REQUIRE`.

Closes #1362
Closes #1356
This commit is contained in:
Martin Hořeňovský
2018-10-13 21:29:59 +02:00
parent 0144ae9ad2
commit 054d356332
8 changed files with 75 additions and 18 deletions

View File

@@ -496,6 +496,8 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'c
Tricky.tests.cpp:<line number>: passed: True for: {?}
Tricky.tests.cpp:<line number>: passed: !False for: true
Tricky.tests.cpp:<line number>: passed: !(False) for: !{?}
Compilation.tests.cpp:<line number>: passed: with 1 message: 'std::is_void<void>::value'
Compilation.tests.cpp:<line number>: passed: with 1 message: '!(std::is_void<int>::value)'
Condition.tests.cpp:<line number>: failed: data.int_seven > 7 for: 7 > 7
Condition.tests.cpp:<line number>: failed: data.int_seven < 7 for: 7 < 7
Condition.tests.cpp:<line number>: failed: data.int_seven > 8 for: 7 > 8