diff options
| author | Blake Romero <blake@blkrom.com> | 2025-10-10 17:46:14 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-10-10 17:46:14 +0100 |
| commit | d86d3fee70705ba700695c95f018eda084838bf5 (patch) | |
| tree | 2280e7d167e08d8dc06a06ede41713cae2179f0c /tests/lltests.c | |
| parent | 9aa1e19e264b7490cf864058aa17f7e9acb41d6d (diff) | |
Rename & update list tests
Diffstat (limited to 'tests/lltests.c')
| -rw-r--r-- | tests/lltests.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/lltests.c b/tests/lltests.c deleted file mode 100644 index a2c8195..0000000 --- a/tests/lltests.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <criterion/criterion.h> -#include "../src/ll.h" - -Node* head = NULL; - -// Run on every test -void setup() { - head = llnode(7); -} - -// Run after every test -void teardown() { - llfree(&head); -} - -// Configure test suite -TestSuite(lltest, .init=setup, .fini=teardown); - -// Node -Test(lltest,llnode) { - int val = 17; - head = llnode(val); - cr_expect(head != NULL); - cr_expect(head->value == val); -} - -// Length -Test(lltest,lllength) { - cr_expect(lllength(head) == 1); -} - -// Push -Test(lltest,llpush) { - int val = 12; - llpush(&head,val); - cr_expect(head->next != NULL); - cr_expect(head->value == val); -} - -// Pop -Test(lltest,llpop) { - int val = llpop(&head); - cr_expect(val == 7); - cr_expect(lllength(head) == 0); -} - -// Append -// ... - -// Insert -// ... - -// Remove -// ... - -// Free -// ... |
