remove enchant bindings test, we focus on compiler tests
authorJuerg Billeter <j@bitron.ch>
Thu, 29 Nov 2007 15:07:40 +0000 (15:07 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 29 Nov 2007 15:07:40 +0000 (15:07 +0000)
2007-11-29  Juerg Billeter  <j@bitron.ch>

* configure.ac, tests/Makefile.am, tests/testenchant.vala: remove
  enchant bindings test, we focus on compiler tests

svn path=/trunk/; revision=737

ChangeLog
configure.ac
tests/Makefile.am
tests/testenchant.vala [deleted file]

index ba5ea6f..ae886d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-11-29  Jürg Billeter  <j@bitron.ch>
 
+       * configure.ac, tests/Makefile.am, tests/testenchant.vala: remove
+         enchant bindings test, we focus on compiler tests
+
+2007-11-29  Jürg Billeter  <j@bitron.ch>
+
        * ccode/Makefile.am, compiler/Makefile.am, gee/Makefile.am,
          gen-project/Makefile.am, gobject/Makefile.am, vala/Makefile.am,
          vapigen/Makefile.am: fix distcheck
index 084e780..8bd775b 100644 (file)
@@ -35,7 +35,6 @@ AM_CONDITIONAL(ENABLE_GEN_PROJECT, test x$enable_gen_project = xyes)
 
 GLIB_REQUIRED=2.12.0
 GTK_REQUIRED=2.10.0
-ENCHANT_REQUIRED=1.3.0
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
 
@@ -62,12 +61,6 @@ AC_SUBST(GTK_LIBS)
 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
 
-PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, have_enchant=yes, have_enchant=no)
-AM_CONDITIONAL(HAVE_ENCHANT, test x$have_enchant = xyes)
-
-AC_SUBST(ENCHANT_CFLAGS)
-AC_SUBST(ENCHANT_LIBS)
-
 AC_CONFIG_FILES([Makefile
            vala-1.0.pc
            gee/Makefile
index 149eb20..a586fc1 100644 (file)
@@ -2,11 +2,9 @@ NULL =
 
 AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
-       $(ENCHANT_CFLAGS) \
        $(NULL)
 AM_LDFLAGS = \
        $(GLIB_LIBS) \
-       $(ENCHANT_LIBS) \
        $(NULL)
 
 BUILT_SOURCES = \
@@ -14,25 +12,6 @@ BUILT_SOURCES = \
 noinst_PROGRAMS = \
        $(NULL)
 
-if HAVE_ENCHANT
-BUILT_SOURCES += testenchant.stamp
-noinst_PROGRAMS += testenchant
-endif
-
-testenchant_VALASOURCES = \
-       testenchant.vala \
-       $(NULL)
-
-testenchant_SOURCES = \
-       testenchant.stamp \
-       $(testenchant_VALASOURCES:.vala=.c) \
-       $(testenchant_VALASOURCES:.vala=.h) \
-       $(NULL)
-
-testenchant.stamp: $(testenchant_VALASOURCES)
-       $(VALAC) --vapidir $(srcdir)/../vapi --pkg enchant $^
-       touch $@
-
 TESTS_ENVIRONMENT = $(srcdir)/testrunner.sh
 
 TESTS = \
@@ -126,8 +105,5 @@ EXTRA_DIST = \
        test-035.exp \
        test-036.exp \
        test-037.exp \
-       \
-       testenchant.stamp \
-       testenchant.vala \
        $(NULL)
 
diff --git a/tests/testenchant.vala b/tests/testenchant.vala
deleted file mode 100644 (file)
index 67aa0ec..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-using Enchant;
-using GLib;
-
-class TestEnchant : Object {
-       static void info (string message) {
-               stdout.printf ("INFO: %s\n", message);
-       }
-
-       static void test (string message, bool result) {
-               stdout.printf ("TEST: %s: %s\n", message, result ? "SUCCESS" : "FAILURE");
-       }
-
-       static void main (string[] args) {
-               Broker broker = new Broker ();
-               weak Dict dict;
-
-               info ("providers for broker %p".printf (broker));
-               broker.describe (broker_describe_cb);
-
-               info ("dictionaries for broker %p".printf (broker));
-               broker.list_dicts (dict_describe_cb);
-
-               dict = broker.request_dict ("invalid-tag");
-
-               test ("requesting invalid dictionary", null == dict);
-               info ("broker error message".printf (broker.get_error ()));
-
-               dict = broker.request_dict ("en");
-
-               test ("requesting english dictionary", null != dict);
-               test ("broker error is null", null == broker.get_error ());
-
-               info ("description of dictionary %p".printf (dict));
-               dict.describe (dict_describe_cb);
-
-               var text = "The quick prown fox jummps over the lasy dok".split (" ");
-
-               foreach (string word in text) {
-                       weak string[] suggestions;
-                       string result;
-
-do { // FIXME: Bug 467896
-                       switch (dict.check (word)) {
-                               case 0:
-                                       result = "good";
-                                       break;
-
-                               case 1:
-                                       suggestions = dict.suggest (word);
-                                       result = "bad (%d suggestions: %s)".printf (suggestions.length, string.joinv (", ", suggestions));
-                                       break;
-
-                               case -1:
-                                       result = "error: %s".printf (dict.get_error ());
-                                       break;
-
-                               default:
-                                       assert_not_reached ();
-                                       break;
-                       }
-} while (false);
-
-                       info ("%s: %s".printf (word, result));
-               }
-
-               var bad_word = "the:colons:make:this:a:bad:word";
-               int result;
-
-               result = dict.is_in_session (bad_word);
-               test ("bad word is not in session", 0 == result);
-
-               result = dict.check (bad_word);
-               test ("bad word is rejected", 1 == result);
-
-               info ("adding bad word to session");
-               dict.add_to_session (bad_word);
-
-               result = dict.is_in_session (bad_word);
-               test ("bad word is in session now", 1 == result);
-
-               result = dict.check (bad_word);
-               test ("bad word is accepted now", 0 == result);
-
-               broker.free_dict (dict);
-               dict = null;
-       }
-
-       static void broker_describe_cb (string name, string desc, string libname) {
-               info ("- %s (%s) - %s".printf (name, desc, libname));
-       }
-
-       static void dict_describe_cb (string language, string provider_name, string provider_desc, string provider_libname) {
-               info ("- %s (%s) - %s".printf (language, provider_desc, provider_libname));
-       }
-}