summaryrefslogtreecommitdiffstats
path: root/tests/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/list.c')
-rw-r--r--tests/list.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/list.c b/tests/list.c
index e14570f..5d0403f 100644
--- a/tests/list.c
+++ b/tests/list.c
@@ -1,10 +1,14 @@
// Copyright © Tavian Barnes <tavianator@tavianator.com>
// SPDX-License-Identifier: 0BSD
-#include "prelude.h"
#include "tests.h"
+
+#include "bfs.h"
+#include "diag.h"
#include "list.h"
+#include <stddef.h>
+
struct item {
int n;
struct item *next;
@@ -41,7 +45,7 @@ static bool check_list_items(struct list *list, int *array, size_t size) {
#define ARRAY(...) (int[]){ __VA_ARGS__ }, countof((int[]){ __VA_ARGS__ })
#define EMPTY() NULL, 0
-bool check_list(void) {
+void check_list(void) {
struct list l1;
SLIST_INIT(&l1);
bfs_verify(check_list_items(&l1, EMPTY()));
@@ -92,6 +96,4 @@ bool check_list(void) {
SLIST_APPEND(&l2, &i12);
SLIST_SPLICE(&l1, &l1.head->next, &l2);
bfs_verify(check_list_items(&l1, ARRAY(10, 11, 12, 15, 20)));
-
- return true;
}