[Telepathy-commits] [telepathy-salut/master] tests/check-gibber-listener.c: Use g_error_matches instead of error->code
Alban Crequy
alban.crequy at collabora.co.uk
Mon Nov 3 08:44:53 PST 2008
---
tests/check-gibber-listener.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/check-gibber-listener.c b/tests/check-gibber-listener.c
index b5e3965..75c4eb3 100644
--- a/tests/check-gibber-listener.c
+++ b/tests/check-gibber-listener.c
@@ -95,7 +95,8 @@ START_TEST (test_tcp_listen)
if (gibber_listener_listen_tcp (listener, port, &error))
break;
- fail_if (error->code != GIBBER_LISTENER_ERROR_ADDRESS_IN_USE);
+ fail_if (!g_error_matches (error, GIBBER_LISTENER_ERROR,
+ GIBBER_LISTENER_ERROR_ADDRESS_IN_USE));
g_error_free (error);
error = NULL;
}
@@ -105,7 +106,8 @@ START_TEST (test_tcp_listen)
listener2 = gibber_listener_new ();
fail_if (listener2 == NULL);
fail_if (gibber_listener_listen_tcp (listener2, port, &error));
- fail_if (error->code != GIBBER_LISTENER_ERROR_ADDRESS_IN_USE);
+ fail_if (!g_error_matches (error, GIBBER_LISTENER_ERROR,
+ GIBBER_LISTENER_ERROR_ADDRESS_IN_USE));
g_object_unref (listener2);
g_error_free (error);
error = NULL;
--
1.5.6.5
More information about the Telepathy-commits
mailing list