]> git.0d.be Git - empathy.git/commitdiff
rename check-irc-helper to test-irc-helper
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 29 Oct 2009 15:04:12 +0000 (16:04 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 3 Nov 2009 12:25:02 +0000 (12:25 +0000)
tests/Makefile.am
tests/check-irc-helper.c [deleted file]
tests/check-irc-helper.h [deleted file]
tests/empathy-irc-network-manager-test.c
tests/empathy-irc-network-test.c
tests/empathy-irc-server-test.c
tests/test-irc-helper.c [new file with mode: 0644]
tests/test-irc-helper.h [new file with mode: 0644]

index 7821d8d2fdaf48abcecad419373cc7a2b57a5c7c..25e3994061f747e7de8b82f82bb51cd951ab7c8b 100644 (file)
@@ -34,15 +34,15 @@ empathy_utils_test_SOURCES = empathy-utils-test.c \
 
 empathy_irc_server_test_SOURCES = empathy-irc-server-test.c \
      test-helper.c test-helper.h                       \
-     check-irc-helper.h check-irc-helper.c
+     test-irc-helper.h test-irc-helper.c
 
 empathy_irc_network_test_SOURCES = empathy-irc-network-test.c \
      test-helper.c test-helper.h                       \
-     check-irc-helper.h check-irc-helper.c
+     test-irc-helper.h test-irc-helper.c
 
 empathy_irc_network_manager_test_SOURCES = empathy-irc-network-manager-test.c \
      test-helper.c test-helper.h                       \
-     check-irc-helper.h check-irc-helper.c
+     test-irc-helper.h test-irc-helper.c
 
 empathy_chatroom_test_SOURCES = empathy-chatroom-test.c \
      test-helper.c test-helper.h
diff --git a/tests/check-irc-helper.c b/tests/check-irc-helper.c
deleted file mode 100644 (file)
index 1a2832a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "check-irc-helper.h"
-
-void
-check_server (EmpathyIrcServer *server,
-              const gchar *_address,
-              guint _port,
-              gboolean _ssl)
-{
-  gchar *address;
-  guint port;
-  gboolean ssl;
-
-  g_assert (server != NULL);
-
-  g_object_get (server,
-      "address", &address,
-      "port", &port,
-      "ssl", &ssl,
-      NULL);
-
-  g_assert (address != NULL && strcmp (address, _address) == 0);
-  g_assert (port == _port);
-  g_assert (ssl == _ssl);
-
-  g_free (address);
-}
-
-void
-check_network (EmpathyIrcNetwork *network,
-              const gchar *_name,
-              const gchar *_charset,
-              struct server_t *_servers,
-              guint nb_servers)
-{
-  gchar  *name, *charset;
-  GSList *servers, *l;
-  guint i;
-
-  g_assert (network != NULL);
-
-  g_object_get (network,
-      "name", &name,
-      "charset", &charset,
-      NULL);
-
-  g_assert (name != NULL && strcmp (name, _name) == 0);
-  g_assert (charset != NULL && strcmp (charset, _charset) == 0);
-
-  servers = empathy_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;
-      gchar *address;
-      guint port;
-      gboolean ssl;
-
-      server = l->data;
-
-      g_object_get (server,
-          "address", &address,
-          "port", &port,
-          "ssl", &ssl,
-          NULL);
-
-      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);
-    }
-
-  g_slist_foreach (servers, (GFunc) g_object_unref, NULL);
-  g_slist_free (servers);
-  g_free (name);
-  g_free (charset);
-}
diff --git a/tests/check-irc-helper.h b/tests/check-irc-helper.h
deleted file mode 100644 (file)
index e375f6f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-
-#include <libempathy/empathy-irc-server.h>
-#include <libempathy/empathy-irc-network.h>
-#include <libempathy/empathy-irc-network-manager.h>
-
-#ifndef __CHECK_IRC_HELPER_H__
-#define __CHECK_IRC_HELPER_H__
-
-struct server_t
-{
-  gchar *address;
-  guint port;
-  gboolean ssl;
-};
-
-void check_server (EmpathyIrcServer *server, const gchar *_address,
-    guint _port, gboolean _ssl);
-
-void check_network (EmpathyIrcNetwork *network, const gchar *_name,
-    const gchar *_charset, struct server_t *_servers, guint nb_servers);
-
-#endif /* __CHECK_IRC_HELPER_H__ */
index 711cdb22c1334c7ac7bd65eb0fb20664dc5938c9..df1147070371093eb25afb7336fedbe0b9db2835 100644 (file)
@@ -3,7 +3,7 @@
 #include <string.h>
 #include <glib/gstdio.h>
 
-#include "check-irc-helper.h"
+#include "test-irc-helper.h"
 #include "test-helper.h"
 
 #include <libempathy/empathy-irc-network-manager.h>
index 00fbe91b1a8cff80cd223a78b476516f686f4526..313ab0651835236684204869a3f12e85c2a98859 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "check-irc-helper.h"
+#include "test-irc-helper.h"
 #include "test-helper.h"
 
 #include <libempathy/empathy-irc-network.h>
index b9574c40c7d3b1e07cf03f0ad3aeacedbe57a30a..573967e436a4f1e78672e617485b0a743b9083cf 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "check-irc-helper.h"
+#include "test-irc-helper.h"
 #include "test-helper.h"
 
 #include <libempathy/empathy-irc-server.h>
diff --git a/tests/test-irc-helper.c b/tests/test-irc-helper.c
new file mode 100644 (file)
index 0000000..ade247f
--- /dev/null
@@ -0,0 +1,80 @@
+#include "test-irc-helper.h"
+
+void
+check_server (EmpathyIrcServer *server,
+              const gchar *_address,
+              guint _port,
+              gboolean _ssl)
+{
+  gchar *address;
+  guint port;
+  gboolean ssl;
+
+  g_assert (server != NULL);
+
+  g_object_get (server,
+      "address", &address,
+      "port", &port,
+      "ssl", &ssl,
+      NULL);
+
+  g_assert (address != NULL && strcmp (address, _address) == 0);
+  g_assert (port == _port);
+  g_assert (ssl == _ssl);
+
+  g_free (address);
+}
+
+void
+check_network (EmpathyIrcNetwork *network,
+              const gchar *_name,
+              const gchar *_charset,
+              struct server_t *_servers,
+              guint nb_servers)
+{
+  gchar  *name, *charset;
+  GSList *servers, *l;
+  guint i;
+
+  g_assert (network != NULL);
+
+  g_object_get (network,
+      "name", &name,
+      "charset", &charset,
+      NULL);
+
+  g_assert (name != NULL && strcmp (name, _name) == 0);
+  g_assert (charset != NULL && strcmp (charset, _charset) == 0);
+
+  servers = empathy_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;
+      gchar *address;
+      guint port;
+      gboolean ssl;
+
+      server = l->data;
+
+      g_object_get (server,
+          "address", &address,
+          "port", &port,
+          "ssl", &ssl,
+          NULL);
+
+      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);
+    }
+
+  g_slist_foreach (servers, (GFunc) g_object_unref, NULL);
+  g_slist_free (servers);
+  g_free (name);
+  g_free (charset);
+}
diff --git a/tests/test-irc-helper.h b/tests/test-irc-helper.h
new file mode 100644 (file)
index 0000000..e375f6f
--- /dev/null
@@ -0,0 +1,24 @@
+#include <stdlib.h>
+#include <string.h>
+
+#include <libempathy/empathy-irc-server.h>
+#include <libempathy/empathy-irc-network.h>
+#include <libempathy/empathy-irc-network-manager.h>
+
+#ifndef __CHECK_IRC_HELPER_H__
+#define __CHECK_IRC_HELPER_H__
+
+struct server_t
+{
+  gchar *address;
+  guint port;
+  gboolean ssl;
+};
+
+void check_server (EmpathyIrcServer *server, const gchar *_address,
+    guint _port, gboolean _ssl);
+
+void check_network (EmpathyIrcNetwork *network, const gchar *_name,
+    const gchar *_charset, struct server_t *_servers, guint nb_servers);
+
+#endif /* __CHECK_IRC_HELPER_H__ */