aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2013-04-03 19:14:33 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:04 +0800
commit42456ae2a2c758db70cc093679d05675293758cb (patch)
tree1e546367d2d44970c664f841b6834a2b8890fb8e /tests
parent75df7ae67b78f94dd69ac5c6ad079e3d360c8461 (diff)
downloadgsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.gz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.bz2
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.lz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.xz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.zst
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.zip
tp-account-widgets: Switch the symbols namespace to tpaw
The file names have been kept unchanged to keep the diff simple and will be updated later. This makes easier to spot where the account widgets still rely on libempathy. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'tests')
-rw-r--r--tests/empathy-irc-network-manager-test.c146
-rw-r--r--tests/empathy-irc-network-test.c66
-rw-r--r--tests/empathy-irc-server-test.c18
-rw-r--r--tests/test-irc-helper.c8
-rw-r--r--tests/test-irc-helper.h4
5 files changed, 121 insertions, 121 deletions
diff --git a/tests/empathy-irc-network-manager-test.c b/tests/empathy-irc-network-manager-test.c
index 7fb195f02..ac6d4bbd1 100644
--- a/tests/empathy-irc-network-manager-test.c
+++ b/tests/empathy-irc-network-manager-test.c
@@ -12,26 +12,26 @@
#define USER_FILE "user-irc-networks.xml"
static void
-test_empathy_irc_network_manager_add (void)
+test_tpaw_irc_network_manager_add (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
GSList *networks;
gchar *name;
- mgr = empathy_irc_network_manager_new (NULL, NULL);
+ mgr = tpaw_irc_network_manager_new (NULL, NULL);
g_assert (mgr != NULL);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert (networks == NULL);
/* add a network */
- network = empathy_irc_network_new ("My Network");
+ network = tpaw_irc_network_new ("My Network");
g_assert (network != NULL);
- empathy_irc_network_manager_add (mgr, network);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (network);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 1);
g_object_get (networks->data, "name", &name, NULL);
g_assert_cmpstr (name, ==, "My Network");
@@ -40,12 +40,12 @@ test_empathy_irc_network_manager_add (void)
g_slist_free (networks);
/* add another network having the same name */
- network = empathy_irc_network_new ("My Network");
+ network = tpaw_irc_network_new ("My Network");
g_assert (network != NULL);
- empathy_irc_network_manager_add (mgr, network);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (network);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 2);
g_object_get (networks->data, "name", &name, NULL);
g_assert_cmpstr (name, ==, "My Network");
@@ -62,7 +62,7 @@ test_empathy_irc_network_manager_add (void)
static void
test_load_global_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t freenode_servers[] = {
@@ -79,7 +79,7 @@ test_load_global_file (void)
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_object_get (mgr,
"global-file", &global_file,
@@ -90,7 +90,7 @@ test_load_global_file (void)
g_free (global_file_orig);
g_free (user_file);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 4);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -139,18 +139,18 @@ test_load_global_file (void)
}
static gboolean
-remove_network_named (EmpathyIrcNetworkManager *mgr,
+remove_network_named (TpawIrcNetworkManager *mgr,
const gchar *network_name)
{
GSList *networks, *l;
gboolean removed = FALSE;
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
/* check networks and servers */
for (l = networks; l != NULL && !removed; l = g_slist_next (l))
{
- EmpathyIrcNetwork *network = l->data;
+ TpawIrcNetwork *network = l->data;
gchar *name;
g_object_get (network, "name", &name, NULL);
@@ -158,7 +158,7 @@ remove_network_named (EmpathyIrcNetworkManager *mgr,
if (strcmp (name, network_name) == 0)
{
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
removed = TRUE;
}
@@ -172,9 +172,9 @@ remove_network_named (EmpathyIrcNetworkManager *mgr,
}
static void
-test_empathy_irc_network_manager_remove (void)
+test_tpaw_irc_network_manager_remove (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
GSList *networks, *l;
struct server_t freenode_servers[] = {
{ "irc.freenode.net", 6667, FALSE },
@@ -188,13 +188,13 @@ test_empathy_irc_network_manager_remove (void)
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_free (global_file_orig);
result = remove_network_named (mgr, "GIMPNet");
g_assert (result);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -238,7 +238,7 @@ test_empathy_irc_network_manager_remove (void)
static void
test_load_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -254,7 +254,7 @@ test_load_user_file (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -266,7 +266,7 @@ test_load_user_file (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -310,7 +310,7 @@ test_load_user_file (void)
static void
test_load_both_files (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t freenode_servers[] = {
@@ -331,7 +331,7 @@ test_load_both_files (void)
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -344,7 +344,7 @@ test_load_both_files (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 5);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -400,9 +400,9 @@ test_load_both_files (void)
static void
test_modify_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -418,7 +418,7 @@ test_modify_user_file (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -429,7 +429,7 @@ test_modify_user_file (void)
g_free (global_file);
g_free (user_file);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_modified[0] = network_modified[1] = FALSE;
@@ -449,7 +449,7 @@ test_modify_user_file (void)
/* change charset */
g_object_set (network, "charset", "ISO-8859-1", NULL);
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
for (ll = servers; ll != NULL; ll = g_slist_next (ll))
{
gchar *address;
@@ -469,7 +469,7 @@ test_modify_user_file (void)
else if (strcmp (address, "irc.au.gimp.org") == 0)
{
/* remove this server */
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
}
else
{
@@ -487,7 +487,7 @@ test_modify_user_file (void)
else if (strcmp (name, "My Server") == 0)
{
/* remove this network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[1] = TRUE;
}
else if (strcmp (name, "Another Server") == 0)
@@ -504,10 +504,10 @@ test_modify_user_file (void)
g_assert (network_modified[0] && network_modified[1]);
/* Add a new network */
- network = empathy_irc_network_new ("Great Server");
- server = empathy_irc_server_new ("irc.greatserver.com", 7873, TRUE);
- empathy_irc_network_append_server (network, server);
- empathy_irc_network_manager_add (mgr, network);
+ network = tpaw_irc_network_new ("Great Server");
+ server = tpaw_irc_server_new ("irc.greatserver.com", 7873, TRUE);
+ tpaw_irc_network_append_server (network, server);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (server);
g_object_unref (network);
@@ -517,10 +517,10 @@ test_modify_user_file (void)
/* Now let's reload the file and check its contain */
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -564,9 +564,9 @@ test_modify_user_file (void)
static void
test_modify_both_files (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -586,7 +586,7 @@ test_modify_both_files (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -599,7 +599,7 @@ test_modify_both_files (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 5);
network_modified[0] = network_modified[1] = network_modified[2] =
@@ -618,7 +618,7 @@ test_modify_both_files (void)
/* Modify user network */
GSList *servers, *ll;
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
for (ll = servers; ll != NULL; ll = g_slist_next (ll))
{
gchar *address;
@@ -638,7 +638,7 @@ test_modify_both_files (void)
else if (strcmp (address, "irc.au.gimp.org") == 0)
{
/* remove this server */
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
}
else
{
@@ -656,20 +656,20 @@ test_modify_both_files (void)
else if (strcmp (name, "My Server") == 0)
{
/* remove user network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[1] = TRUE;
}
else if (strcmp (name, "Freenode") == 0)
{
/* remove global network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[2] = TRUE;
}
else if (strcmp (name, "Undernet") == 0)
{
/* modify global network */
- server = empathy_irc_server_new ("us.undernet.org", 6667, FALSE);
- empathy_irc_network_append_server (network, server);
+ server = tpaw_irc_server_new ("us.undernet.org", 6667, FALSE);
+ tpaw_irc_network_append_server (network, server);
g_object_unref (server);
network_modified[3] = TRUE;
@@ -689,10 +689,10 @@ test_modify_both_files (void)
&& network_modified[3]);
/* Add a new network */
- network = empathy_irc_network_new ("Great Server");
- server = empathy_irc_server_new ("irc.greatserver.com", 7873, TRUE);
- empathy_irc_network_append_server (network, server);
- empathy_irc_network_manager_add (mgr, network);
+ network = tpaw_irc_network_new ("Great Server");
+ server = tpaw_irc_server_new ("irc.greatserver.com", 7873, TRUE);
+ tpaw_irc_network_append_server (network, server);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (server);
g_object_unref (network);
@@ -704,11 +704,11 @@ test_modify_both_files (void)
/* Now let's reload the file and check its contain */
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_free (global_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 4);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -757,30 +757,30 @@ test_modify_both_files (void)
}
static void
-test_empathy_irc_network_manager_find_network_by_address (void)
+test_tpaw_irc_network_manager_find_network_by_address (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
struct server_t freenode_servers[] = {
{ "irc.freenode.net", 6667, FALSE },
{ "irc.eu.freenode.net", 6667, FALSE }};
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_free (global_file_orig);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"irc.freenode.net");
g_assert (network != NULL);
check_network (network, "Freenode", "UTF-8", freenode_servers, 2);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"irc.eu.freenode.net");
g_assert (network != NULL);
check_network (network, "Freenode", "UTF-8", freenode_servers, 2);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"unknown");
g_assert (network == NULL);
@@ -790,7 +790,7 @@ test_empathy_irc_network_manager_find_network_by_address (void)
static void
test_no_modify_with_empty_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
GSList *networks;
gchar *global_file_orig;
gchar *user_file_orig;
@@ -800,15 +800,15 @@ test_no_modify_with_empty_user_file (void)
g_unlink (user_file_orig);
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_free (global_file_orig);
g_object_unref (mgr);
/* We didn't modify anything so USER_FILE should be empty */
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 0);
g_slist_foreach (networks, (GFunc) g_object_unref, NULL);
@@ -825,11 +825,11 @@ main (int argc,
test_init (argc, argv);
g_test_add_func ("/irc-network-manager/add",
- test_empathy_irc_network_manager_add);
+ test_tpaw_irc_network_manager_add);
g_test_add_func ("/irc-network-manager/load-global-file",
test_load_global_file);
g_test_add_func ("/irc-network-manager/remove",
- test_empathy_irc_network_manager_remove);
+ test_tpaw_irc_network_manager_remove);
g_test_add_func ("/irc-network-manager/load-user-file", test_load_user_file);
g_test_add_func ("/irc-network-manager/load-both-files",
test_load_both_files);
@@ -838,7 +838,7 @@ main (int argc,
g_test_add_func ("/irc-network-manager/modify-both-files",
test_modify_both_files);
g_test_add_func ("/irc-network-manager/find-network-by-address",
- test_empathy_irc_network_manager_find_network_by_address);
+ test_tpaw_irc_network_manager_find_network_by_address);
g_test_add_func ("/irc-network-manager/no-modify-with-empty-user-file",
test_no_modify_with_empty_user_file);
diff --git a/tests/empathy-irc-network-test.c b/tests/empathy-irc-network-test.c
index 5ca4fba73..2657d788a 100644
--- a/tests/empathy-irc-network-test.c
+++ b/tests/empathy-irc-network-test.c
@@ -7,11 +7,11 @@
#include "test-irc-helper.h"
static void
-test_empathy_irc_network_new (void)
+test_tpaw_irc_network_new (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_object_unref (network);
@@ -20,9 +20,9 @@ test_empathy_irc_network_new (void)
static void
test_property_change (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_object_set (network,
@@ -39,7 +39,7 @@ test_property_change (void)
static gboolean modified;
static void
-modified_cb (EmpathyIrcNetwork *network,
+modified_cb (TpawIrcNetwork *network,
gpointer unused)
{
modified = TRUE;
@@ -48,9 +48,9 @@ modified_cb (EmpathyIrcNetwork *network,
static void
test_modified_signal (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -66,7 +66,7 @@ test_modified_signal (void)
}
static void
-add_servers (EmpathyIrcNetwork *network,
+add_servers (TpawIrcNetwork *network,
struct server_t *servers,
guint nb_servers)
{
@@ -74,12 +74,12 @@ add_servers (EmpathyIrcNetwork *network,
for (i = 0; i < nb_servers; i ++)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new (servers[i].address,
+ server = tpaw_irc_server_new (servers[i].address,
servers[i].port, servers[i].ssl);
modified = FALSE;
- empathy_irc_network_append_server (network, server);
+ tpaw_irc_network_append_server (network, server);
g_assert (modified);
g_object_unref (server);
}
@@ -88,8 +88,8 @@ add_servers (EmpathyIrcNetwork *network,
static void
test_add_server (void)
{
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
GSList *servers, *l;
struct server_t test_servers[] = {
{ "server1", 6667, FALSE },
@@ -101,7 +101,7 @@ test_add_server (void)
{ "server2", 6668, TRUE },
{ "server4", 6669, TRUE }};
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -115,12 +115,12 @@ test_add_server (void)
check_network (network, "Network1", "UTF-8", test_servers, 4);
/* Now let's remove the 3rd server */
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
l = g_slist_nth (servers, 2);
g_assert (l != NULL);
server = l->data;
modified = FALSE;
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
g_assert (modified);
/* free the list */
@@ -136,16 +136,16 @@ test_add_server (void)
static void
test_modified_signal_because_of_server (void)
{
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_signal_connect (network, "modified", G_CALLBACK (modified_cb), NULL);
- server = empathy_irc_server_new ("server1", 6667, FALSE);
- empathy_irc_network_append_server (network, server);
+ server = tpaw_irc_server_new ("server1", 6667, FALSE);
+ tpaw_irc_network_append_server (network, server);
/* Change server properties */
modified = FALSE;
@@ -158,7 +158,7 @@ test_modified_signal_because_of_server (void)
g_object_set (server, "ssl", TRUE, NULL);
g_assert (modified);
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
modified = FALSE;
g_object_set (server, "address", "server3", NULL);
/* We removed the server so the network is not modified anymore */
@@ -168,9 +168,9 @@ test_modified_signal_because_of_server (void)
}
static void
-test_empathy_irc_network_set_server_position (void)
+test_tpaw_irc_network_set_server_position (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
GSList *servers, *l;
struct server_t test_servers[] = {
{ "server1", 6667, FALSE },
@@ -183,7 +183,7 @@ test_empathy_irc_network_set_server_position (void)
{ "server3", 6667, FALSE },
{ "server1", 6667, FALSE }};
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -194,24 +194,24 @@ test_empathy_irc_network_set_server_position (void)
check_network (network, "Network1", "UTF-8", test_servers, 4);
/* get servers list */
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
g_assert (g_slist_length (servers) == 4);
modified = FALSE;
/* server1 go to the last position */
- empathy_irc_network_set_server_position (network, servers->data, -1);
+ tpaw_irc_network_set_server_position (network, servers->data, -1);
/* server2 go to the first position */
l = servers->next;
- empathy_irc_network_set_server_position (network, l->data, 0);
+ tpaw_irc_network_set_server_position (network, l->data, 0);
/* server3 go to the third position */
l = l->next;
- empathy_irc_network_set_server_position (network, l->data, 2);
+ tpaw_irc_network_set_server_position (network, l->data, 2);
/* server4 go to the second position*/
l = l->next;
- empathy_irc_network_set_server_position (network, l->data, 1);
+ tpaw_irc_network_set_server_position (network, l->data, 1);
g_assert (modified);
@@ -231,14 +231,14 @@ main (int argc,
test_init (argc, argv);
- g_test_add_func ("/irc-network/new", test_empathy_irc_network_new);
+ g_test_add_func ("/irc-network/new", test_tpaw_irc_network_new);
g_test_add_func ("/irc-network/property-change", test_property_change);
g_test_add_func ("/irc-network/modified-signal", test_modified_signal);
g_test_add_func ("/irc-network/add-server", test_add_server);
g_test_add_func ("/irc-network/modified-signal-because-of-server",
test_modified_signal_because_of_server);
g_test_add_func ("/irc-network/set-server-position",
- test_empathy_irc_network_set_server_position);
+ test_tpaw_irc_network_set_server_position);
result = g_test_run ();
test_deinit ();
diff --git a/tests/empathy-irc-server-test.c b/tests/empathy-irc-server-test.c
index 225d57bc8..ff56a02da 100644
--- a/tests/empathy-irc-server-test.c
+++ b/tests/empathy-irc-server-test.c
@@ -7,11 +7,11 @@
#include "test-irc-helper.h"
static void
-test_empathy_irc_server_new (void)
+test_tpaw_irc_server_new (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
check_server (server, "test.localhost", 6667, TRUE);
g_object_unref (server);
@@ -20,9 +20,9 @@ test_empathy_irc_server_new (void)
static void
test_property_change (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
g_assert (server != NULL);
g_object_set (server,
@@ -39,7 +39,7 @@ test_property_change (void)
static gboolean modified = FALSE;
static void
-modified_cb (EmpathyIrcServer *server,
+modified_cb (TpawIrcServer *server,
gpointer unused)
{
modified = TRUE;
@@ -48,9 +48,9 @@ modified_cb (EmpathyIrcServer *server,
static void
test_modified_signal (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
g_assert (server != NULL);
g_signal_connect (server, "modified", G_CALLBACK (modified_cb), NULL);
@@ -87,7 +87,7 @@ main (int argc,
test_init (argc, argv);
- g_test_add_func ("/irc-server/new", test_empathy_irc_server_new);
+ g_test_add_func ("/irc-server/new", test_tpaw_irc_server_new);
g_test_add_func ("/irc-server/property-change", test_property_change);
g_test_add_func ("/irc-server/modified-signal", test_modified_signal);
diff --git a/tests/test-irc-helper.c b/tests/test-irc-helper.c
index 6fafac804..82d933a7d 100644
--- a/tests/test-irc-helper.c
+++ b/tests/test-irc-helper.c
@@ -2,7 +2,7 @@
#include "test-irc-helper.h"
void
-check_server (EmpathyIrcServer *server,
+check_server (TpawIrcServer *server,
const gchar *_address,
guint _port,
gboolean _ssl)
@@ -27,7 +27,7 @@ check_server (EmpathyIrcServer *server,
}
void
-check_network (EmpathyIrcNetwork *network,
+check_network (TpawIrcNetwork *network,
const gchar *_name,
const gchar *_charset,
struct server_t *_servers,
@@ -47,13 +47,13 @@ check_network (EmpathyIrcNetwork *network,
g_assert (name != NULL && strcmp (name, _name) == 0);
g_assert (charset != NULL && strcmp (charset, _charset) == 0);
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
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++)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
gchar *address;
guint port;
gboolean ssl;
diff --git a/tests/test-irc-helper.h b/tests/test-irc-helper.h
index 6010bc186..2dedf50c9 100644
--- a/tests/test-irc-helper.h
+++ b/tests/test-irc-helper.h
@@ -12,10 +12,10 @@ struct server_t
gboolean ssl;
};
-void check_server (EmpathyIrcServer *server, const gchar *_address,
+void check_server (TpawIrcServer *server, const gchar *_address,
guint _port, gboolean _ssl);
-void check_network (EmpathyIrcNetwork *network, const gchar *_name,
+void check_network (TpawIrcNetwork *network, const gchar *_name,
const gchar *_charset, struct server_t *_servers, guint nb_servers);
#endif /* __CHECK_IRC_HELPER_H__ */