forked from Lephenixnoir/FxLibcTest
allow tests to be skipped
This commit is contained in:
parent
fec8637312
commit
ec7626d789
|
@ -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, ...);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue