+/* Tests llx_find(). */
+static void
+test_find (void)
+{
+ const int max_elems = 8;
+
+ int cnt;
+
+ for (cnt = 0; cnt <= max_elems; cnt++)
+ {
+ struct llx_list list;
+ struct element **elems;
+ struct llx **elemp;
+ int *values;
+
+ int i;
+
+ allocate_ascending (cnt, &list, &elems, &elemp, &values);
+
+ for (i = 0; i < cnt; i++)
+ check (llx_find (llx_head (&list), llx_null (&list), elems[i])
+ == elemp[i]);
+ check (llx_find (llx_head (&list), llx_null (&list), NULL) == NULL);
+
+ free_elements (cnt, &list, elems, elemp, values);
+ }
+}
+