]> git.0d.be Git - empathy.git/commitdiff
remove check-*
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 29 Oct 2009 14:51:27 +0000 (15:51 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 3 Nov 2009 12:25:02 +0000 (12:25 +0000)
tests/.gitignore
tests/Makefile.am
tests/check-empathy-helpers.c
tests/check-helpers.c [deleted file]
tests/check-helpers.h [deleted file]
tests/check-irc-helper.h
tests/check-libempathy.h [deleted file]
tests/check-main.c [deleted file]

index 601197409b8014c2bd7b61a5d533bf7178a25331..73a19245d67476749c76e1fd2dc4f25748254499 100644 (file)
@@ -1,4 +1,3 @@
-check-main
 *.log
 empathy-utils-test
 empathy-irc-server-test
index c49597188e63e12524a975b0567c4a0971d05366..61c6b78db02230c9521cbff72e190f8bd6900870 100644 (file)
@@ -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 \
index b66bbddd00086982c08eb20704f61798c69d17ba..619a1d5352927355100c0723b40d4aabd5faa42d 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <telepathy-glib/account-manager.h>
 
-#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 (file)
index 6fd07cf..0000000
+++ /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 <stdio.h>
-#include <stdlib.h>
-
-#include <glib/gstdio.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
-#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 (file)
index b71b3b6..0000000
+++ /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 <glib.h>
-#include <check.h>
-
-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__ */
index 32a34b60d1f07c91e3bd9043352818c0f331191a..e375f6fb65f49b575741d609701d98572b77c667 100644 (file)
@@ -1,9 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <check.h>
-#include "check-helpers.h"
-
 #include <libempathy/empathy-irc-server.h>
 #include <libempathy/empathy-irc-network.h>
 #include <libempathy/empathy-irc-network-manager.h>
diff --git a/tests/check-libempathy.h b/tests/check-libempathy.h
deleted file mode 100644 (file)
index 2eac9e4..0000000
+++ /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 (file)
index 0d86de3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <glib-object.h>
-
-#include <check.h>
-
-#include "check-helpers.h"
-#include "check-libempathy.h"
-#include <libempathy/empathy-utils.h>
-
-#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;
-}