CCTests uses the external library CCExceptions to signal exceptional conditions and errors through non–local exits; See CCExceptions in CCExceptions.
The functions will raise exceptional conditions with cce_raise() and expect the caller to
intercept them using the cce_location_t mechanics. The basic code template is:
#include <cctests.h>
cce_location_t L[1];
if (cce_location(L)) {
/* Handle errors here. */
cce_run_catch_handlers_final(L);
} else {
/* Do something useful here. */
cce_run_body_handlers(L);
}
| • conditions base | Base condition object. | |
| • conditions success | Signalling test success. | |
| • conditions skipped | Signalling a skipped test. | |
| • conditions failure | Signalling test failure. | |
| • conditions expected failure | Signalling expected test failure. | |
| • conditions assertion | Signalling failed assertions. | |
| • conditions unreachable | Signalling execution of unreachable code. | |
| • conditions regex | Regular expression errors. | |
| • conditions child | Child subprocess errors. | |
Convenience condition types | ||
|---|---|---|
| • conditions signal | Convenience signal. | |
| • conditions signal one | Convenience signal one. | |
| • conditions signal two | Convenience signal two. | |
| • conditions signal three | Convenience signal three. | |
This document describes version 0.4.1-devel.1 of CCTests.