Fail unit test if at least one test fails

This commit is contained in:
Sergey Lyubka 2013-08-01 12:01:57 +01:00
parent f03345b2a9
commit 1af51985dd

2
slre.c
View File

@ -463,6 +463,6 @@ int main(void) {
static_failed_tests > 0 ? "FAILED" : "PASSED", static_failed_tests > 0 ? "FAILED" : "PASSED",
static_total_tests, static_failed_tests); static_total_tests, static_failed_tests);
return EXIT_SUCCESS; return static_failed_tests == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
} }
#endif /* SLRE_UNIT_TEST */ #endif /* SLRE_UNIT_TEST */