define and start using single_text_context()

This commit is contained in:
jlamothe
2023-11-16 00:52:01 +00:00
parent ef00063ba3
commit 0ad79ea3b0
4 changed files with 57 additions and 23 deletions

13
9unit.h
View File

@@ -19,6 +19,8 @@
*/
// Types & Structs
// Tracks information about the tests being run.
typedef struct TestState TestState;
@@ -57,6 +59,8 @@ typedef enum TestResult
test_pending // the test is pending
} TestResult;
// Functions
// Runs a single test
extern void run_test(
TestState *, // the TestState data
@@ -81,6 +85,13 @@ extern void test_context(
TestState *, // the current state
const char *, // a description of the context
void (*)(TestState *) // the actual test
);
);
// Runs a single test with a context label
extern void single_test_context(
TestState *, // the current state
const char *, // a description of the context
TestResult (*)(TestState *) // the actual test
);
//jl