aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-29 22:40:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-03 20:25:02 +0800
commitfe119ac9b883091e0ed3e0b3cbbb64bca753baad (patch)
tree602ef78b251dfa1c0c5b7380c1f0e8ee8eb77762 /tests
parentf90aaa6e6f9dfa16dd3d6b6c526857f987862c99 (diff)
downloadgsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar.gz
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar.bz2
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar.lz
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar.xz
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.tar.zst
gsoc2013-empathy-fe119ac9b883091e0ed3e0b3cbbb64bca753baad.zip
port check-empathy-chatroom-manager.c to GTest
The tests have not been ported yet as they are currently disabled.
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/check-libempathy.h1
-rw-r--r--tests/check-main.c2
-rw-r--r--tests/empathy-chatroom-manager-test.c (renamed from tests/check-empathy-chatroom-manager.c)40
5 files changed, 31 insertions, 22 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index eda398504..601197409 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,4 +5,5 @@ empathy-irc-server-test
empathy-irc-network-test
empathy-irc-network-manager-test
empathy-chatroom-test
+empathy-chatroom-manager-test
test-report.xml
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 50a6bbade..c49597188 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,7 +28,8 @@ TEST_PROGS = \
empathy-irc-server-test \
empathy-irc-network-test \
empathy-irc-network-manager-test \
- empathy-chatroom-test
+ empathy-chatroom-test \
+ empathy-chatroom-manager-test
empathy_utils_test_SOURCES = empathy-utils-test.c \
test-helper.c test-helper.h
@@ -49,6 +50,9 @@ empathy_irc_network_manager_test_SOURCES = empathy-irc-network-manager-test.c \
empathy_chatroom_test_SOURCES = empathy-chatroom-test.c \
test-helper.c test-helper.h
+empathy_chatroom_manager_test_SOURCES = empathy-chatroom-manager-test.c \
+ test-helper.c test-helper.h
+
check_PROGRAMS = check-main $(TEST_PROGS)
TESTS = check-main
@@ -60,8 +64,7 @@ check_main_SOURCES = \
check-empathy-helpers.h \
check-empathy-helpers.c \
check-irc-helper.h \
- check-irc-helper.c \
- check-empathy-chatroom-manager.c
+ check-irc-helper.c
check_c_sources = \
$(check_main_SOURCES)
diff --git a/tests/check-libempathy.h b/tests/check-libempathy.h
index a892bf67c..2eac9e464 100644
--- a/tests/check-libempathy.h
+++ b/tests/check-libempathy.h
@@ -1,6 +1,5 @@
#ifndef __CHECK_LIBEMPATHY__
#define __CHECK_LIBEMPATHY__
-TCase * make_empathy_chatroom_manager_tcase (void);
#endif /* #ifndef __CHECK_LIBEMPATHY__ */
diff --git a/tests/check-main.c b/tests/check-main.c
index 00bcf4380..0d86de328 100644
--- a/tests/check-main.c
+++ b/tests/check-main.c
@@ -16,8 +16,6 @@ make_libempathy_suite (void)
{
Suite *s = suite_create ("libempathy");
- suite_add_tcase (s, make_empathy_chatroom_manager_tcase ());
-
return s;
}
diff --git a/tests/check-empathy-chatroom-manager.c b/tests/empathy-chatroom-manager-test.c
index dd0d93f52..3d6b6f6b7 100644
--- a/tests/check-empathy-chatroom-manager.c
+++ b/tests/empathy-chatroom-manager-test.c
@@ -7,14 +7,11 @@
#include <gconf/gconf-client.h>
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/util.h>
-#include <check.h>
-
-#include "check-helpers.h"
-#include "check-libempathy.h"
-#include "check-empathy-helpers.h"
#include <libempathy/empathy-chatroom-manager.h>
+#include "test-helper.h"
+
#define CHATROOM_SAMPLE "chatrooms-sample.xml"
#define CHATROOM_FILE "chatrooms.xml"
@@ -387,16 +384,27 @@ START_TEST (test_empathy_chatroom_manager_change_chatroom)
END_TEST
#endif
-TCase *
-make_empathy_chatroom_manager_tcase (void)
+int
+main (int argc,
+ char **argv)
{
- TCase *tc = tcase_create ("empathy-chatroom-manager");
- /*
- tcase_add_test (tc, test_empathy_chatroom_manager_dup_singleton);
- tcase_add_test (tc, test_empathy_chatroom_manager_add);
- tcase_add_test (tc, test_empathy_chatroom_manager_remove);
- tcase_add_test (tc, test_empathy_chatroom_manager_change_favorite);
- tcase_add_test (tc, test_empathy_chatroom_manager_change_chatroom);
- */
- return tc;
+ int result;
+
+ test_init (argc, argv);
+
+#if 0
+ g_test_add_func ("/chatroom-manager/dup-singleton",
+ test_empathy_chatroom_manager_dup_singleton);
+ g_test_add_func ("/chatroom-manager/add", test_empathy_chatroom_manager_add);
+ g_test_add_func ("/chatroom-manager/remove",
+ test_empathy_chatroom_manager_remove);
+ g_test_add_func ("/chatroom-manager/change-favorite",
+ test_empathy_chatroom_manager_change_favorite);
+ g_test_add_func ("/chatroom-manager/change-chatroom",
+ test_empathy_chatroom_manager_change_chatroom);
+#endif
+
+ result = g_test_run ();
+ test_deinit ();
+ return result;
}