|
FORS Pipeline Reference Manual
5.0.9
|
Macros | |
| #define | cleanup |
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. More... | |
| void | test_macro (int expression, const char *expr_string, const char *function, const char *file, unsigned line) |
| Test a given expression. More... | |
| void | 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. More... | |
| void | 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. More... | |
| void | 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. More... | |
| void | 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. More... | |
| void | test_init_macro (const char *file) |
| Initialize CPL + messaging. More... | |
| unsigned | test_end_macro (const char *function, const char *file, unsigned line) |
| Perform the final checks and return the number of errors. More... | |
| void | test_recipe_output (const cpl_frameset *frames, const char *const product_tags[], int n_prod, const char *main_product, const char *const qc[], int n_qc) |
| Test existence of recipe products. More... | |
Variables | |
| static unsigned long | test_nfail = 0 |
| static cpl_errorstate | error_init |
| #define cleanup |
|
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 63 of file test.c.
References test_nfail.
Referenced by test_abs_macro(), test_eq_macro(), test_eq_string_macro(), test_macro(), and test_rel_macro().
| void 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 112 of file test.c.
References _test().
Referenced by test_end_macro().
| void 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 139 of file test.c.
References _test().
Referenced by test_end_macro().
| void 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 170 of file test.c.
References _test().
| void 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 208 of file test.c.
References _test().
| void 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 245 of file test.c.
References _test().
| void test_init_macro | ( | const char * | file | ) |
| unsigned 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 381 of file test.c.
References test_eq_macro(), test_macro(), and test_nfail.
| void test_recipe_output | ( | const cpl_frameset * | frames, |
| const char *const | product_tags[], | ||
| int | n_prod, | ||
| const char * | main_product, | ||
| const char *const | qc[], | ||
| int | n_qc | ||
| ) |
Test existence of recipe products.
| product_tags | array of expected product tags |
| n_prod | number of products |
| main_product | the only product which should contain QC parameters |
| qc | array of expected QC parameters |
| n_qc | number of QC parameters |
Definition at line 428 of file test.c.
References assure.
Referenced by test_bias(), test_img_science(), test_img_screen_flat(), test_img_sky_flat(), and test_zeropoint().
|
static |
The number of failures
Definition at line 49 of file test.c.
Referenced by _test(), and test_end_macro().
1.8.6