|
libfiu (internal) 0.90
|
This header contains the API that your project should use when defining points of failure in your real (non-testing) code. More...
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Defines | |
| #define | fiu_do_on(name, action) |
| Performs the given action when the given point of failure fails. | |
| #define | fiu_exit_on(name) fiu_do_on(name, exit(EXIT_FAILURE)) |
| Exits the program when the given point of failure fails. | |
| #define | fiu_return_on(name, retval) fiu_do_on(name, return retval) |
| Makes the function return the given retval when the given point of failure fails. | |
Functions | |
| int | fiu_init (unsigned int flags) |
| Initializes the library. | |
| int | fiu_fail (const char *name) |
| Returns the failure status of the given point of failure. | |
| void * | fiu_failinfo (void) |
| Returns the information associated with the last failure. | |
This header contains the API that your project should use when defining points of failure in your real (non-testing) code.
If you want to avoid having libfiu as a mandatory build-time dependency, you should add fiu-local.h to your project, and #include that instead.
Definition in file fiu.h.
| #define fiu_do_on | ( | name, | |
| action | |||
| ) |
| #define fiu_exit_on | ( | name | ) | fiu_do_on(name, exit(EXIT_FAILURE)) |
| #define fiu_return_on | ( | name, | |
| retval | |||
| ) | fiu_do_on(name, return retval) |
| int fiu_init | ( | unsigned int | flags | ) |
| int fiu_fail | ( | const char * | name | ) |
| void* fiu_failinfo | ( | void | ) |
Returns the information associated with the last failure.
Please note that this function is thread-safe and thread-local, so the information returned will be for the last failure in the same thread.
1.7.4