@@ -1730,23 +1730,22 @@ int tst_test_get_failed_num (void)
1730
1730
int tst_test_print_failed (void )
1731
1731
{
1732
1732
int i ;
1733
- printf ("Number of failed tests:%d%s" ,
1734
- tst_tests_failed_num ,
1735
- (tst_tests_failed_num > 0 ) ? " summary of failed tests:\n" : "\n" );
1736
-
1737
- for (i = 0 ; i < tst_tests_failed_num ; i ++ )
1738
- {
1739
- const int test = tst_tests_failed [i ].test ;
1740
- const int comm = tst_tests_failed [i ].comm ;
1741
- const int type = tst_tests_failed [i ].type ;
1742
- const int values_num = tst_tests_failed [i ].values_num ;
1743
-
1744
- printf ("ERROR class:%s test:%s (%d), comm %s (%d), type %s (%d) number of values:%d\n" ,
1745
- tst_test_getclass_string (test ),
1746
- tst_test_getdescription (test ), test + 1 ,
1747
- tst_comm_getdescription (comm ), comm + 1 ,
1748
- tst_type_getdescription (type ), type + 1 , values_num );
1749
- }
1733
+ printf ("Number of failed tests: %d\n" , tst_tests_failed_num );
1734
+ if (tst_tests_failed_num > 0 ) {
1735
+ printf ("Summary of failed tests:\n" );
1736
+ for (i = 0 ; i < tst_tests_failed_num ; i ++ ) {
1737
+ const int test = tst_tests_failed [i ].test ;
1738
+ const int comm = tst_tests_failed [i ].comm ;
1739
+ const int type = tst_tests_failed [i ].type ;
1740
+ const int values_num = tst_tests_failed [i ].values_num ;
1741
+
1742
+ printf ("ERROR class:%s test:%s (%d), comm %s (%d), type %s (%d) number of values:%d\n" ,
1743
+ tst_test_getclass_string (test ),
1744
+ tst_test_getdescription (test ), test + 1 ,
1745
+ tst_comm_getdescription (comm ), comm + 1 ,
1746
+ tst_type_getdescription (type ), type + 1 , values_num );
1747
+ }
1748
+ }
1750
1749
return 0 ;
1751
1750
}
1752
1751
0 commit comments