From b3e65f73b24b69f3c6acd0dd662393259e13fc2d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 29 Oct 2009 15:51:27 +0100 Subject: [PATCH] remove check-* --- tests/.gitignore | 1 - tests/Makefile.am | 30 +--------------- tests/check-empathy-helpers.c | 1 - tests/check-helpers.c | 67 ----------------------------------- tests/check-helpers.h | 43 ---------------------- tests/check-irc-helper.h | 3 -- tests/check-libempathy.h | 5 --- tests/check-main.c | 40 --------------------- 8 files changed, 1 insertion(+), 189 deletions(-) delete mode 100644 tests/check-helpers.c delete mode 100644 tests/check-helpers.h delete mode 100644 tests/check-libempathy.h delete mode 100644 tests/check-main.c diff --git a/tests/.gitignore b/tests/.gitignore index 60119740..73a19245 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,3 @@ -check-main *.log empathy-utils-test empathy-irc-server-test diff --git a/tests/Makefile.am b/tests/Makefile.am index c4959718..61c6b78d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,8 +2,6 @@ SUBDIRS = interactive xml CLEANFILES= -include $(top_srcdir)/rules/check.mak - SUPPRESSIONS=valgrind.supp dlopen.supp EXTRA_DIST = \ @@ -53,33 +51,7 @@ empathy_chatroom_test_SOURCES = empathy-chatroom-test.c \ 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 -check_main_SOURCES = \ - check-main.c \ - check-helpers.c \ - check-helpers.h \ - check-libempathy.h \ - check-empathy-helpers.h \ - check-empathy-helpers.c \ - check-irc-helper.h \ - check-irc-helper.c - -check_c_sources = \ - $(check_main_SOURCES) -include $(top_srcdir)/tools/check-coding-style.mk -check-local: test check-coding-style - -check_main_LDADD = \ - @CHECK_LIBS@ \ - $(top_builddir)/libempathy-gtk/libempathy-gtk.la \ - $(top_builddir)/libempathy/libempathy.la \ - $(AM_LDFLAGS) - -check_main_CFLAGS = \ - @CHECK_CFLAGS@ \ - $(AM_CFLAGS) +check_PROGRAMS = $(TEST_PROGS) TESTS_ENVIRONMENT = EMPATHY_SRCDIR=@abs_top_srcdir@ \ MC_PROFILE_DIR=@abs_top_srcdir@/tests \ diff --git a/tests/check-empathy-helpers.c b/tests/check-empathy-helpers.c index b66bbddd..619a1d53 100644 --- a/tests/check-empathy-helpers.c +++ b/tests/check-empathy-helpers.c @@ -26,7 +26,6 @@ #include -#include "check-helpers.h" #include "check-empathy-helpers.h" gchar * diff --git a/tests/check-helpers.c b/tests/check-helpers.c deleted file mode 100644 index 6fd07cf6..00000000 --- a/tests/check-helpers.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * check-helpers.c - Source for some check helpers - * Copyright (C) 2007-2008 Collabora Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -#include -#include -#include - -#include "check-helpers.h" - -static gboolean expecting_critical = FALSE; -static gboolean received_critical = FALSE; - -static void -check_helper_log_critical_func (const gchar *log_damain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) -{ - - if (!expecting_critical) - { - fail ("Unexpected critical message: %s\n", message); - } - - g_assert (log_level & G_LOG_LEVEL_CRITICAL); - - received_critical = TRUE; -} - -gboolean -got_critical (void) -{ - return received_critical; -} - -void -expect_critical (gboolean expected) -{ - expecting_critical = expected; - received_critical = FALSE; -} - -void -check_helpers_init (void) -{ - g_log_set_handler (NULL, G_LOG_LEVEL_CRITICAL, - check_helper_log_critical_func, NULL); -} diff --git a/tests/check-helpers.h b/tests/check-helpers.h deleted file mode 100644 index b71b3b65..00000000 --- a/tests/check-helpers.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * check-helpers.c - Source for some check helpers - * Copyright (C) 2007 Collabora Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#ifndef __CHECK_HELPERS_H__ -#define __CHECK_HELPERS_H__ - -#include -#include - -void -check_helpers_init (void); - -void -expect_critical (gboolean expected); - -gboolean -got_critical (void); - -#define fail_unless_critical(expr, ...) \ -G_STMT_START { \ - expect_critical (TRUE); \ - expr; \ - _fail_unless (got_critical (), __FILE__, __LINE__, \ - "Expected g_critical, got none", ## __VA_ARGS__, NULL); \ - expect_critical (FALSE); \ -} G_STMT_END; - -#endif /* #ifndef __CHECK_HELPERS_H__ */ diff --git a/tests/check-irc-helper.h b/tests/check-irc-helper.h index 32a34b60..e375f6fb 100644 --- a/tests/check-irc-helper.h +++ b/tests/check-irc-helper.h @@ -1,9 +1,6 @@ #include #include -#include -#include "check-helpers.h" - #include #include #include diff --git a/tests/check-libempathy.h b/tests/check-libempathy.h deleted file mode 100644 index 2eac9e46..00000000 --- a/tests/check-libempathy.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __CHECK_LIBEMPATHY__ -#define __CHECK_LIBEMPATHY__ - - -#endif /* #ifndef __CHECK_LIBEMPATHY__ */ diff --git a/tests/check-main.c b/tests/check-main.c deleted file mode 100644 index 0d86de32..00000000 --- a/tests/check-main.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include - -#include - -#include "check-helpers.h" -#include "check-libempathy.h" -#include - -#include "config.h" - -static Suite * -make_libempathy_suite (void) -{ - Suite *s = suite_create ("libempathy"); - - return s; -} - -int -main (void) -{ - int number_failed = 0; - Suite *s; - SRunner *sr; - - check_helpers_init (); - g_type_init (); - empathy_init (); - - s = make_libempathy_suite (); - sr = srunner_create (s); - srunner_run_all (sr, CK_NORMAL); - number_failed += srunner_ntests_failed (sr); - srunner_free (sr); - - return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} -- 2.39.2