8 sort (gconstpointer a, gconstpointer b, gpointer user_data)
10 return *(guint32*)a < *(guint32*)b ? -1 : 1;
18 for (i = 0; i < SIZE; i++)
19 array[i] = g_random_int ();
21 g_qsort_with_data (array, SIZE, sizeof (guint32), sort, NULL);
23 for (i = 0; i < SIZE - 1; i++)
24 g_assert (array[i] <= array[i+1]);
26 /* 0 elemenents is a valid case */
27 g_qsort_with_data (array, 0, sizeof (guint32), sort, NULL);