diff --git a/9unit.c b/9unit.c index cf815bf..9bc4d12 100644 --- a/9unit.c +++ b/9unit.c @@ -22,4 +22,16 @@ #include "9unit.h" +void +initTestState(TestState *s) +{ + if(s) + { + s->run = 0; + s->success = 0; + s->failure = 0; + s->postponed = 0; + } +} + //jl diff --git a/9unit.h b/9unit.h index da8aedf..616df9e 100644 --- a/9unit.h +++ b/9unit.h @@ -34,4 +34,6 @@ typedef enum TestResult test_pending } TestResult; +extern void initTestState(TestState *); + //jl