mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +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
|
@ -35,11 +35,11 @@ static void assert_env(const char* name, const char* value)
|
|||
if (!result) {
|
||||
perror("getenv");
|
||||
printf("(When reading value for '%s'; we expected '%s'.)\n", name, value);
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
if (strcmp(result, value) != 0) {
|
||||
printf("Expected '%s', got '%s' instead.\n", value, result);
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ static void test_puttenv()
|
|||
int rc = putenv(to_put);
|
||||
if (rc) {
|
||||
perror("putenv");
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
assert_env("PUTENVTEST", "HELLOPUTENV");
|
||||
// Do not free `to_put`!
|
||||
|
@ -65,7 +65,7 @@ static void test_settenv()
|
|||
int rc = setenv("SETENVTEST", "HELLO SETENV!", 0);
|
||||
if (rc) {
|
||||
perror("setenv");
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
// This used to trigger a very silly bug! :)
|
||||
assert_env("SETENVTEST", "HELLO SETENV!");
|
||||
|
@ -73,14 +73,14 @@ static void test_settenv()
|
|||
rc = setenv("SETENVTEST", "How are you today?", 0);
|
||||
if (rc) {
|
||||
perror("setenv");
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
assert_env("SETENVTEST", "HELLO SETENV!");
|
||||
|
||||
rc = setenv("SETENVTEST", "Goodbye, friend!", 1);
|
||||
if (rc) {
|
||||
perror("setenv");
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
assert_env("SETENVTEST", "Goodbye, friend!");
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ static void test_settenv_overwrite_empty()
|
|||
int rc = setenv("EMPTYTEST", "Forcefully overwrite non-existing envvar", 1);
|
||||
if (rc) {
|
||||
perror("setenv");
|
||||
ASSERT(false);
|
||||
VERIFY(false);
|
||||
}
|
||||
assert_env("EMPTYTEST", "Forcefully overwrite non-existing envvar");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue