[libpeas] Created libtesting-util for common libtesting code



commit 08fc6bbe0bc4453ca521b4267a4af895bd7ba21c
Author: Garrett Regier <alias301 gmail com>
Date:   Fri Mar 4 05:58:02 2011 -0800

    Created libtesting-util for common libtesting code

 configure.ac                          |    1 +
 tests/Makefile.am                     |    4 +-
 tests/libpeas-gtk/Makefile.am         |    4 +-
 tests/libpeas-gtk/testing/Makefile.am |    4 +-
 tests/libpeas-gtk/testing/testing.c   |  100 +-------------------
 tests/libpeas-gtk/testing/testing.h   |    8 +-
 tests/libpeas/Makefile.am             |   12 ++-
 tests/libpeas/testing/Makefile.am     |    4 +-
 tests/libpeas/testing/testing.c       |  113 +----------------------
 tests/libpeas/testing/testing.h       |    7 +-
 tests/testing-util/Makefile.am        |   21 ++++
 tests/testing-util/testing-util.c     |  163 +++++++++++++++++++++++++++++++++
 tests/testing-util/testing-util.h     |   38 ++++++++
 13 files changed, 258 insertions(+), 221 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 208c52a..3cdb0d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@ tests/plugins/builtin/Makefile
 tests/plugins/has-dep/Makefile
 tests/plugins/loadable/Makefile
 tests/plugins/self-dep/Makefile
+tests/testing-util/Makefile
 ])
 
 AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index db618c8..ba63eb9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
 GTESTER_REPORT = gtester-report
 
-SUBDIRS = plugins libpeas
+SUBDIRS = plugins testing-util libpeas
 
 if ENABLE_GTK
 SUBDIRS += libpeas-gtk
@@ -8,7 +8,7 @@ endif
 
 test test-gdb test-valgrind test-callgrind:
 	@for subdir in $(SUBDIRS) ; do \
-	   test "$$subdir" = "plugins" || \
+	   test "$$subdir" = "plugins" -o "$$subdir" = "testing-util" || \
 	   ( cd $$subdir && \
 	     if ! $(MAKE) $(AM_MAKEFLAGS) -n run-test-hook 2>/dev/null 1>&2 ; then \
 	       $(MAKE) $(AM_MAKEFLAGS) $(@) ; \
diff --git a/tests/libpeas-gtk/Makefile.am b/tests/libpeas-gtk/Makefile.am
index 661137e..59fc516 100644
--- a/tests/libpeas-gtk/Makefile.am
+++ b/tests/libpeas-gtk/Makefile.am
@@ -8,6 +8,7 @@ run-test-hook:
 INCLUDES = \
 	-I$(top_srcdir)			\
 	-I$(srcdir)			\
+	-I$(srcdir)/../testing-util	\
 	$(PEAS_CFLAGS)			\
 	$(PEAS_GTK_CFLAGS)		\
 	$(WARN_CFLAGS)			\
@@ -20,7 +21,8 @@ progs_ldadd = \
 	$(PEAS_GTK_LIBS)				\
 	$(top_builddir)/libpeas/libpeas-1.0.la		\
 	$(top_builddir)/libpeas-gtk/libpeas-gtk-1.0.la	\
-	./testing/libtesting.la
+	./testing/libtesting.la				\
+	../testing-util/libtesting-util.la
 
 TEST_PROGS += \
 	plugin-manager		\
diff --git a/tests/libpeas-gtk/testing/Makefile.am b/tests/libpeas-gtk/testing/Makefile.am
index d7a3a63..090a58d 100644
--- a/tests/libpeas-gtk/testing/Makefile.am
+++ b/tests/libpeas-gtk/testing/Makefile.am
@@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libtesting.la
 INCLUDES = \
 	-I$(top_srcdir)				\
 	-I$(srcdir)				\
+	-I$(srcdir)/../../testing-util		\
 	$(PEAS_CFLAGS)				\
 	$(PEAS_GTK_CFLAGS)			\
 	$(WARN_CFLAGS)				\
@@ -17,6 +18,7 @@ libtesting_la_LIBADD = \
 	$(PEAS_LIBS)					\
 	$(PEAS_GTK_LIBS)				\
 	$(top_builddir)/libpeas/libpeas-1.0.la		\
-	$(top_builddir)/libpeas-gtk/libpeas-gtk-1.0.la
+	$(top_builddir)/libpeas-gtk/libpeas-gtk-1.0.la	\
+	../../testing-util/libtesting-util.la
 
 libtesting_la_SOURCES = testing.c testing.h
diff --git a/tests/libpeas-gtk/testing/testing.c b/tests/libpeas-gtk/testing/testing.c
index 0ba277b..f102334 100644
--- a/tests/libpeas-gtk/testing/testing.c
+++ b/tests/libpeas-gtk/testing/testing.c
@@ -27,61 +27,10 @@
 
 #include <glib.h>
 #include <girepository.h>
-
-#include "libpeas/peas-engine-priv.h"
+#include <testing-util.h>
 
 #include "testing.h"
 
-static PeasEngine *engine = NULL;
-static GLogFunc default_log_func;
-
-/* These are warning that just have to happen for testing
- * purposes and as such we don't want to abort on them.
- *
- * Would be nice if we could assert that they were...
- */
-static const gchar *allowed_patterns[] = {
-  "*Plugin not found: does-not-exist*",
-  "*Error while loading icon*does-not-exist*",
-  "*libcloader.so*cannot open shared object file: No such file or directory*",
-};
-
-static void
-log_handler (const gchar    *log_domain,
-             GLogLevelFlags  log_level,
-             const gchar    *message,
-             gpointer        user_data)
-{
-  gint i;
-
-  if ((log_level & G_LOG_LEVEL_DEBUG) != 0 ||
-      (log_level & G_LOG_LEVEL_INFO) != 0 ||
-      (log_level & G_LOG_LEVEL_MESSAGE) != 0)
-    {
-      default_log_func (log_domain, log_level, message, user_data);
-      return;
-    }
-
-  if ((log_level & G_LOG_LEVEL_CRITICAL) != 0 ||
-      (log_level & G_LOG_LEVEL_ERROR) != 0)
-    {
-      goto out;
-    }
-
-  for (i = 0; i < G_N_ELEMENTS (allowed_patterns); ++i)
-    {
-      if (g_pattern_match_simple (allowed_patterns[i], message))
-        return;
-    }
-
-out:
-
-  default_log_func (log_domain, log_level, message, user_data);
-
-  /* Make sure we abort for warnings */
-  abort ();
-}
-
 void
 testing_init (void)
 {
@@ -91,18 +40,10 @@ testing_init (void)
   if (initialized)
     return;
 
-  /* Don't always abort on warnings */
-  g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+  testing_util_init ();
 
-  default_log_func = g_log_set_default_handler (log_handler, NULL);
-
-  g_irepository_prepend_search_path (BUILDDIR "/libpeas");
   g_irepository_prepend_search_path (BUILDDIR "/libpeas-gtk");
 
-  g_setenv ("PEAS_PLUGIN_LOADERS_DIR", BUILDDIR "/loaders", TRUE);
-
-  g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error);
-  g_assert_no_error (error);
   g_irepository_require (g_irepository_get_default (), "PeasGtk", "1.0", 0, &error);
   g_assert_no_error (error);
 
@@ -112,52 +53,19 @@ testing_init (void)
 PeasEngine *
 testing_engine_new (void)
 {
-  if (engine != NULL)
-    return engine;
+  PeasEngine *engine;
 
   testing_init ();
 
   /* Must be after requiring typelibs */
-  engine = peas_engine_new ();
+  engine = testing_util_engine_new ();
 
-  g_object_add_weak_pointer (G_OBJECT (engine), (gpointer *) &engine);
-
-  peas_engine_add_search_path (engine, BUILDDIR "/tests/plugins",
-                                       SRCDIR   "/tests/plugins");
   peas_engine_add_search_path (engine, BUILDDIR "/tests/libpeas-gtk/plugins",
                                        SRCDIR   "/tests/libpeas-gtk/plugins");
 
   return engine;
 }
 
-void
-testing_engine_free (PeasEngine *engine_)
-{
-  /* Incase a test needs to free the engine */
-  if (engine != NULL)
-    {
-      g_object_unref (engine_);
-
-      /* Make sure that at the end of every test the engine is freed */
-      g_assert (engine == NULL);
-    }
-}
-
-int
-testing_run_tests (void)
-{
-  int retval;
-
-  retval = g_test_run ();
-
-  /* Cannot call this with atexit() because
-   * gcov does not register that it was called.
-   */
-  peas_engine_shutdown ();
-
-  return retval;
-}
-
 PeasPluginInfo *
 testing_get_plugin_info_for_iter (PeasGtkPluginManagerView *view,
                                   GtkTreeIter              *iter)
diff --git a/tests/libpeas-gtk/testing/testing.h b/tests/libpeas-gtk/testing/testing.h
index 1440acd..075cbb5 100644
--- a/tests/libpeas-gtk/testing/testing.h
+++ b/tests/libpeas-gtk/testing/testing.h
@@ -24,15 +24,13 @@
 
 #include <libpeas/peas.h>
 #include <libpeas-gtk/peas-gtk.h>
+#include <testing-util.h>
 
 G_BEGIN_DECLS
 
 void            testing_init                     (void);
 
 PeasEngine     *testing_engine_new               (void);
-void            testing_engine_free              (PeasEngine *engine);
-
-int             testing_run_tests                (void);
 
 PeasPluginInfo *testing_get_plugin_info_for_iter (PeasGtkPluginManagerView *view,
                                                   GtkTreeIter              *iter);
@@ -42,6 +40,10 @@ gboolean        testing_get_iter_for_plugin_info (PeasGtkPluginManagerView *view
 
 void            testing_show_widget              (gpointer                  widget);
 
+/* libtesting-util functions which do not need to be overridden */
+#define testing_engine_free testing_util_engine_free
+#define testing_run_tests   testing_util_run_tests
+
 G_END_DECLS
 
 #endif /* __TESTING_H__ */
diff --git a/tests/libpeas/Makefile.am b/tests/libpeas/Makefile.am
index 9759355..c2b7dbe 100644
--- a/tests/libpeas/Makefile.am
+++ b/tests/libpeas/Makefile.am
@@ -3,10 +3,11 @@ include $(top_srcdir)/tests/Makefile.tests
 SUBDIRS = introspection plugins testing
 
 INCLUDES = \
-	-I$(top_srcdir)		\
-	-I$(srcdir)		\
-	$(PEAS_CFLAGS)		\
-	$(WARN_CFLAGS)		\
+	-I$(top_srcdir)			\
+	-I$(srcdir)			\
+	-I$(srcdir)/../testing-util	\
+	$(PEAS_CFLAGS)			\
+	$(WARN_CFLAGS)			\
 	$(DISABLE_DEPRECATED)
 
 noinst_PROGRAMS = $(TEST_PROGS)
@@ -14,8 +15,9 @@ noinst_PROGRAMS = $(TEST_PROGS)
 progs_ldadd = \
 	$(PEAS_LIBS)				\
 	$(top_builddir)/libpeas/libpeas-1.0.la	\
+	./introspection/libintrospection-1.0.la	\
 	./testing/libtesting.la			\
-	./introspection/libintrospection-1.0.la
+	../testing-util/libtesting-util.la
 
 
 TEST_PROGS     += engine
diff --git a/tests/libpeas/testing/Makefile.am b/tests/libpeas/testing/Makefile.am
index c8b8388..ff2908e 100644
--- a/tests/libpeas/testing/Makefile.am
+++ b/tests/libpeas/testing/Makefile.am
@@ -2,6 +2,7 @@ INCLUDES = \
 	-I$(top_srcdir)				\
 	-I$(srcdir)				\
 	-I$(srcdir)/../introspection		\
+	-I$(srcdir)/../../testing-util		\
 	$(PEAS_CFLAGS)				\
 	$(WARN_CFLAGS)				\
 	$(DISABLE_DEPRECATED)			\
@@ -16,7 +17,8 @@ libtesting_la_LDFLAGS = \
 libtesting_la_LIBADD = \
 	$(PEAS_LIBS)					\
 	$(top_builddir)/libpeas/libpeas-1.0.la		\
-	../introspection/libintrospection-1.0.la
+	../introspection/libintrospection-1.0.la	\
+	../../testing-util/libtesting-util.la
 
 libtesting_la_SOURCES = \
 	testing.c		\
diff --git a/tests/libpeas/testing/testing.c b/tests/libpeas/testing/testing.c
index 8e4a282..93fd284 100644
--- a/tests/libpeas/testing/testing.c
+++ b/tests/libpeas/testing/testing.c
@@ -27,70 +27,10 @@
 
 #include <glib.h>
 #include <girepository.h>
-
-#include "libpeas/peas-engine-priv.h"
+#include <testing-util.h>
 
 #include "testing.h"
 
-static PeasEngine *engine = NULL;
-static GLogFunc default_log_func;
-
-/* These are warning that just have to happen for testing
- * purposes and as such we don't want to abort on them.
- *
- * Would be nice if we could assert that they were...
- */
-static const gchar *allowed_patterns[] = {
-  "*does-not-exist*",
-  "*lib*loader.so*cannot open shared object file: No such file or directory*",
-  "*Could not find 'IAge' in *info-missing-iage.plugin*",
-  "*Could not find 'Module' in *info-missing-module.plugin*",
-  "*Could not find 'Name' in *info-missing-name.plugin*",
-  "*Error loading *info-missing-iage.plugin*",
-  "*Error loading *info-missing-module.plugin*",
-  "*Error loading *info-missing-name.plugin*",
-  "*Could not find loader 'disabled'*",
-  "*Could not find loader 'invalid'*",
-  "*Bad plugin file: *invalid.plugin*",
-  "*Error loading *invalid.plugin*"
-};
-
-static void
-log_handler (const gchar    *log_domain,
-             GLogLevelFlags  log_level,
-             const gchar    *message,
-             gpointer        user_data)
-{
-  gint i;
-
-  if ((log_level & G_LOG_LEVEL_DEBUG) != 0 ||
-      (log_level & G_LOG_LEVEL_INFO) != 0 ||
-      (log_level & G_LOG_LEVEL_MESSAGE) != 0)
-    {
-      default_log_func (log_domain, log_level, message, user_data);
-      return;
-    }
-
-  if ((log_level & G_LOG_LEVEL_CRITICAL) != 0 ||
-      (log_level & G_LOG_LEVEL_ERROR) != 0)
-    {
-      goto out;
-    }
-
-  for (i = 0; i < G_N_ELEMENTS (allowed_patterns); ++i)
-    {
-      if (g_pattern_match_simple (allowed_patterns[i], message))
-        return;
-    }
-
-out:
-
-  default_log_func (log_domain, log_level, message, user_data);
-
-  /* Make sure we abort for warnings */
-  abort ();
-}
-
 void
 testing_init (void)
 {
@@ -100,71 +40,26 @@ testing_init (void)
   if (initialized)
     return;
 
-  /* Don't always abort on warnings */
-  g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
-
-  default_log_func = g_log_set_default_handler (log_handler, NULL);
-
-  g_irepository_prepend_search_path (BUILDDIR "/libpeas");
-
-  g_setenv ("PEAS_PLUGIN_LOADERS_DIR", BUILDDIR "/loaders", TRUE);
-
-  g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error);
-  g_assert_no_error (error);
+  testing_util_init ();
 
   g_irepository_require_private (g_irepository_get_default (),
                                  BUILDDIR "/tests/libpeas/introspection",
                                  "Introspection", "1.0", 0, &error);
   g_assert_no_error (error);
-
-  initialized = TRUE;
 }
 
 PeasEngine *
 testing_engine_new (void)
 {
-  if (engine != NULL)
-    return engine;
+  PeasEngine *engine;
 
   testing_init ();
 
   /* Must be after requiring typelibs */
-  engine = peas_engine_new ();
+  engine = testing_util_engine_new ();
 
-  g_object_add_weak_pointer (G_OBJECT (engine), (gpointer *) &engine);
-
-  peas_engine_add_search_path (engine, BUILDDIR "/tests/plugins",
-                                       SRCDIR   "/tests/plugins");
   peas_engine_add_search_path (engine, BUILDDIR "/tests/libpeas/plugins",
                                        SRCDIR   "/tests/libpeas/plugins");
 
   return engine;
 }
-
-void
-testing_engine_free (PeasEngine *engine_)
-{
-  /* Incase a test needs to free the engine */
-  if (engine != NULL)
-    {
-      g_object_unref (engine_);
-
-      /* Make sure that at the end of every test the engine is freed */
-      g_assert (engine == NULL);
-    }
-}
-
-int
-testing_run_tests (void)
-{
-  int retval;
-
-  retval = g_test_run ();
-
-  /* Cannot call this with atexit() because
-   * gcov does not register that it was called.
-   */
-  peas_engine_shutdown ();
-
-  return retval;
-}
diff --git a/tests/libpeas/testing/testing.h b/tests/libpeas/testing/testing.h
index 208d7a9..3b08879 100644
--- a/tests/libpeas/testing/testing.h
+++ b/tests/libpeas/testing/testing.h
@@ -23,16 +23,17 @@
 #define __TESTING_H__
 
 #include <libpeas/peas-engine.h>
+#include <testing-util.h>
 
 G_BEGIN_DECLS
 
 void        testing_init        (void);
 
 PeasEngine *testing_engine_new  (void);
-void        testing_engine_free (PeasEngine *engine);
-
-int         testing_run_tests   (void);
 
+/* libtesting-util functions which do not need to be overridden */
+#define testing_engine_free testing_util_engine_free
+#define testing_run_tests   testing_util_run_tests
 
 G_END_DECLS
 
diff --git a/tests/testing-util/Makefile.am b/tests/testing-util/Makefile.am
new file mode 100644
index 0000000..99513db
--- /dev/null
+++ b/tests/testing-util/Makefile.am
@@ -0,0 +1,21 @@
+INCLUDES = \
+	-I$(top_srcdir)				\
+	-I$(srcdir)				\
+	$(PEAS_CFLAGS)				\
+	$(WARN_CFLAGS)				\
+	$(DISABLE_DEPRECATED)			\
+	-DBUILDDIR="\"$(abs_top_builddir)\""	\
+	-DSRCDIR="\"$(abs_top_srcdir)\""
+
+noinst_LTLIBRARIES = libtesting-util.la
+
+libtesting_util_la_LDFLAGS = \
+	-export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
+
+libtesting_util_la_LIBADD = \
+	$(PEAS_LIBS)					\
+	$(top_builddir)/libpeas/libpeas-1.0.la
+
+libtesting_util_la_SOURCES = \
+	testing-util.c		\
+	testing-util.h
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
new file mode 100644
index 0000000..3a7a254
--- /dev/null
+++ b/tests/testing-util/testing-util.c
@@ -0,0 +1,163 @@
+/*
+ * testing-util.c
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2011 - Garrett Regier
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Library General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <glib.h>
+#include <girepository.h>
+
+#include "libpeas/peas-engine-priv.h"
+
+#include "testing-util.h"
+
+static PeasEngine *engine = NULL;
+static GLogFunc default_log_func;
+
+/* These are warning that just have to happen for testing
+ * purposes and as such we don't want to abort on them.
+ *
+ * Would be nice if we could assert that they were...
+ */
+static const gchar *allowed_patterns[] = {
+  "*does-not-exist*",
+  "*lib*loader.so*cannot open shared object file: No such file or directory*",
+  "*Could not find 'IAge' in *info-missing-iage.plugin*",
+  "*Could not find 'Module' in *info-missing-module.plugin*",
+  "*Could not find 'Name' in *info-missing-name.plugin*",
+  "*Error loading *info-missing-iage.plugin*",
+  "*Error loading *info-missing-module.plugin*",
+  "*Error loading *info-missing-name.plugin*",
+  "*Could not find loader 'disabled'*",
+  "*Could not find loader 'invalid'*",
+  "*Bad plugin file: *invalid.plugin*",
+  "*Error loading *invalid.plugin*"
+};
+
+static void
+log_handler (const gchar    *log_domain,
+             GLogLevelFlags  log_level,
+             const gchar    *message,
+             gpointer        user_data)
+{
+  gint i;
+
+  if ((log_level & G_LOG_LEVEL_DEBUG) != 0 ||
+      (log_level & G_LOG_LEVEL_INFO) != 0 ||
+      (log_level & G_LOG_LEVEL_MESSAGE) != 0)
+    {
+      default_log_func (log_domain, log_level, message, user_data);
+      return;
+    }
+
+  if ((log_level & G_LOG_LEVEL_CRITICAL) != 0 ||
+      (log_level & G_LOG_LEVEL_ERROR) != 0)
+    {
+      goto out;
+    }
+
+  for (i = 0; i < G_N_ELEMENTS (allowed_patterns); ++i)
+    {
+      if (g_pattern_match_simple (allowed_patterns[i], message))
+        return;
+    }
+
+out:
+
+  default_log_func (log_domain, log_level, message, user_data);
+
+  /* Make sure we abort for warnings */
+  abort ();
+}
+
+void
+testing_util_init (void)
+{
+  GError *error = NULL;
+  static gboolean initialized = FALSE;
+
+  if (initialized)
+    return;
+
+  /* Don't always abort on warnings */
+  g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+
+  default_log_func = g_log_set_default_handler (log_handler, NULL);
+
+  g_irepository_prepend_search_path (BUILDDIR "/libpeas");
+
+  g_setenv ("PEAS_PLUGIN_LOADERS_DIR", BUILDDIR "/loaders", TRUE);
+
+  g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error);
+  g_assert_no_error (error);
+
+  initialized = TRUE;
+}
+
+PeasEngine *
+testing_util_engine_new (void)
+{
+  if (engine != NULL)
+    return engine;
+
+  testing_util_init ();
+
+  /* Must be after requiring typelibs */
+  engine = peas_engine_new ();
+
+  g_object_add_weak_pointer (G_OBJECT (engine), (gpointer *) &engine);
+
+  peas_engine_add_search_path (engine, BUILDDIR "/tests/plugins",
+                                       SRCDIR   "/tests/plugins");
+
+  return engine;
+}
+
+void
+testing_util_engine_free (PeasEngine *engine_)
+{
+  /* Incase a test needs to free the engine */
+  if (engine != NULL)
+    {
+      g_object_unref (engine_);
+
+      /* Make sure that at the end of every test the engine is freed */
+      g_assert (engine == NULL);
+    }
+}
+
+int
+testing_util_run_tests (void)
+{
+  int retval;
+
+  retval = g_test_run ();
+
+  /* Cannot call this with atexit() because
+   * gcov does not register that it was called.
+   */
+  peas_engine_shutdown ();
+
+  return retval;
+}
diff --git a/tests/testing-util/testing-util.h b/tests/testing-util/testing-util.h
new file mode 100644
index 0000000..bc88b9b
--- /dev/null
+++ b/tests/testing-util/testing-util.h
@@ -0,0 +1,38 @@
+/*
+ * testing-util.h
+ * This file is part of libpeas
+ *
+ * Copyright (C) 2011 - Garrett Regier
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Library General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __TESTING_UTIL_H__
+#define __TESTING_UTIL_H__
+
+#include <libpeas/peas-engine.h>
+
+G_BEGIN_DECLS
+
+void        testing_util_init        (void);
+
+PeasEngine *testing_util_engine_new  (void);
+void        testing_util_engine_free (PeasEngine *engine);
+
+int         testing_util_run_tests   (void);
+
+G_END_DECLS
+
+#endif /* __TESTING_UTIL_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]