[Pkg-telepathy-commits] [telepathy-glib-1] 32/212: tests: expect GDBus and TpProxy errors, not dbus-glib errors

Simon McVittie smcv at debian.org
Wed May 14 12:08:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-glib-1.

commit fe5c49658786a86ed01451458dfd91cbc885d47f
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Mar 11 19:00:46 2014 +0000

    tests: expect GDBus and TpProxy errors, not dbus-glib errors
---
 tests/dbus/base-client.c          | 4 ++--
 tests/dbus/channel-introspect.c   | 2 +-
 tests/dbus/cm.c                   | 2 +-
 tests/dbus/contacts.c             | 4 ++--
 tests/dbus/debug-client.c         | 2 +-
 tests/dbus/disconnection.c        | 3 +--
 tests/dbus/example-no-protocols.c | 4 ++--
 7 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c
index 6b5b727..0a93fdb 100644
--- a/tests/dbus/base-client.c
+++ b/tests/dbus/base-client.c
@@ -346,7 +346,7 @@ test_register (Test *test,
       TP_IFACE_CLIENT, get_client_prop_cb, test, NULL, NULL);
   g_main_loop_run (test->mainloop);
 
-  g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN);
+  g_assert_error (test->error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN);
   g_error_free (test->error);
   test->error = NULL;
 
@@ -368,7 +368,7 @@ test_register (Test *test,
       TP_IFACE_CLIENT, get_client_prop_cb, test, NULL, NULL);
   g_main_loop_run (test->mainloop);
 
-  g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN);
+  g_assert_error (test->error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN);
   g_error_free (test->error);
   test->error = NULL;
 
diff --git a/tests/dbus/channel-introspect.c b/tests/dbus/channel-introspect.c
index dfefb24..c3af63c 100644
--- a/tests/dbus/channel-introspect.c
+++ b/tests/dbus/channel-introspect.c
@@ -303,7 +303,7 @@ main (int argc,
   g_assert_no_error (error);
 
   tp_tests_proxy_run_until_prepared_or_failed (chan, NULL, &error);
-  g_assert_error (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
+  g_assert_error (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
   g_error_free (error);
   error = NULL;
 
diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c
index 456615c..9527a9a 100644
--- a/tests/dbus/cm.c
+++ b/tests/dbus/cm.c
@@ -820,7 +820,7 @@ test_nothing_ready (Test *test,
 
   tp_tests_proxy_run_until_prepared_or_failed (test->cm, NULL,
       &test->error);
-  g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN);
+  g_assert_error (test->error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN);
 
   g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
       "nonexistent_cm");
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 3261858..6d11897 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -663,7 +663,7 @@ make_the_connection_disappear (Fixture *f)
   /* check that that worked */
   ok = tp_cli_connection_run_connect (f->client_conn, -1,
       &error, NULL);
-  g_assert_error (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
+  g_assert_error (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
   g_assert (!ok);
   g_clear_error (&error);
 }
@@ -1930,7 +1930,7 @@ test_superfluous_attributes (Fixture *f,
       upgrade_cb, &f->result);
   g_main_loop_run (f->result.loop);
   /* Not gonna make any particular assertions about what the error is. */
-  g_assert_error (f->result.error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
+  g_assert_error (f->result.error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
 
   put_the_connection_back (f);
   reset_result (&f->result);
diff --git a/tests/dbus/debug-client.c b/tests/dbus/debug-client.c
index ab5ce59..30205ed 100644
--- a/tests/dbus/debug-client.c
+++ b/tests/dbus/debug-client.c
@@ -305,7 +305,7 @@ test_get_messages_failed (Test *test,
 
   test->wait = 1;
   g_main_loop_run (test->mainloop);
-  g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
+  g_assert_error (test->error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
 
   g_assert (test->messages == NULL);
 }
diff --git a/tests/dbus/disconnection.c b/tests/dbus/disconnection.c
index 143ce85..a5ad8f6 100644
--- a/tests/dbus/disconnection.c
+++ b/tests/dbus/disconnection.c
@@ -360,8 +360,7 @@ test (Fixture *f,
   tp_cli_dbus_properties_connect_to_properties_changed (f->proxies[TEST_F],
       unwanted_signal_cb, &freed, set_freed, NULL, &error_out);
   MYASSERT (freed, "");
-  MYASSERT (error_out != NULL, "");
-  MYASSERT (error_out->code == DBUS_GERROR_NAME_HAS_NO_OWNER, "");
+  g_assert_error (error_out, TP_DBUS_ERRORS, TP_DBUS_ERROR_NAME_OWNER_LOST);
   g_error_free (error_out);
   error_out = NULL;
 
diff --git a/tests/dbus/example-no-protocols.c b/tests/dbus/example-no-protocols.c
index 21a155f..9adac2a 100644
--- a/tests/dbus/example-no-protocols.c
+++ b/tests/dbus/example-no-protocols.c
@@ -141,8 +141,8 @@ test (Fixture *f,
   tp_tests_proxy_run_until_prepared_or_failed (early_cm, NULL, &error);
   g_assert (error != NULL);
   g_assert (tp_proxy_get_invalidated (early_cm) == NULL);
-  g_assert_cmpuint (error->domain, ==, DBUS_GERROR);
-  g_assert_cmpint (error->code, ==, DBUS_GERROR_SERVICE_UNKNOWN);
+  g_assert_cmpuint (error->domain, ==, G_DBUS_ERROR);
+  g_assert_cmpint (error->code, ==, G_DBUS_ERROR_SERVICE_UNKNOWN);
   g_clear_error (&error);
 
   if (!saw_exited)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib-1.git



More information about the Pkg-telepathy-commits mailing list