~ubuntu-branches/ubuntu/wily/telepathy-glib/wily

« back to all changes in this revision

Viewing changes to tests/dbus/account-manager.c

Tags: upstream-0.9.0
ImportĀ upstreamĀ versionĀ 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
  test->am = tp_account_manager_new (test->dbus);
57
57
}
58
58
 
 
59
static void
 
60
test_dup (Test *test,
 
61
          gconstpointer data G_GNUC_UNUSED)
 
62
{
 
63
  TpAccountManager *one, *two;
 
64
  TpDBusDaemon *dbus_one, *dbus_two;
 
65
 
 
66
  one = tp_account_manager_dup ();
 
67
  two = tp_account_manager_dup ();
 
68
 
 
69
  g_assert (one == two);
 
70
 
 
71
  dbus_one = tp_dbus_daemon_dup (NULL);
 
72
  dbus_two = tp_proxy_get_dbus_daemon (one);
 
73
 
 
74
  g_assert (dbus_one == dbus_two);
 
75
 
 
76
  g_object_unref (dbus_one);
 
77
  g_object_unref (two);
 
78
  g_object_unref (one);
 
79
}
 
80
 
59
81
int
60
82
main (int argc,
61
83
      char **argv)
64
86
  g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
65
87
 
66
88
  g_test_add ("/am/new", Test, NULL, setup, test_new, teardown);
 
89
  g_test_add ("/am/dup", Test, NULL, setup, test_dup, teardown);
67
90
 
68
91
  return g_test_run ();
69
92
}