add test phrase lookup
authorPeng Wu <alexepico@gmail.com>
Wed, 20 Jul 2011 10:10:58 +0000 (18:10 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 20 Jul 2011 10:10:58 +0000 (18:10 +0800)
tests/lookup/Makefile.am
tests/lookup/test_phrase_lookup.cpp [new file with mode: 0644]
utils/segment/ngseg.cpp

index 9e8cef4..6887605 100644 (file)
@@ -21,8 +21,12 @@ INCLUDES                = -I$(top_srcdir)/src \
                           -I$(top_srcdir)/src/lookup \
                           @GLIB2_CPPFLAGS@
 
-noinst_PROGRAMS          = test_simple_lookup 
+noinst_PROGRAMS          = test_simple_lookup test_phrase_lookup
 
 test_simple_lookup_SOURCES = test_simple_lookup.cpp
 
 test_simple_lookup_LDADD   = ../../src/libpinyin.la @GLIB2_LDFLAGS@
+
+test_phrase_lookup_SOURCES = test_phrase_lookup.cpp
+
+test_phrase_lookup_LDADD   = ../../src/libpinyin.la @GLIB2_LDFLAGS@
\ No newline at end of file
diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp
new file mode 100644 (file)
index 0000000..d2519c4
--- /dev/null
@@ -0,0 +1,5 @@
+#include <stdio.h>
+#include "pinyin.h"
+
+int main(int argc, char * argv[]){
+}
index c909310..b236f1f 100644 (file)
@@ -73,7 +73,7 @@ bool deal_with_segmentable(GArray * current_utf16){
         char * tmp_string = g_utf16_to_utf8
             ( (utf16_t *) current_utf16->data, current_utf16->len,
               NULL, NULL, NULL);
-        fprintf(stderr, "Un-segmentable sentence encountered:%s.\n",
+        fprintf(stderr, "Un-segmentable sentence encountered:%s\n",
                 tmp_string);
         g_array_free(results, TRUE);
         return false;