summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-30 12:46:39 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-30 12:46:39 +0800
commitddfd94c68310d2b8016de24f578145aff324482b (patch)
tree04db0fc28b6da70d3ad3df382180d6e48df7ff98 /tests
parent4f3150e44d8da95a0ff28e461c780abc2b472e5a (diff)
downloadlibpinyin-ddfd94c68310d2b8016de24f578145aff324482b.tar.gz
libpinyin-ddfd94c68310d2b8016de24f578145aff324482b.tar.xz
libpinyin-ddfd94c68310d2b8016de24f578145aff324482b.zip
fixes test chewing
Diffstat (limited to 'tests')
-rw-r--r--tests/test_chewing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 4d3a054..2a2674e 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -46,7 +46,8 @@ int main(int argc, char * argv[]){
char * sentence = NULL;
pinyin_get_sentence (instance, &sentence);
- printf("%s\n", sentence);
+ if (sentence)
+ printf("%s\n", sentence);
g_free(sentence);
pinyin_train(instance);