1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include <stdlib.h> #include <string.h> #include <libebook/e-contact.h> #define TEST_ID "test-uid" gint main (gint argc, gchar **argv) { EContact *contact; g_type_init (); contact = e_contact_new (); e_contact_set (contact, E_CONTACT_UID, TEST_ID); if (!strcmp (e_contact_get_const (contact, E_CONTACT_UID), TEST_ID)) printf ("passed\n"); else printf ("failed\n"); return 0; }