X-Git-Url: https://git.llucax.com/software/mutest.git/blobdiff_plain/5ce20f06cfd85f7498652f86a4111ed6c456b9f9..HEAD:/mutest.c diff --git a/mutest.c b/mutest.c index 2971480..00dd7b8 100644 --- a/mutest.c +++ b/mutest.c @@ -1,3 +1,17 @@ +/* + * This file is part of mutest, a simple micro unit testing framework for C. + * + * mutest was written by Leandro Lucarella and is released + * under the BOLA license, please see the LICENSE file or visit: + * http://blitiri.com.ar/p/bola/ + * + * This is the main program, it runs all the test suites and shows the + * results. The main work (of running the test suite) is done by the (usually) + * synthesized mu_run_suites() function, which can be generated using the + * mkmutest script (or written manually). + * + * Please, read the README file for more details. + */ #include "mutest.h" /* MU_* constants, mu_print() */ #include /* printf(), fprintf() */ @@ -13,6 +27,7 @@ const char* mutest_suite_name; int mutest_failed_suites; int mutest_passed_suites; +int mutest_skipped_suites; int mutest_suite_failed; @@ -60,14 +75,15 @@ int main(int argc, char* argv[]) { mu_print(MU_SUMMARY, "\n" "Tests done:\n" - "\t%d test suite(s) passed, %d failed.\n" + "\t%d test suite(s) passed, %d failed, %d skipped.\n" "\t%d test case(s) passed, %d failed.\n" "\t%d check(s) passed, %d failed.\n" "\n", mutest_passed_suites, mutest_failed_suites, + mutest_skipped_suites, mutest_passed_cases, mutest_failed_cases, mutest_passed_checks, mutest_failed_checks); - return mutest_failed_checks ? 1 : 0; + return (mutest_failed_suites + mutest_skipped_suites) ? 1 : 0; }