summaryrefslogtreecommitdiff
path: root/src/test/test-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-list.c')
-rw-r--r--src/test/test-list.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/test-list.c b/src/test/test-list.c
index e9d47f0503..399ec8e58e 100644
--- a/src/test/test-list.c
+++ b/src/test/test-list.c
@@ -38,6 +38,13 @@ int main(int argc, const char *argv[]) {
LIST_PREPEND(item, head, &items[i]);
}
+ i = 0;
+ LIST_FOREACH_OTHERS(item, cursor, &items[2]) {
+ i++;
+ assert_se(cursor != &items[2]);
+ }
+ assert_se(i == ELEMENTSOF(items)-1);
+
assert_se(!LIST_JUST_US(item, head));
assert_se(items[0].item_next == NULL);
@@ -125,7 +132,7 @@ int main(int argc, const char *argv[]) {
assert_se(items[3].item_prev == &items[2]);
for (i = 0; i < ELEMENTSOF(items); i++)
- LIST_REMOVE(item, head, &items[i]);
+ LIST_REMOVE(item, head, &items[i]);
assert_se(head == NULL);