ihct
(I Hate C Testing)
|
Wraps all assertions. More...
Macros | |
#define | IHCT_ASSERT(expr) |
Asserts a statement inside a test unit. If the expression is false, the unit will fail the test. More... | |
#define | IHCT_NASSERT(expr) |
Asserts a statement inside a test unit. If the expression is true, the unit will fail the test. More... | |
#define | IHCT_ASSERT_STR(s1, s2) |
Asserts two strings inside a test unit to be equal. If there is any difference in the strings, the unit will fail the test. More... | |
#define | IHCT_NASSERT_STR(s1, s2) |
Asserts two strings inside a test unit not to be equal. If there is any difference in the strings, the unit will fail the test. More... | |
#define | IHCT_PASS() |
Set the test as passed and return. More... | |
#define | IHCT_FAIL() |
Set the test as failed and return. More... | |
Wraps all assertions.
Decides the success of a test. Right now, tests can only result in PASS or FAIL. Assertions are only given for expressions.
#define IHCT_ASSERT | ( | expr | ) |
Asserts a statement inside a test unit. If the expression is false, the unit will fail the test.
expr | the expression to evaluate. |
Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.
#define IHCT_ASSERT_STR | ( | s1, | |
s2 | |||
) |
Asserts two strings inside a test unit to be equal. If there is any difference in the strings, the unit will fail the test.
s1 | first string to compare |
s2 | second string to compare |
Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.
#define IHCT_FAIL | ( | ) |
Set the test as failed and return.
Used for more complex tests where the PASS/FAIL status is more complex than an assert. Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.
#define IHCT_NASSERT | ( | expr | ) |
Asserts a statement inside a test unit. If the expression is true, the unit will fail the test.
expr | the expression to evaluate. |
Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.
#define IHCT_NASSERT_STR | ( | s1, | |
s2 | |||
) |
Asserts two strings inside a test unit not to be equal. If there is any difference in the strings, the unit will fail the test.
s1 | first string to compare |
s2 | second string to compare |
Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.
#define IHCT_PASS | ( | ) |
Set the test as passed and return.
Used for more complex tests where the PASS/FAIL status is more complex than an assert. Can be shortened to remove 'IHCT_' prefix by defining IHCT_SHORT.