aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-irc-helper.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-28 00:10:41 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-03 20:25:01 +0800
commit85268449651286df02e6da607abd98828fd68a6a (patch)
tree91030f116511b107fa94493352d75b3f90d41e5d /tests/check-irc-helper.c
parent2a974fc78e833d232a6203d5a807b0ee5efb396a (diff)
downloadgsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar.gz
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar.bz2
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar.lz
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar.xz
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.tar.zst
gsoc2013-empathy-85268449651286df02e6da607abd98828fd68a6a.zip
port check-empathy-irc-server.c to GTest
Diffstat (limited to 'tests/check-irc-helper.c')
-rw-r--r--tests/check-irc-helper.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/check-irc-helper.c b/tests/check-irc-helper.c
index 477b134c2..1a2832a7b 100644
--- a/tests/check-irc-helper.c
+++ b/tests/check-irc-helper.c
@@ -10,7 +10,7 @@ check_server (EmpathyIrcServer *server,
guint port;
gboolean ssl;
- fail_if (server == NULL);
+ g_assert (server != NULL);
g_object_get (server,
"address", &address,
@@ -18,9 +18,9 @@ check_server (EmpathyIrcServer *server,
"ssl", &ssl,
NULL);
- fail_if (address == NULL || strcmp (address, _address) != 0);
- fail_if (port != _port);
- fail_if (ssl != _ssl);
+ g_assert (address != NULL && strcmp (address, _address) == 0);
+ g_assert (port == _port);
+ g_assert (ssl == _ssl);
g_free (address);
}
@@ -36,18 +36,18 @@ check_network (EmpathyIrcNetwork *network,
GSList *servers, *l;
guint i;
- fail_if (network == NULL);
+ g_assert (network != NULL);
g_object_get (network,
"name", &name,
"charset", &charset,
NULL);
- fail_if (name == NULL || strcmp (name, _name) != 0);
- fail_if (charset == NULL || strcmp (charset, _charset) != 0);
+ g_assert (name != NULL && strcmp (name, _name) == 0);
+ g_assert (charset != NULL && strcmp (charset, _charset) == 0);
servers = empathy_irc_network_get_servers (network);
- fail_if (g_slist_length (servers) != nb_servers);
+ g_assert (g_slist_length (servers) == nb_servers);
/* Is that the right servers ? */
for (l = servers, i = 0; l != NULL; l = g_slist_next (l), i++)
@@ -65,10 +65,10 @@ check_network (EmpathyIrcNetwork *network,
"ssl", &ssl,
NULL);
- fail_if (address == NULL || strcmp (address, _servers[i].address)
- != 0);
- fail_if (port != _servers[i].port);
- fail_if (ssl != _servers[i].ssl);
+ g_assert (address != NULL && strcmp (address, _servers[i].address)
+ == 0);
+ g_assert (port == _servers[i].port);
+ g_assert (ssl == _servers[i].ssl);
g_free (address);
}