diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-28 00:10:41 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-03 20:25:01 +0800 |
commit | 85268449651286df02e6da607abd98828fd68a6a (patch) | |
tree | 91030f116511b107fa94493352d75b3f90d41e5d /tests/check-empathy-irc-server.c | |
parent | 2a974fc78e833d232a6203d5a807b0ee5efb396a (diff) | |
download | gsoc2013-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-empathy-irc-server.c')
-rw-r--r-- | tests/check-empathy-irc-server.c | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/tests/check-empathy-irc-server.c b/tests/check-empathy-irc-server.c deleted file mode 100644 index 52607f221..000000000 --- a/tests/check-empathy-irc-server.c +++ /dev/null @@ -1,93 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include <check.h> -#include "check-helpers.h" -#include "check-libempathy.h" -#include "check-irc-helper.h" - -#include <libempathy/empathy-irc-server.h> - -START_TEST (test_empathy_irc_server_new) -{ - EmpathyIrcServer *server; - - server = empathy_irc_server_new ("test.localhost", 6667, TRUE); - check_server (server, "test.localhost", 6667, TRUE); - - g_object_unref (server); -} -END_TEST - -START_TEST (test_property_change) -{ - EmpathyIrcServer *server; - - server = empathy_irc_server_new ("test.localhost", 6667, TRUE); - fail_if (server == NULL); - - g_object_set (server, - "address", "test2.localhost", - "port", 6668, - "ssl", FALSE, - NULL); - - check_server (server, "test2.localhost", 6668, FALSE); - - g_object_unref (server); -} -END_TEST - -static gboolean modified = FALSE; - -static void -modified_cb (EmpathyIrcServer *server, - gpointer unused) -{ - modified = TRUE; -} - -START_TEST (test_modified_signal) -{ - EmpathyIrcServer *server; - - server = empathy_irc_server_new ("test.localhost", 6667, TRUE); - fail_if (server == NULL); - - g_signal_connect (server, "modified", G_CALLBACK (modified_cb), NULL); - - /* address */ - g_object_set (server, "address", "test2.localhost", NULL); - fail_if (!modified); - modified = FALSE; - g_object_set (server, "address", "test2.localhost", NULL); - fail_if (modified); - - /* port */ - g_object_set (server, "port", 6668, NULL); - fail_if (!modified); - modified = FALSE; - g_object_set (server, "port", 6668, NULL); - fail_if (modified); - - /* ssl */ - g_object_set (server, "ssl", FALSE, NULL); - fail_if (!modified); - modified = FALSE; - g_object_set (server, "ssl", FALSE, NULL); - fail_if (modified); - - g_object_unref (server); -} -END_TEST - -TCase * -make_empathy_irc_server_tcase (void) -{ - TCase *tc = tcase_create ("empathy-irc-server"); - tcase_add_test (tc, test_empathy_irc_server_new); - tcase_add_test (tc, test_property_change); - tcase_add_test (tc, test_modified_signal); - return tc; -} |