re-implemented test using new convenience functions

This commit is contained in:
jlamothe
2023-11-21 05:12:41 +00:00
7 changed files with 261 additions and 706 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, "run_test()", test_run_test);
test_context(s, "append_test_log()", test_append_test_log);
test_context(s, "test_context()", test_test_context);
}