[empathy] port check-empathy-chatroom-manager.c to GTest
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] port check-empathy-chatroom-manager.c to GTest
- Date: Tue, 3 Nov 2009 12:43:29 +0000 (UTC)
commit fe119ac9b883091e0ed3e0b3cbbb64bca753baad
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Oct 29 15:40:01 2009 +0100
port check-empathy-chatroom-manager.c to GTest
The tests have not been ported yet as they are currently
disabled.
tests/.gitignore | 1 +
tests/Makefile.am | 9 +++-
tests/check-libempathy.h | 1 -
tests/check-main.c | 2 -
...m-manager.c => empathy-chatroom-manager-test.c} | 40 ++++++++++++--------
5 files changed, 31 insertions(+), 22 deletions(-)
---
diff --git a/tests/.gitignore b/tests/.gitignore
index eda3985..6011974 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 50a6bba..c495971 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 a892bf6..2eac9e4 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 00bcf43..0d86de3 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
similarity index 94%
rename from tests/check-empathy-chatroom-manager.c
rename to tests/empathy-chatroom-manager-test.c
index dd0d93f..3d6b6f6 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]