Assertions
The failure of one of these macros causes the current test to immediately exit
- CHECK(boolean condition) - checks any boolean result.
- CHECK_EQUAL(expected, actual) - checks for equality between entities
using ==. So if you have a class that supports operator==() you can use
this macro to compare two instances. You will also need to add a stringFrom() function
like those found in SimpleString.
- STRCMP_EQUAL(expected, actual) - check const char* strings for equality
using strcmp().
- LONGS_EQUAL(expected, actual) - Compares two numbers.
- BYTES_EQUAL(expected, actual) - Compares two numbers, eight bits wide.
- POINTERS_EQUAL(expected, actual) - Compares two pointers.
- DOUBLES_EQUAL(expected, actual, tolerance) - Compares two doubles
within some tolerance
- FAIL(text) - always fails