WIP: re-writing tests

This commit is contained in:
jlamothe
2023-11-20 04:50:42 +00:00
parent 24ed9060ba
commit 8828a8ab17
4 changed files with 92 additions and 57 deletions

View File

@@ -48,14 +48,13 @@ tests(TestState *s)
{
if (!s) exits("ERROR: no TestState");
// Make a copy of the initial TestState and store it
// Make a copy of the initial TestState
TestState scpy;
memcpy(&scpy, s, sizeof(TestState));
s->ptr = &scpy;
test_context(s, "initial state", test_initial_state);
test_run_test(s);
test_append_test_log(s);
test_context_with(s, "initial state", test_initial_state, &scpy);
test_context(s, "test_run()", test_run_test);
test_context(s, "append_test_log()", test_append_test_log);
test_context(s, "test_context()", test_test_context);
}