make sure passing a null state to append_test_log() doesn't crash it
This commit is contained in:
parent
2a092d1050
commit
bcfd584608
|
@ -44,6 +44,7 @@ static void append_to_existing(TestState *);
|
|||
static void missing_last(TestState *);
|
||||
static void missing_first(TestState *);
|
||||
static void null_message(TestState *);
|
||||
decl_test(null_state);
|
||||
static void chk_last(TestState *, LogData *, const char *);
|
||||
static void mk_log_data(LogData *);
|
||||
|
||||
|
@ -66,6 +67,7 @@ test_append_test_log(TestState *s)
|
|||
missing_last(s);
|
||||
missing_first(s);
|
||||
null_message(s);
|
||||
run_test(s, null_state);
|
||||
}
|
||||
|
||||
// Local Functions
|
||||
|
@ -210,6 +212,12 @@ null_message(TestState *s)
|
|||
);
|
||||
}
|
||||
|
||||
decl_test(null_state)
|
||||
{
|
||||
append_test_log(0, "foo");
|
||||
return test_success;
|
||||
}
|
||||
|
||||
static void
|
||||
chk_last(TestState *s, LogData *ld, const char *context)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user