diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-07-07 13:19:13 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-07-26 14:19:52 -0400 |
commit | b4e3696101b049815dac8459b2b9cb18213b489e (patch) | |
tree | d4f36e7efb7a169f9c52fea47a4286ee121828b0 /tests/list.c | |
parent | b01a0cc5d6f1557440f421e4cf86fea97a3442e2 (diff) | |
download | bfs-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.c | 3 |
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); } |