summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2012-10-07 23:35:56 +0200
committerSebastian Geerken <devnull@localhost>2012-10-07 23:35:56 +0200
commit2cd28ca74309f81d295a0860a140e030ee7f80d3 (patch)
tree3d7463a12a2c17123ce15070eb44a8a8df9e2e3e /test
parent177612b46579076ca5a7ddaffb96083d40d0dc06 (diff)
parentd1179582ee86f08fbc23d2363df7a794324095e8 (diff)
Merge with main repo.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am10
-rw-r--r--test/trie.cc17
2 files changed, 27 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index bc851247..ab4c98b0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -24,6 +24,7 @@ noinst_PROGRAMS = \
shapes \
cookies \
liang \
+ trie \
notsosimplevector
dw_anchors_test_SOURCES = dw_anchors_test.cc
@@ -180,6 +181,15 @@ liang_LDADD = \
$(top_builddir)/lout/liblout.a \
@LIBFLTK_LIBS@
+trie_SOURCES = trie.cc
+
+trie_LDADD = \
+ $(top_builddir)/dw/libDw-widgets.a \
+ $(top_builddir)/dw/libDw-fltk.a \
+ $(top_builddir)/dw/libDw-core.a \
+ $(top_builddir)/lout/liblout.a \
+ @LIBFLTK_LIBS@
+
notsosimplevector_SOURCES = notsosimplevector.cc
notsosimplevector_LDADD = $(top_builddir)/lout/liblout.a
diff --git a/test/trie.cc b/test/trie.cc
new file mode 100644
index 00000000..943b8045
--- /dev/null
+++ b/test/trie.cc
@@ -0,0 +1,17 @@
+#include "../dw/fltkcore.hh"
+#include "../dw/hyphenator.hh"
+
+int main (int argc, char *argv[])
+{
+ dw::fltk::FltkPlatform p;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: trie <pattern file>\n");
+ exit (1);
+ }
+
+ /* Use pack = 1024 to create a really small trie - can take a while.
+ */
+ dw::Hyphenator hyphenator (&p, argv[1], NULL, 1024);
+ hyphenator.saveTrie (stdout);
+}