mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
LibTest: Add FAIL() macro allow tests to force failure with message.
This commit is contained in:
parent
ace2c337dc
commit
a9df58d7b2
1 changed files with 6 additions and 0 deletions
|
@ -85,3 +85,9 @@ void current_test_case_did_fail();
|
|||
::Test::current_test_case_did_fail(); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#define FAIL(message) \
|
||||
do { \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: {}", __FILE__, __LINE__, message); \
|
||||
::Test::current_test_case_did_fail(); \
|
||||
} while (false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue