mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibTest: Remove the redefinition of VERIFY family of macros
Previously VERIFY et al. was redefined inside tests to not abort and instead fail the test. This wouldn't apply to non-header code though, and was not helpful, as it prevented you from easily attaching gdb near the abort. After this removal tests can still use the EXPECT family of macros, but VERIFY will behave like it does in the rest of the codebase (abort etc.).
This commit is contained in:
parent
5a4c27b8ae
commit
f568937133
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/Janiczek Commit: https://github.com/SerenityOS/serenity/commit/f568937133 Pull-request: https://github.com/SerenityOS/serenity/pull/21479 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 0 additions and 23 deletions
|
@ -22,29 +22,6 @@ namespace Test {
|
|||
void current_test_case_did_fail();
|
||||
}
|
||||
|
||||
#undef VERIFY
|
||||
#define VERIFY(x) \
|
||||
do { \
|
||||
if (!(x)) { \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: VERIFY({}) failed", __FILE__, __LINE__, #x); \
|
||||
::Test::current_test_case_did_fail(); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#undef VERIFY_NOT_REACHED
|
||||
#define VERIFY_NOT_REACHED() \
|
||||
do { \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: VERIFY_NOT_REACHED() called", __FILE__, __LINE__); \
|
||||
::abort(); \
|
||||
} while (false)
|
||||
|
||||
#undef TODO
|
||||
#define TODO() \
|
||||
do { \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: TODO() called", __FILE__, __LINE__); \
|
||||
::abort(); \
|
||||
} while (false)
|
||||
|
||||
#define EXPECT_EQ(a, b) \
|
||||
do { \
|
||||
auto lhs = (a); \
|
||||
|
|
Loading…
Reference in a new issue