| 7 | }; |
| 8 | |
| 9 | void list_tests() { |
| 10 | struct hc_list head; |
| 11 | hc_list_init(&head); |
| 12 | |
| 13 | const int n = 10; |
| 14 | struct list_item items[n]; |
| 15 | |
| 16 | for (int i = 0; i < n; i++) { |
| 17 | items[i].value = i; |
| 18 | hc_list_push_back(&head, &items[i].ls); |
| 19 | } |
| 20 | |
| 21 | int i = 0; |
| 22 | |
| 23 | hc_list_do(&head, il) { |
| 24 | assert(hc_baseof(il, struct list_item, ls)->value == i++); |
| 25 | } |
| 26 | } |
no test coverage detected