|
@@ -45,8 +45,10 @@ static struct self_test *current_tests;
|
45
|
45
|
* @v success Test succeeded
|
46
|
46
|
* @v file Test code file
|
47
|
47
|
* @v line Test code line
|
|
48
|
+ * @v test Test code
|
48
|
49
|
*/
|
49
|
|
-void test_ok ( int success, const char *file, unsigned int line ) {
|
|
50
|
+void test_ok ( int success, const char *file, unsigned int line,
|
|
51
|
+ const char *test ) {
|
50
|
52
|
|
51
|
53
|
/* Sanity check */
|
52
|
54
|
assert ( current_tests != NULL );
|
|
@@ -57,8 +59,8 @@ void test_ok ( int success, const char *file, unsigned int line ) {
|
57
|
59
|
/* Report failure if applicable */
|
58
|
60
|
if ( ! success ) {
|
59
|
61
|
current_tests->failures++;
|
60
|
|
- printf ( "FAILURE: \"%s\" test failed at %s line %d\n",
|
61
|
|
- current_tests->name, file, line );
|
|
62
|
+ printf ( "FAILURE: \"%s\" test failed at %s line %d: ( %s )\n",
|
|
63
|
+ current_tests->name, file, line, test );
|
62
|
64
|
}
|
63
|
65
|
}
|
64
|
66
|
|