ASL
|
Tiny testing functionality.
The ASL_TEST_ENABLE_MAIN()
macro adds testing functionality and creates a main function that runs all defined tests. Use the ASL_TEST_ENABLE()
macro if you will provide your own main function.
Macros | |
#define | ASL_TEST_ENABLE() |
Add support for testing in this executable (use only once in the sources for one executable). | |
#define | ASL_TEST_ENABLE_MAIN() |
Add support for testing in this executable and create a function main() that runs all tests. | |
#define | ASL_TEST(Name) |
Create a test named Name. | |
#define | ASL_ASSERT(x) |
Check that the argument is true. | |
#define | ASL_EXPECT(x, op, y) |
Check a condition with the given operator and operands. | |
#define | ASL_EXPECT_NEAR(x, y, d) |
Check that x and y are approximately equal (within distance d ). | |
Functions | |
bool | runTest (const char *name) |
Runs the test named name . | |
bool | runAllTests () |
Runs all tests and returns true if all succeded; prints results to console or appends them to testResult on Android. | |
#define ASL_EXPECT | ( | x, | |
op, | |||
y | |||
) |
Check a condition with the given operator and operands.