From be307f7d7e1865559605e5741b631f195918c8a6 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Sun, 6 Jan 2008 13:00:38 +0100 Subject: check-empathy-irc-server.c: test property change --- tests/check-empathy-irc-server.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests/check-empathy-irc-server.c') diff --git a/tests/check-empathy-irc-server.c b/tests/check-empathy-irc-server.c index e4f0b1347..ab34e9777 100644 --- a/tests/check-empathy-irc-server.c +++ b/tests/check-empathy-irc-server.c @@ -33,11 +33,43 @@ START_TEST (test_empathy_irc_server_new) } END_TEST +START_TEST (test_property_change) +{ + EmpathyIrcServer *server; + gchar *address; + guint port; + gboolean ssl; + + 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); + + g_object_get (server, + "address", &address, + "port", &port, + "ssl", &ssl, + NULL); + + fail_if (address == NULL || strcmp (address, "test2.localhost") != 0); + fail_if (port != 6668); + fail_if (ssl); + + g_free (address); + 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); return tc; } -- cgit v1.2.3