changeset 15806:a0a5e323a6ac

libpurplify the 'make check' tests so they work again
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 17 Mar 2007 17:29:40 +0000
parents 87997f44e75e
children 0e54e4a48769
files libpurple/tests/Makefile.am libpurple/tests/check_libgaim.c libpurple/tests/check_libpurple.c libpurple/tests/tests.h
diffstat 4 files changed, 79 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/tests/Makefile.am	Sat Mar 17 16:55:51 2007 +0000
+++ b/libpurple/tests/Makefile.am	Sat Mar 17 17:29:40 2007 +0000
@@ -1,26 +1,26 @@
 if HAVE_CHECK
-TESTS=check_libgaim
+TESTS=check_libpurple
 
-check_PROGRAMS=check_libgaim
+check_PROGRAMS=check_libpurple
 
-check_libgaim_SOURCES=\
-        check_libgaim.c \
+check_libpurple_SOURCES=\
+        check_libpurple.c \
 	    tests.h \
 		test_cipher.c \
 		test_jabber_jutil.c \
 		test_util.c \
 		$(top_builddir)/libpurple/util.h
 
-check_libgaim_CFLAGS=\
+check_libpurple_CFLAGS=\
         @CHECK_CFLAGS@ \
 		$(GLIB_CFLAGS) \
 		-I.. \
 		-DBUILDDIR=\"$(top_builddir)\"
 
-check_libgaim_LDADD=\
+check_libpurple_LDADD=\
         @CHECK_LIBS@ \
 		$(GLIB_LIBS) \
 		$(top_builddir)/libpurple/protocols/jabber/libjabber.la \
-		$(top_builddir)/libpurple/libgaim.la
+		$(top_builddir)/libpurple/libpurple.la
 
 endif
--- a/libpurple/tests/check_libgaim.c	Sat Mar 17 16:55:51 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-#include <glib.h>
-#include <stdlib.h>
-
-#include "../core.h"
-#include "../eventloop.h"
-
-#include "tests.h"
-
-/******************************************************************************
- * libgaim goodies
- *****************************************************************************/
-static guint
-gaim_check_input_add(gint fd, GaimInputCondition condition,
-                     GaimInputFunction function, gpointer data)
-{
-	/* this is a no-op for now, feel free to implement it */
-	return 0;
-}
-
-static GaimEventLoopUiOps eventloop_ui_ops = {
-	g_timeout_add,
-	(guint (*)(guint))g_source_remove,
-	gaim_check_input_add,
-	(guint (*)(guint))g_source_remove,
-};
-
-static void
-gaim_check_init(void) {
-	gchar *home_dir;
-
-	gaim_eventloop_set_ui_ops(&eventloop_ui_ops);
-
-	/* build our fake home directory */
-	home_dir = g_build_path(BUILDDIR, "libgaim", "tests", "home", NULL);
-	gaim_util_set_user_dir(home_dir);
-	g_free(home_dir);
-
-	gaim_core_init("check");
-}
-
-/******************************************************************************
- * Check meat and potatoes
- *****************************************************************************/
-Suite*
-master_suite(void)
-{
-	Suite *s = suite_create("Master Suite");
-
-	return s;
-}
-
-int main(void)
-{
-	int number_failed;
-	SRunner *sr = srunner_create (master_suite());
-
-	srunner_add_suite(sr, cipher_suite());
-	srunner_add_suite(sr, jabber_jutil_suite());
-	srunner_add_suite(sr, util_suite());
-
-	/* make this a libgaim "ui" */
-	gaim_check_init();
-
-	srunner_run_all (sr, CK_NORMAL);
-	number_failed = srunner_ntests_failed (sr);
-	srunner_free (sr);
-
-	gaim_core_quit();
-
-	return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/tests/check_libpurple.c	Sat Mar 17 17:29:40 2007 +0000
@@ -0,0 +1,71 @@
+#include <glib.h>
+#include <stdlib.h>
+
+#include "../core.h"
+#include "../eventloop.h"
+
+#include "tests.h"
+
+/******************************************************************************
+ * libpurple goodies
+ *****************************************************************************/
+static guint
+gaim_check_input_add(gint fd, GaimInputCondition condition,
+                     GaimInputFunction function, gpointer data)
+{
+	/* this is a no-op for now, feel free to implement it */
+	return 0;
+}
+
+static GaimEventLoopUiOps eventloop_ui_ops = {
+	g_timeout_add,
+	(guint (*)(guint))g_source_remove,
+	gaim_check_input_add,
+	(guint (*)(guint))g_source_remove,
+};
+
+static void
+gaim_check_init(void) {
+	gchar *home_dir;
+
+	gaim_eventloop_set_ui_ops(&eventloop_ui_ops);
+
+	/* build our fake home directory */
+	home_dir = g_build_path(BUILDDIR, "libpurple", "tests", "home", NULL);
+	gaim_util_set_user_dir(home_dir);
+	g_free(home_dir);
+
+	gaim_core_init("check");
+}
+
+/******************************************************************************
+ * Check meat and potatoes
+ *****************************************************************************/
+Suite*
+master_suite(void)
+{
+	Suite *s = suite_create("Master Suite");
+
+	return s;
+}
+
+int main(void)
+{
+	int number_failed;
+	SRunner *sr = srunner_create (master_suite());
+
+	srunner_add_suite(sr, cipher_suite());
+	srunner_add_suite(sr, jabber_jutil_suite());
+	srunner_add_suite(sr, util_suite());
+
+	/* make this a libpurple "ui" */
+	gaim_check_init();
+
+	srunner_run_all (sr, CK_NORMAL);
+	number_failed = srunner_ntests_failed (sr);
+	srunner_free (sr);
+
+	gaim_core_quit();
+
+	return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
--- a/libpurple/tests/tests.h	Sat Mar 17 16:55:51 2007 +0000
+++ b/libpurple/tests/tests.h	Sat Mar 17 17:29:40 2007 +0000
@@ -5,7 +5,7 @@
 #include <check.h>
 
 /* define the test suites here */
-/* remember to add the suite to the runner in check_libgaim.c */
+/* remember to add the suite to the runner in check_libpurple.c */
 Suite * cipher_suite(void);
 Suite * jabber_jutil_suite(void);
 Suite * util_suite(void);