mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibTest: Add FAIL() macro allow tests to force failure with message.
This commit is contained in:
parent
ace2c337dc
commit
a9df58d7b2
Notes:
sideshowbarker
2024-07-18 19:02:06 +09:00
Author: https://github.com/bgianfo
Commit: a9df58d7b2
Pull-request: https://github.com/SerenityOS/serenity/pull/6687
Reviewed-by: https://github.com/linusg
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