mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
This commit is contained in:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
|
@ -38,11 +38,11 @@ void warnln(CheckedFormatString<Parameters...>&& fmtstr, const Parameters&...);
|
|||
|
||||
using AK::warnln;
|
||||
|
||||
#undef ASSERT
|
||||
#define ASSERT(x) \
|
||||
#undef VERIFY
|
||||
#define VERIFY(x) \
|
||||
do { \
|
||||
if (!(x)) \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: ASSERT({}) failed", __FILE__, __LINE__, #x); \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: VERIFY({}) failed", __FILE__, __LINE__, #x); \
|
||||
} while (false)
|
||||
|
||||
#undef RELEASE_ASSERT
|
||||
|
@ -52,10 +52,10 @@ using AK::warnln;
|
|||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: RELEASE_ASSERT({}) failed", __FILE__, __LINE__, #x); \
|
||||
} while (false)
|
||||
|
||||
#undef ASSERT_NOT_REACHED
|
||||
#define ASSERT_NOT_REACHED() \
|
||||
#undef VERIFY_NOT_REACHED
|
||||
#define VERIFY_NOT_REACHED() \
|
||||
do { \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: ASSERT_NOT_REACHED() called", __FILE__, __LINE__); \
|
||||
::AK::warnln("\033[31;1mFAIL\033[0m: {}:{}: VERIFY_NOT_REACHED() called", __FILE__, __LINE__); \
|
||||
::abort(); \
|
||||
} while (false)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue