"english",
};
+static char *sorting[] = {
+ "1",
+ "5",
+ "0",
+ "3",
+ "9",
+};
+
+static char *sorted[] = {
+ "0",
+ "1",
+ "3",
+ "5",
+ "9",
+};
+
+#define ALEN(x) (sizeof(x)/sizeof(x[0]))
+
int main(int argc, char **argv)
{
struct list *l;
printf("Multiple insertion at end ordering list test pass\n");
fflush(stdout);
+ l = list_new();
+ for (i = 0; i < ALEN(sorting); i++) {
+ list_insert_ordered(&l, strdup(sorting[i]),
+ (sort_function_t *) strcmp);
+ }
+ for (i = 0; i < ALEN(sorted); i++) {
+ if (strcmp(list_get(l, i), sorted[i]))
+ return 1;
+ }
+ list_free(l, free);
+ printf("Ordered insertion list test pass\n");
+ fflush(stdout);
+
return 0;
}