--- a/test/test_list.c Sat Jan 22 18:49:06 2022 +0100 +++ b/test/test_list.c Sat Jan 22 19:04:32 2022 +0100 @@ -761,9 +761,9 @@ void test_hl_linked_list_iterator_impl(CxList list) { int i = 0; - for (CxIterator iter = cxListBegin(list); cxIteratorValid(&iter); cxIteratorNext(&iter)) { + CxIterator iter = cxListBegin(list); + cx_foreach(int, x, iter) { CU_ASSERT_EQUAL(iter.index, (size_t) (i + 1) / 2) - int *x = cxIteratorCurrent(&iter); CU_ASSERT_EQUAL(*x, i) if (i % 2 == 1) iter.remove = true; i++;