Print error if no test cases are run
This commit is contained in:
@@ -81,6 +81,7 @@ main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
int number_run;
|
||||
int number_failed = 0;
|
||||
size_t i;
|
||||
|
||||
@@ -106,9 +107,12 @@ main (int argc, char *argv[])
|
||||
srunner_run(sr, NULL, test_case, CK_VERBOSE);
|
||||
#endif
|
||||
}
|
||||
number_run = srunner_ntests_run(sr);
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
|
||||
if (!number_run)
|
||||
puts("ERROR: no tests were run");
|
||||
if (number_failed)
|
||||
printf("ERROR: %d tests failed\n", number_failed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user