summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-04-15 16:16:32 +0800
committerPeng Wu <alexepico@gmail.com>2015-04-15 16:16:32 +0800
commit92c3f5a62c3a1603ecddcd18381843fe3b403144 (patch)
tree1786186a9cd98a638768599720f22d8e261e45ca /tests
parent9f6e89adbe37bd10bb8049cea03d890696e7de3d (diff)
downloadlibpinyin-92c3f5a62c3a1603ecddcd18381843fe3b403144.zip
libpinyin-92c3f5a62c3a1603ecddcd18381843fe3b403144.tar.gz
libpinyin-92c3f5a62c3a1603ecddcd18381843fe3b403144.tar.xz
update test_ngram
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/Makefile.am4
-rw-r--r--tests/storage/test_ngram.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/storage/Makefile.am b/tests/storage/Makefile.am
index 7675d11..8aec6ba 100644
--- a/tests/storage/Makefile.am
+++ b/tests/storage/Makefile.am
@@ -24,6 +24,10 @@ INCLUDES = -I$(top_srcdir)/src \
LDADD = ../../src/libpinyin_internal.la @GLIB2_LIBS@
+if KYOTOCABINET
+LDADD += @KYOTOCABINET_LIBS@
+endif
+
TESTS = test_phrase_index_logger \
test_ngram \
test_flexible_ngram
diff --git a/tests/storage/test_ngram.cpp b/tests/storage/test_ngram.cpp
index f82cf1f..0313f1c 100644
--- a/tests/storage/test_ngram.cpp
+++ b/tests/storage/test_ngram.cpp
@@ -29,8 +29,8 @@ int main(int argc, char * argv[]){
range.m_range_begin = 0; range.m_range_end = 8;
single_gram.search(&range,array);
for ( size_t i = 0; i < array->len; ++i){
- BigramPhraseItem * item = &g_array_index(array, BigramPhraseItem, i);
- printf("item:%d:%f\n", item->m_token, item->m_freq);
+ BigramPhraseItem * item = &g_array_index(array, BigramPhraseItem, i);
+ printf("item:%d:%f\n", item->m_token, item->m_freq);
}
assert(single_gram.get_total_freq(freq));