diff --git a/test/run-test.c b/test/run-test.c index 1572ed9..9bbbf45 100644 --- a/test/run-test.c +++ b/test/run-test.c @@ -31,7 +31,6 @@ static void test_pass(TestState *); static void test_fail(TestState *); static void test_pend(TestState *); -static void mk_sample_state(TestState *); decl_test(always_passes); decl_test(always_fails); decl_test(always_pends); @@ -127,16 +126,6 @@ test_pend(TestState *s) ); } -static void -mk_sample_state(TestState *s) -{ - memset(s, 0, sizeof(TestState)); - s->passed = 1; - s->failed = 2; - s->pending = 3; - s->run = 6; -} - decl_test(always_passes) { return test_success; diff --git a/test/util.c b/test/util.c index 871fab8..85b77b0 100644 --- a/test/util.c +++ b/test/util.c @@ -131,6 +131,16 @@ decl_test(compare_ptrs_test); // Public Functions +void +mk_sample_state(TestState *s) +{ + memset(s, 0, sizeof(TestState)); + s->passed = 1; + s->failed = 2; + s->pending = 3; + s->run = 6; +} + void compare_states( TestState *s, diff --git a/test/util.h b/test/util.h index 434f4b8..eaca9f9 100644 --- a/test/util.h +++ b/test/util.h @@ -24,6 +24,9 @@ #define decl_test(n) static TestResult n(TestState *) #define def_test(n, s) static TestResult n(TestState *s) +// initializes a sample TestState value +void mk_sample_state(TestState *); + // compares two TestState values extern void compare_states( TestState *, // the state we are *actually* updating ;)