[empathy] port check-empathy-chatroom.c to GTest
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] port check-empathy-chatroom.c to GTest
- Date: Tue, 3 Nov 2009 12:43:24 +0000 (UTC)
commit f90aaa6e6f9dfa16dd3d6b6c526857f987862c99
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Oct 29 15:31:23 2009 +0100
port check-empathy-chatroom.c to GTest
The tests have not been ported yet as they are currently
disabled.
tests/.gitignore | 1 +
tests/Makefile.am | 7 +++-
tests/check-libempathy.h | 1 -
tests/check-main.c | 1 -
...-empathy-chatroom.c => empathy-chatroom-test.c} | 30 ++++++++++++--------
5 files changed, 24 insertions(+), 16 deletions(-)
---
diff --git a/tests/.gitignore b/tests/.gitignore
index febd6a8..eda3985 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -4,4 +4,5 @@ empathy-utils-test
empathy-irc-server-test
empathy-irc-network-test
empathy-irc-network-manager-test
+empathy-chatroom-test
test-report.xml
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d0b7fd3..50a6bba 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,7 +27,8 @@ TEST_PROGS = \
empathy-utils-test \
empathy-irc-server-test \
empathy-irc-network-test \
- empathy-irc-network-manager-test
+ empathy-irc-network-manager-test \
+ empathy-chatroom-test
empathy_utils_test_SOURCES = empathy-utils-test.c \
test-helper.c test-helper.h
@@ -45,6 +46,9 @@ empathy_irc_network_manager_test_SOURCES = empathy-irc-network-manager-test.c \
check-irc-helper.h check-irc-helper.c \
check-empathy-helpers.h check-empathy-helpers.c
+empathy_chatroom_test_SOURCES = empathy-chatroom-test.c \
+ test-helper.c test-helper.h
+
check_PROGRAMS = check-main $(TEST_PROGS)
TESTS = check-main
@@ -57,7 +61,6 @@ check_main_SOURCES = \
check-empathy-helpers.c \
check-irc-helper.h \
check-irc-helper.c \
- check-empathy-chatroom.c \
check-empathy-chatroom-manager.c
check_c_sources = \
diff --git a/tests/check-libempathy.h b/tests/check-libempathy.h
index bcb0be9..a892bf6 100644
--- a/tests/check-libempathy.h
+++ b/tests/check-libempathy.h
@@ -1,7 +1,6 @@
#ifndef __CHECK_LIBEMPATHY__
#define __CHECK_LIBEMPATHY__
-TCase * make_empathy_chatroom_tcase (void);
TCase * make_empathy_chatroom_manager_tcase (void);
#endif /* #ifndef __CHECK_LIBEMPATHY__ */
diff --git a/tests/check-main.c b/tests/check-main.c
index e8b2c1a..00bcf43 100644
--- a/tests/check-main.c
+++ b/tests/check-main.c
@@ -16,7 +16,6 @@ make_libempathy_suite (void)
{
Suite *s = suite_create ("libempathy");
- suite_add_tcase (s, make_empathy_chatroom_tcase ());
suite_add_tcase (s, make_empathy_chatroom_manager_tcase ());
return s;
diff --git a/tests/check-empathy-chatroom.c b/tests/empathy-chatroom-test.c
similarity index 89%
rename from tests/check-empathy-chatroom.c
rename to tests/empathy-chatroom-test.c
index 4d0b7e1..77d0c29 100644
--- a/tests/check-empathy-chatroom.c
+++ b/tests/empathy-chatroom-test.c
@@ -2,10 +2,8 @@
#include <stdio.h>
#include <string.h>
-#include <check.h>
-#include "check-helpers.h"
-#include "check-libempathy.h"
#include "check-empathy-helpers.h"
+#include "test-helper.h"
#include <libempathy/empathy-chatroom.h>
@@ -146,14 +144,22 @@ START_TEST (test_change_favorite)
END_TEST
#endif
-TCase *
-make_empathy_chatroom_tcase (void)
+int
+main (int argc,
+ char **argv)
{
- TCase *tc = tcase_create ("empathy-chatroom");
- /*
- tcase_add_test (tc, test_empathy_chatroom_new);
- tcase_add_test (tc, test_favorite_and_auto_connect);
- tcase_add_test (tc, test_change_favorite);
- */
- return tc;
+ int result;
+
+ test_init (argc, argv);
+
+#if 0
+ g_test_add_func ("/chatroom/new", test_empathy_chatroom_new);
+ g_test_add_func ("/chatroom/favorite-and-auto-connect",
+ test_favorite_and_auto_connect);
+ g_test_add_func ("/chatroom/change-favorite", test_change_favorite);
+#endif
+
+ result = g_test_run ();
+ test_deinit ();
+ return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]