From b9c7fa84be75d6752b5d2516908d07f972808325 Mon Sep 17 00:00:00 2001 From: jlamothe Date: Mon, 6 Nov 2023 19:26:55 +0000 Subject: [PATCH] created initTestState --- 9unit.c | 12 ++++++++++++ 9unit.h | 2 ++ 2 files changed, 14 insertions(+) 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