|
YAZ
4.2.57
|
Unit Test for YAZ. More...
Go to the source code of this file.
Macros | |
| #define | YAZ_TEST_TYPE_OK 1 |
| Test OK. | |
| #define | YAZ_TEST_TYPE_FAIL 2 |
| Test failed. | |
| #define | YAZ_CHECK(as) |
| boolean test. as only evaluated once | |
| #define | YAZ_CHECK_TODO(as) |
| a test we know will fail at this time. | |
| #define | YAZ_CHECK_EQ(left, right) |
| equality test. left, right only evaluated once | |
| #define | YAZ_CHECK_INIT(argc, argv) yaz_check_init1(&argc, &argv) |
| Macro to initialize the system (in start of main typically) | |
| #define | YAZ_CHECK_TERM yaz_check_term1(); return 0 |
| Macro to terminate the system (end of main, normally) | |
| #define | YAZ_CHECK_LOG() yaz_check_init_log(argv[0]) |
| Macro to enable and initialize the yaz_log(start of main) | |
Functions | |
| int | yaz_test_get_verbosity (void) |
| Get the verbosity level. | |
| void | yaz_check_init1 (int *argc, char ***argv) |
| used by macro. Should not be called directly | |
| void | yaz_check_term1 (void) |
| used by macro. Should not be called directly | |
| void | yaz_check_init_log (const char *argv0) |
| used by macro. Should not be called directly | |
| void | yaz_check_print1 (int type, const char *file, int line, const char *expr) |
| used by macro. Should not be called directly | |
| void | yaz_check_eq1 (int type, const char *file, int line, const char *left, const char *right, int lval, int rval) |
| used by macro. Should not be called directly | |
| void | yaz_check_inc_todo (void) |
| used by macro. Should not be called directly | |
Unit Test for YAZ.
Definition in file test.h.
| #define YAZ_CHECK | ( | as | ) |
boolean test. as only evaluated once
| #define YAZ_CHECK_EQ | ( | left, | |
| right | |||
| ) |
equality test. left, right only evaluated once
| #define YAZ_CHECK_INIT | ( | argc, | |
| argv | |||
| ) | yaz_check_init1(&argc, &argv) |
| #define YAZ_CHECK_LOG | ( | ) | yaz_check_init_log(argv[0]) |
| #define YAZ_CHECK_TERM yaz_check_term1(); return 0 |
| #define YAZ_CHECK_TODO | ( | as | ) |
a test we know will fail at this time.
Later, when the bug is fixed, this test will suddenly pass, which will be reported as an error, to remind you to go and fix your tests.
| #define YAZ_TEST_TYPE_FAIL 2 |
| #define YAZ_TEST_TYPE_OK 1 |
Test OK.
Definition at line 42 of file test.h.
Referenced by yaz_check_eq1(), and yaz_check_print1().
| void yaz_check_eq1 | ( | int | type, |
| const char * | file, | ||
| int | line, | ||
| const char * | left, | ||
| const char * | right, | ||
| int | lval, | ||
| int | rval | ||
| ) |
used by macro. Should not be called directly
Definition at line 159 of file test.c.
References yaz_check_print1(), and YAZ_TEST_TYPE_OK.
| void yaz_check_inc_todo | ( | void | ) |
| void yaz_check_init1 | ( | int * | argc, |
| char *** | argv | ||
| ) |
used by macro. Should not be called directly
Definition at line 50 of file test.c.
References progname(), test_fout, test_prog, and test_verbose.
| void yaz_check_init_log | ( | const char * | argv0 | ) |
used by macro. Should not be called directly
Definition at line 110 of file test.c.
References log_tests, progname(), yaz_log_init_file(), and yaz_log_trunc().
| void yaz_check_print1 | ( | int | type, |
| const char * | file, | ||
| int | line, | ||
| const char * | expr | ||
| ) |
used by macro. Should not be called directly
Definition at line 171 of file test.c.
References get_file(), log_tests, test_failed, test_total, test_verbose, yaz_log(), YAZ_TEST_TYPE_FAIL, YAZ_TEST_TYPE_OK, and YLOG_LOG.
Referenced by yaz_check_eq1().
| void yaz_check_term1 | ( | void | ) |
used by macro. Should not be called directly
Definition at line 125 of file test.c.
References get_file(), test_failed, test_fout, test_prog, test_todo, test_total, and test_verbose.
| int yaz_test_get_verbosity | ( | void | ) |
1.8.1.2