Commit e46bb7fc authored by Matthias Vallentin's avatar Matthias Vallentin

Bring back macro for checks that expect to fail

This used to be CAF_FAIL, but in the process of streamlining the
semantics of this macro to be compatible with Boost.Test, we've lost the
ability to express a check which is known to fail. The macro
CAF_CHECK_FAIL brings back this capability. The suffix _FAIL after CHECK
hints that this is a variation of CAF_CHECK.
parent 2e8c81f2
...@@ -563,6 +563,16 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture; ...@@ -563,6 +563,16 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture;
::caf::test::engine::last_check_line(__LINE__); \ ::caf::test::engine::last_check_line(__LINE__); \
} while(false) } while(false)
#define CAF_CHECK_FAIL(...) \
do { \
(void)(::caf::test::detail::expr{ \
::caf::test::engine::current_test(), __FILE__, __LINE__, \
true, #__VA_ARGS__} ->* __VA_ARGS__); \
::caf::test::engine::last_check_file(__FILE__); \
::caf::test::engine::last_check_line(__LINE__); \
} while(false)
#define CAF_FAIL(msg) \ #define CAF_FAIL(msg) \
do { \ do { \
CAF_TEST_ERROR(msg); \ CAF_TEST_ERROR(msg); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment