From f075bb111bfd2f52c5b62f06180f3cea994db20d Mon Sep 17 00:00:00 2001 From: Snaipe Date: Tue, 17 Mar 2015 00:22:06 +0100 Subject: [PATCH] Changed prototype of criterion_run_all_tests --- src/main.c | 2 +- src/runner.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 3c5f26e..a240396 100644 --- a/src/main.c +++ b/src/main.c @@ -44,5 +44,5 @@ int main(int argc, char *argv[]) { } } - return criterion_run_all_tests(); + return !criterion_run_all_tests(); } diff --git a/src/runner.c b/src/runner.c index cc749ba..50088e7 100644 --- a/src/runner.c +++ b/src/runner.c @@ -152,7 +152,7 @@ static int criterion_run_all_tests_impl(void) { return -1; report(POST_ALL, stats); - return stats->tests_failed > 0; + return stats->tests_failed == 0; } int criterion_run_all_tests(void) { @@ -160,5 +160,5 @@ int criterion_run_all_tests(void) { if (res == -1) // if this is the test worker terminating _exit(0); - return !criterion_options.always_succeed && res; + return criterion_options.always_succeed || res; }