diff options
author | Guillaume Desmottes <gdesmott@gnome.org> | 2008-01-06 20:00:38 +0800 |
---|---|---|
committer | Guillaume Desmottes <gdesmott@gnome.org> | 2008-01-06 20:00:38 +0800 |
commit | be307f7d7e1865559605e5741b631f195918c8a6 (patch) | |
tree | 2bb86728aec6738a767593d6291847b2a8cd94a6 /tests/check-empathy-irc-server.c | |
parent | d66e886bee27a2418dab0f94f0aae4edfdcde537 (diff) | |
download | gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar.gz gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar.bz2 gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar.lz gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar.xz gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.tar.zst gsoc2013-empathy-be307f7d7e1865559605e5741b631f195918c8a6.zip |
check-empathy-irc-server.c: test property change
Diffstat (limited to 'tests/check-empathy-irc-server.c')
-rw-r--r-- | tests/check-empathy-irc-server.c | 32 |
1 files changed, 32 insertions, 0 deletions
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; } |