2 #include "test-irc-helper.h"
5 check_server (TpawIrcServer
*server
,
14 g_assert (server
!= NULL
);
22 g_assert (address
!= NULL
&& strcmp (address
, _address
) == 0);
23 g_assert (port
== _port
);
24 g_assert (ssl
== _ssl
);
30 check_network (TpawIrcNetwork
*network
,
32 const gchar
*_charset
,
33 struct server_t
*_servers
,
36 gchar
*name
, *charset
;
40 g_assert (network
!= NULL
);
42 g_object_get (network
,
47 g_assert (name
!= NULL
&& strcmp (name
, _name
) == 0);
48 g_assert (charset
!= NULL
&& strcmp (charset
, _charset
) == 0);
50 servers
= tpaw_irc_network_get_servers (network
);
51 g_assert (g_slist_length (servers
) == nb_servers
);
53 /* Is that the right servers ? */
54 for (l
= servers
, i
= 0; l
!= NULL
; l
= g_slist_next (l
), i
++)
56 TpawIrcServer
*server
;
69 g_assert (address
!= NULL
&& strcmp (address
, _servers
[i
].address
)
71 g_assert (port
== _servers
[i
].port
);
72 g_assert (ssl
== _servers
[i
].ssl
);
77 g_slist_foreach (servers
, (GFunc
) g_object_unref
, NULL
);
78 g_slist_free (servers
);