4
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
8
* Self-test infrastructure
12
#include <ipxe/tables.h>
14
/** A self-test set */
19
void ( * exec ) ( void );
20
/** Number of tests run */
22
/** Number of test failures */
23
unsigned int failures;
24
/** Number of assertion failures */
25
unsigned int assertion_failures;
28
/** Self-test table */
29
#define SELF_TESTS __table ( struct self_test, "self_tests" )
31
/** Declare a self-test */
32
#define __self_test __table_entry ( SELF_TESTS, 01 )
34
extern void test_ok ( int success, const char *file, unsigned int line,
40
* @v success Test succeeded
44
#define okx( success, file, line ) \
45
test_ok ( success, file, line, #success )
46
#define ok( success ) \
47
okx ( success, __FILE__, __LINE__ )
49
#endif /* _IPXE_TEST_H */