summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-12-08 13:05:13 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-12-08 13:05:13 +0000
commit38a13d0e84d6d3ede38e54b3f6c3535adfe3ccd5 (patch)
tree900b522273e07a749cce2335d6d642809bfe2211
parentc52981a15aa827036856f4963096d59ab3c91a6b (diff)
downloadtelepathy-glib-38a13d0e84d6d3ede38e54b3f6c3535adfe3ccd5.tar.gz
contacts test: use GTester
-rw-r--r--tests/dbus/contacts.c62
1 files changed, 18 insertions, 44 deletions
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 986235af1..9d12a6cb0 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -1921,57 +1921,31 @@ int
main (int argc,
char **argv)
{
- Fixture f = { NULL };
-
- /* Setup */
-
g_type_init ();
tp_debug_set_flags ("all");
-
- setup (&f, NULL);
- test_by_handle (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_no_features (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_features (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_upgrade (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_by_id (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_avatar_requirements (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_avatar_data (&f, NULL);
- teardown (&f, NULL);
-
- setup (&f, NULL);
- test_contact_info (&f, NULL);
- teardown (&f, NULL);
-
+ g_set_prgname ("contacts");
+ g_test_init (&argc, &argv, NULL);
+ g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
+
+#define ADD(x) \
+ g_test_add ("/contacts/" #x, Fixture, NULL, setup, test_ ## x, teardown)
+
+ ADD (by_handle);
+ ADD (no_features);
+ ADD (features);
+ ADD (upgrade);
+ ADD (by_id);
+ ADD (avatar_requirements);
+ ADD (avatar_data);
+ ADD (contact_info);
/* test if TpContact fallbacks to connection's capabilities if
* ContactCapabilities is not implemented. */
- setup (&f, NULL);
- test_capabilities_without_contact_caps (&f, NULL);
- teardown (&f, NULL);
+ ADD (capabilities_without_contact_caps);
/* test if TP_CONTACT_FEATURE_CAPABILITIES is prepared but with
* an empty set of capabilities if the connection doesn't support
* ContactCapabilities and Requests. */
- setup (&f, NULL);
- test_prepare_contact_caps_without_request (&f, NULL);
- teardown (&f, NULL);
+ ADD (prepare_contact_caps_without_request);
- return 0;
+ return g_test_run ();
}