summaryrefslogtreecommitdiffstats
path: root/tests/list.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-07-07 13:19:13 -0400
committerTavian Barnes <tavianator@tavianator.com>2025-07-26 14:19:52 -0400
commitb4e3696101b049815dac8459b2b9cb18213b489e (patch)
treed4f36e7efb7a169f9c52fea47a4286ee121828b0 /tests/list.c
parentb01a0cc5d6f1557440f421e4cf86fea97a3442e2 (diff)
downloadbfs-b4e3696101b049815dac8459b2b9cb18213b489e.tar.xz
list: Simplify macros with C23 features
We can avoid the MACRO_((list), __VA_ARGS__, ) dance since the comma is no longer required. typeof() also comes in handy.
Diffstat (limited to 'tests/list.c')
-rw-r--r--tests/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/list.c b/tests/list.c
index 5d0403f..1d70f33 100644
--- a/tests/list.c
+++ b/tests/list.c
@@ -96,4 +96,7 @@ void 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)));
+
+ // Check the return type of SLIST_POP()
+ bfs_check(SLIST_POP(&l1)->n == 10);
}