1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

History test uses assert_is_null

This commit is contained in:
James Booth 2012-03-02 01:59:36 +00:00
parent a05a65febe
commit 20c05b2f77

View File

@ -10,13 +10,13 @@ static void beforetest(void)
static void previous_returns_null_after_init(void) static void previous_returns_null_after_init(void)
{ {
char *prev = history_previous(); char *prev = history_previous();
assert_true(prev == NULL); assert_is_null(prev);
} }
static void next_returns_null_after_init(void) static void next_returns_null_after_init(void)
{ {
char *next = history_next(); char *next = history_next();
assert_true(next == NULL); assert_is_null(next);
} }
static void append_after_init_doesnt_fail(void) static void append_after_init_doesnt_fail(void)
@ -36,7 +36,7 @@ static void append_then_next_returns_null(void)
{ {
history_append("try append"); history_append("try append");
char *next = history_next(); char *next = history_next();
assert_true(next == NULL); assert_is_null(next);
} }
static void hits_null_at_top(void) static void hits_null_at_top(void)
@ -46,7 +46,7 @@ static void hits_null_at_top(void)
history_previous(); // cmd2 history_previous(); // cmd2
history_previous(); // cmd1 history_previous(); // cmd1
char *prev = history_previous(); char *prev = history_previous();
assert_true(prev == NULL); assert_is_null(prev);
} }
static void navigate_to_correct_item(void) static void navigate_to_correct_item(void)
@ -112,7 +112,7 @@ static void append_previous_item(void)
assert_string_equals(cmd1, "cmd1"); assert_string_equals(cmd1, "cmd1");
char *end = history_previous(); char *end = history_previous();
assert_true(end == NULL); assert_is_null(end);
} }
void register_history_tests(void) void register_history_tests(void)