From f7c27648dcedfd4e3a336a0207bce2c5400fc8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 11 Jul 2014 16:27:36 +0200 Subject: [PATCH] Print error if no test cases are run --- test/test_runner.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_runner.c b/test/test_runner.c index da30362..c5cedb8 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -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);