Return bad error code when tests fail

This commit is contained in:
Alex Kotliarskyi
2014-09-26 20:08:37 -07:00
parent 02dbe44057
commit ba4cf35804
3 changed files with 5 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ void test(const char *name, css_node_t *style, css_node_t *expected_layout) {
}
}
void tests_finished() {
int tests_finished() {
failed_test_t *failed_test = failed_test_head;
printf("\n");
@@ -121,8 +121,10 @@ void tests_finished() {
if (tests_failed > 0) {
printf("TESTS FAILED: %d\n", tests_failed);
return 1;
} else {
printf("ALL TESTS PASSED\n");
return 0;
}
}