/*
- * "$Id: testarray.c 4903 2006-01-10 20:02:46Z mike $"
+ * "$Id: testarray.c 5258 2006-03-09 15:40:56Z mike $"
*
* Array test program for the Common UNIX Printing System (CUPS).
*
cups_dir_t *dir; /* Current directory */
cups_dentry_t *dent; /* Directory entry */
char *saved[32]; /* Saved entries */
+ void *data; /* User data for arrays */
/*
fputs("cupsArrayNew: ", stdout);
- array = cupsArrayNew((cups_array_func_t)strcmp, NULL);
+ data = (void *)"testarray";
+ array = cupsArrayNew((cups_array_func_t)strcmp, data);
if (array)
puts("PASS");
status ++;
}
+ /*
+ * cupsArrayUserData()
+ */
+
+ fputs("cupsArrayUserData: ", stdout);
+ if (cupsArrayUserData(array) == data)
+ puts("PASS");
+ else
+ {
+ printf("FAIL (returned %p instead of %p!)\n", cupsArrayUserData(array),
+ data);
+ status ++;
+ }
+
/*
* cupsArrayAdd()
*/
/*
- * End of "$Id: testarray.c 4903 2006-01-10 20:02:46Z mike $".
+ * End of "$Id: testarray.c 5258 2006-03-09 15:40:56Z mike $".
*/