Lines Matching refs:tests
68 static void run_tests ( struct self_test *tests ) {
75 current_tests = tests;
77 /* Run tests */
78 tests->exec();
84 tests->assertion_failures =
88 if ( tests->failures || tests->assertion_failures ) {
89 printf ( "FAILURE: \"%s\" %d of %d tests failed",
90 tests->name, tests->failures, tests->total );
91 if ( tests->assertion_failures ) {
93 tests->assertion_failures );
97 printf ( "OK: \"%s\" %d tests passed\n",
98 tests->name, tests->total );
103 * Run all self-tests
108 struct self_test *tests;
113 /* Run all compiled-in self-tests */
114 printf ( "Starting self-tests\n" );
115 for_each_table_entry ( tests, SELF_TESTS )
116 run_tests ( tests );
119 for_each_table_entry ( tests, SELF_TESTS ) {
120 total += tests->total;
121 failures += tests->failures;
122 assertions += tests->assertion_failures;
125 printf ( "FAILURE: %d of %d tests failed",
133 printf ( "OK: all %d tests passed\n", total );
147 .name = "self-tests",
161 /* Register self-tests image */