#include "vfer.h"
Go to the source code of this file.
Defines | |
#define | ASSERT(TEST) |
abort if test fails | |
#define | T_ERR(FUNC,) |
#define | TEST_CHECK(TO_TEST, MESG) |
#define | TEST_ERR |
#define | TEST_OUT |
#define | TEST_PRINT(FUNC,) |
#define | TEST_SUMMARY() { fprintf(test_err, "%s faulty tests: %d / %d\n", test_name, test_faults, test_max_faults); } |
Functions | |
void | TEST_INIT (char *TEST, char *File, FILE *OUT, FILE *ERR) |
Variables | |
FILE * | test_err |
int | test_faults |
char | test_file [32] |
int | test_max_faults |
char | test_name [32] |
FILE * | test_out |
Definition in file vfer_tests.h.
#define ASSERT | ( | TEST | ) |
Value:
do { \ bool _ok = (TEST); \ TEST_CHECK(_ok, #TEST " is false"); \ if (!_ok) { \ TEST_SUMMARY(); \ exit(1); \ } \ } while(0)
Definition at line 102 of file vfer_tests.h.
#define T_ERR | ( | FUNC | ) |
#define TEST_CHECK | ( | TO_TEST, | |||
MESG | ) |
Value:
{ \ test_max_faults++; \ if (!TO_TEST) { \ fprintf(test_err, "%s *** test failed: %s ***\n", test_name, MESG); \ test_faults++; \ }}
Definition at line 92 of file vfer_tests.h.
#define TEST_ERR |
Definition at line 37 of file vfer_tests.h.
#define TEST_OUT |
Definition at line 39 of file vfer_tests.h.
#define TEST_PRINT | ( | FUNC | ) |
#define TEST_SUMMARY | ( | ) | { fprintf(test_err, "%s faulty tests: %d / %d\n", test_name, test_faults, test_max_faults); } |
Definition at line 99 of file vfer_tests.h.
void TEST_INIT | ( | char * | TEST, | |
char * | File, | |||
FILE * | OUT, | |||
FILE * | ERR | |||
) |
Definition at line 72 of file vfer_tests.h.
FILE* test_err |
Definition at line 27 of file vfer_tests.h.
int test_faults |
Definition at line 33 of file vfer_tests.h.
char test_file[32] |
Definition at line 30 of file vfer_tests.h.
int test_max_faults |
Definition at line 34 of file vfer_tests.h.
char test_name[32] |
Definition at line 29 of file vfer_tests.h.
FILE* test_out |
Definition at line 26 of file vfer_tests.h.