added context info to TestState

This commit is contained in:
jlamothe
2023-11-14 23:08:19 +00:00
parent 1d306f32c0
commit 85a6d49b38
4 changed files with 116 additions and 14 deletions

View File

@@ -36,6 +36,9 @@ decl_test(initial_pend_count);
decl_test(initial_first_log);
decl_test(initial_last_log);
decl_test(initial_ptr);
decl_test(initial_context);
decl_test(initial_full_context);
decl_test(initial_depth);
// Public Functions
@@ -50,6 +53,9 @@ test_initial_state(TestState *s)
run_test(s, initial_first_log);
run_test(s, initial_last_log);
run_test(s, initial_ptr);
run_test(s, initial_context);
run_test(s, initial_full_context);
run_test(s, initial_depth);
}
// Internal Functions
@@ -117,4 +123,31 @@ def_test(initial_ptr, s)
return test_failure;
}
def_test(initial_context, s)
{
TestState *scpy = s->ptr;
print("\tcontext\n");
if (scpy->context == 0) return test_success;
append_test_log(s, "initial context was not null");
return test_failure;
}
def_test(initial_full_context, s)
{
TestState *scpy = s->ptr;
print("\tfull_context\n");
if (scpy->context == 0) return test_success;
append_test_log(s, "initial full_context was not null");
return test_failure;
}
def_test(initial_depth, s)
{
TestState *scpy = s->ptr;
print("\tdepth\n");
if (scpy->depth == 0) return test_success;
append_test_log(s, "initial depth was not zero");
return test_failure;
}
//jl