From 670670ed714bbe91ed8575831ccc34be8860612b Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 16 Jul 2010 23:01:39 +0200 Subject: [PATCH] Correct number of failed suites --- test/framework.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/framework.c b/test/framework.c index b079d41d6..bc6436f7e 100644 --- a/test/framework.c +++ b/test/framework.c @@ -64,9 +64,13 @@ cct_run(suite_fn *suites, int verbose_output) for (suite = suites; *suite; suite++) { unsigned test_index = 0; - do { + while (1) { test_index = (*suite)(test_index + 1); - } while (test_index != 0); + if (test_index == 0) { + break; + } + ++failed_suites; + } --passed_tests; /* Fix false increase in first TEST expansion. */ } -- 2.47.3