Functions | |
| static void | test (int expression, const char *message, const char *function, const char *file, unsigned line) |
| Evaluate an expression and update an internal counter if it fails. | |
| void | irplib_test_macro (int expression, const char *expr_string, const char *function, const char *file, unsigned line) |
| Test a given expression. | |
| void | irplib_test_eq_macro (int first, const char *first_string, int second, const char *second_string, const char *function, const char *file, unsigned line) |
| Test if two integer expressions are equal. | |
| void | irplib_test_eq_string_macro (const char *first, const char *first_string, const char *second, const char *second_string, const char *function, const char *file, unsigned line) |
| Test if two strings are equal. | |
| void | irplib_test_abs_macro (double first, const char *first_string, double second, const char *second_string, double tolerance, const char *tolerance_string, const char *function, const char *file, unsigned line) |
| Test if two numerical expressions are within a given (absolute) tolerance. | |
| void | irplib_test_rel_macro (double first, const char *first_string, double second, const char *second_string, double tolerance, const char *tolerance_string, const char *function, const char *file, unsigned line) |
| Test if two numerical expressions are within a given relative tolerance. | |
| void | irplib_test_init_macro (const char *file) |
| Initialize CPL messaging, IRPLIB. | |
| unsigned | irplib_test_end_macro (const char *function, const char *file, unsigned line) |
| Perform the final checks and return the number of errors. | |
Variables | |
| static unsigned long | irplib_test_nfail = 0 |
| static clock_t | irplib_test_start |
| static void test | ( | int | expression, | |
| const char * | message, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) | [static] |
Evaluate an expression and update an internal counter if it fails.
| expression | The expression to evaluate | |
| message | The text message associated with the expression | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 72 of file irplib_test.c.
References irplib_test_nfail.
Referenced by irplib_test_abs_macro(), irplib_test_eq_macro(), irplib_test_eq_string_macro(), irplib_test_macro(), irplib_test_rel_macro(), and table_erase_selected().
| void irplib_test_macro | ( | int | expression, | |
| const char * | expr_string, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) |
Test a given expression.
| expression | the expression to evaluate | |
| expr_string | the expression to evaluate as a string | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 121 of file irplib_test.c.
References test().
Referenced by irplib_test_end_macro().
| void irplib_test_eq_macro | ( | int | first, | |
| const char * | first_string, | |||
| int | second, | |||
| const char * | second_string, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) |
Test if two integer expressions are equal.
| first | The first value in the comparison | |
| first_string | The first value as a string | |
| second | The second value in the comparison | |
| second_string | The second value as a string | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 148 of file irplib_test.c.
References test().
Referenced by irplib_test_end_macro().
| void irplib_test_eq_string_macro | ( | const char * | first, | |
| const char * | first_string, | |||
| const char * | second, | |||
| const char * | second_string, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) |
Test if two strings are equal.
| first | The first value in the comparison | |
| first_string | The first value as a string | |
| second | The second value in the comparison | |
| second_string | The second value as a string | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 179 of file irplib_test.c.
References test().
| void irplib_test_abs_macro | ( | double | first, | |
| const char * | first_string, | |||
| double | second, | |||
| const char * | second_string, | |||
| double | tolerance, | |||
| const char * | tolerance_string, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) |
Test if two numerical expressions are within a given (absolute) tolerance.
| first | The first value in the comparison | |
| first_string | The first value as a string | |
| second | The second value in the comparison | |
| second_string | The second value as a string | |
| tolerance | A non-negative tolerance | |
| tolerance_string | The tolerance as a string | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 217 of file irplib_test.c.
References test().
| void irplib_test_rel_macro | ( | double | first, | |
| const char * | first_string, | |||
| double | second, | |||
| const char * | second_string, | |||
| double | tolerance, | |||
| const char * | tolerance_string, | |||
| const char * | function, | |||
| const char * | file, | |||
| unsigned | line | |||
| ) |
Test if two numerical expressions are within a given relative tolerance.
| first | The first value in the comparison | |
| first_string | The first value as a string | |
| second | The second value in the comparison | |
| second_string | The second value as a string | |
| tolerance | A non-negative tolerance | |
| tolerance_string | The tolerance as a string | |
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 254 of file irplib_test.c.
References test().
| void irplib_test_init_macro | ( | const char * | file | ) |
Initialize CPL messaging, IRPLIB.
| file | filename |
Definition at line 299 of file irplib_test.c.
References irplib_reset(), and irplib_test_start.
| unsigned irplib_test_end_macro | ( | const char * | function, | |
| const char * | file, | |||
| unsigned | line | |||
| ) |
Perform the final checks and return the number of errors.
| function | function name | |
| file | filename | |
| line | line number |
Definition at line 395 of file irplib_test.c.
References irplib_test_eq_macro(), irplib_test_macro(), irplib_test_nfail, and irplib_test_start.
unsigned long irplib_test_nfail = 0 [static] |
The number of failures
Definition at line 58 of file irplib_test.c.
Referenced by irplib_test_end_macro(), and test().
1.5.1