Return bad error code when tests fail
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include <string.h>
|
||||
|
||||
void test(const char *name, css_node_t *style, css_node_t *expected_layout);
|
||||
void tests_finished(void);
|
||||
int tests_finished(void);
|
||||
css_dim_t measure(void *context, float width);
|
||||
void init_css_node_children(css_node_t *node, int children_count);
|
||||
css_node_t *new_test_css_node(void);
|
||||
|
@@ -3166,5 +3166,5 @@ int main()
|
||||
test("should layout with absolutely position bottom", root_node, root_layout);
|
||||
}
|
||||
/** END_GENERATED **/
|
||||
tests_finished();
|
||||
return tests_finished();
|
||||
}
|
||||
|
Reference in New Issue
Block a user