mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +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
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…
Add table
Add a link
Reference in a new issue