From 01e01243dd3ea1a4b3a4b312f083aa28cac6a561 Mon Sep 17 00:00:00 2001 From: jlamothe Date: Sun, 19 Nov 2023 21:44:43 +0000 Subject: [PATCH] cleaned up comments --- 9unit.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/9unit.h b/9unit.h index 3cfda13..a8f4056 100644 --- a/9unit.h +++ b/9unit.h @@ -21,15 +21,14 @@ // Types & Structs -// Tracks information about the tests being run. -typedef struct TestState TestState; - -// Defines a log entry in a TestState struct -typedef struct TestLogEntry TestLogEntry; - // The following structures will typically be maintained by the // testing framework. You shouldn't need to concern yourself with // them. + +typedef struct TestState TestState; +typedef struct TestLogEntry TestLogEntry; + +// Tracks information about the tests being run. struct TestState { int run; // number of tests run @@ -45,6 +44,7 @@ struct TestState void (*report)(const char *); // prints a string immediately }; +// Defines a log entry in a TestState struct struct TestLogEntry { char *text; // the entry text @@ -74,11 +74,9 @@ extern void run_test_with( void * // the value to pass in ); -// Runs multiple tests, displaying a summary at the end -extern void run_tests( - // runs the tests and updates a provided TestState - void (*)(TestState *) -); +// Creates an initial TestState, passes it to the supplied function, +// and displays the resulting log and summary +extern void run_tests(void (*)(TestState *)); // Adds an entry to the log that is displayed after the tests have // completed