1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

LibTest: Add FAIL() macro allow tests to force failure with message.

This commit is contained in:
Brian Gianforcaro 2021-04-27 02:36:48 -07:00 committed by Linus Groh
parent ace2c337dc
commit a9df58d7b2

View file

@ -85,3 +85,9 @@ void current_test_case_did_fail();
::Test::current_test_case_did_fail(); \ ::Test::current_test_case_did_fail(); \
} \ } \
} while (false) } while (false)
#define FAIL(message) \
do { \
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: {}", __FILE__, __LINE__, message); \
::Test::current_test_case_did_fail(); \
} while (false)