aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlake Romero <blake@blkrom.com>2024-09-18 13:41:54 +0100
committerBlake Romero <blake@blkrom.com>2024-10-30 10:13:26 +0000
commit371820e703c5a8283397b49680f8ea4b904a0384 (patch)
treec8413decf8bb91487a830f898e5b868670f53683
parent077ee9c753d2d1dc1a7fc4ca9fcadf9131e3e81e (diff)
Update llnode & llpush tests
-rw-r--r--tests/lltests.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lltests.c b/tests/lltests.c
index 265a276..212178c 100644
--- a/tests/lltests.c
+++ b/tests/lltests.c
@@ -17,14 +17,16 @@ TestSuite(lltest, .init=setup, .fini=teardown);
Test(lltest, llnode) {
int val = 17;
head = llnode(val);
- cr_expect(head != NULL && head->value == val);
+ cr_expect(head != NULL);
+ cr_expect(head->value == val);
}
// Push
Test(lltest,llpush) {
int val = 12;
llpush(&head,val);
- cr_expect(head->next->value == val);
+ cr_expect(head->next != NULL);
+ cr_expect(head->value == val);
}
// Pop