diff --git a/include/ft/test.h b/include/ft/test.h index 1a92593..1467bda 100644 --- a/include/ft/test.h +++ b/include/ft/test.h @@ -54,6 +54,9 @@ int ft_assert(ft_test *test, int expression, (expression)); \ } +/* ft_skip(): Skip some tests */ +void ft_skip(ft_test *test, int amount); + /* ft_log(): Write some data in a test's log */ __attribute__((format(printf, 2, 3))) void ft_log(ft_test *test, char const *format, ...); diff --git a/src/test.c b/src/test.c index 36338db..a4c0d49 100644 --- a/src/test.c +++ b/src/test.c @@ -39,6 +39,11 @@ int ft_assert(ft_test *test, int expression, char const *file, int line, return expression; } +void ft_skip(ft_test *test, int count) +{ + test->skipped += count; +} + void ft_log(ft_test *test, char const *format, ...) { va_list args1, args2; diff --git a/src/widgets/fbar.c b/src/widgets/fbar.c index 256694c..0974af6 100644 --- a/src/widgets/fbar.c +++ b/src/widgets/fbar.c @@ -152,9 +152,9 @@ static void fbar_poly_render(void *b0, int x, int y) guaranteed = (px.done > guaranteeable_min); if(guaranteed) px.done -= guaranteeable_min; - px.passed = (st.passed * px.done) / assertions; px.skipped = (st.skipped * px.done) / assertions; - px.failed = px.done - px.passed - px.skipped; + px.failed = (st.failed * px.done) / assertions; + px.passed = px.done - px.skipped - px.failed; if(guaranteed) { px.passed += min_passed; px.skipped += min_skipped;