created overridable report() function to be used in place of print()

This commit is contained in:
jlamothe
2023-11-14 23:53:43 +00:00
parent 85a6d49b38
commit cead3f67d0
5 changed files with 60 additions and 12 deletions

View File

@@ -39,6 +39,7 @@ decl_test(initial_ptr);
decl_test(initial_context);
decl_test(initial_full_context);
decl_test(initial_depth);
decl_test(initial_report);
// Public Functions
@@ -56,6 +57,7 @@ test_initial_state(TestState *s)
run_test(s, initial_context);
run_test(s, initial_full_context);
run_test(s, initial_depth);
run_test(s, initial_report);
}
// Internal Functions
@@ -150,4 +152,13 @@ def_test(initial_depth, s)
return test_failure;
}
def_test(initial_report, s)
{
TestState *scpy = s->ptr;
print("\treport()\n");
if (scpy->report != 0) return test_success;
append_test_log(s, "initial report was null");
return test_failure;
}
//jl