ensure first_log isn't null after append

This commit is contained in:
jlamothe
2023-11-11 21:36:05 +00:00
parent c0f28d41b0
commit 9f4a51d8c7
3 changed files with 52 additions and 5 deletions

View File

@@ -42,12 +42,21 @@ test_append_test_log(TestState *s)
// Local Functions
static void
append_to_empty(TestState *)
append_to_empty(TestState *s)
{
TestState test;
print("\tappend to empty\n");
mk_sample_state(&test);
append_test_log(&test, "foo");
// first_log shouldn't be null
print("\t\tfirst_log\n");
chk_ptr_ne(
s,
"ERROR: append_test_log(): append to empty: first_log:",
test.first_log,
0
);
}
//jl