summaryrefslogtreecommitdiffstats
path: root/tests/test_chewing.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-07-04 16:13:18 +0800
committerPeng Wu <alexepico@gmail.com>2016-07-04 16:13:18 +0800
commit92b3978e1b98fefbf19a32be7a2a165faa47b4f5 (patch)
tree22c55521feba96c28be252e700459d9af7c9a8f2 /tests/test_chewing.cpp
parent8bb2978cfe90b179f60bd242434eb397d9fa380a (diff)
downloadlibpinyin-92b3978e1b98fefbf19a32be7a2a165faa47b4f5.tar.gz
libpinyin-92b3978e1b98fefbf19a32be7a2a165faa47b4f5.tar.xz
libpinyin-92b3978e1b98fefbf19a32be7a2a165faa47b4f5.zip
update test cases
Diffstat (limited to 'tests/test_chewing.cpp')
-rw-r--r--tests/test_chewing.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 5a5701f..3243e1f 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -39,11 +39,10 @@ int main(int argc, char * argv[]){
linebuf[strlen(linebuf) - 1] = '\0';
}
- if ( strcmp ( linebuf, "quit" ) == 0)
+ if ( strcmp ( linebuf, "quit" ) == 0)
break;
- pinyin_parse_more_chewings
- (instance, linebuf);
+ size_t len = pinyin_parse_more_chewings(instance, linebuf);
pinyin_guess_sentence(instance);
char * sentence = NULL;
@@ -52,6 +51,11 @@ int main(int argc, char * argv[]){
printf("%s\n", sentence);
g_free(sentence);
+ gchar * aux_text = NULL;
+ pinyin_get_chewing_auxiliary_text(instance, len, &aux_text);
+ printf("auxiliary text:%s\n", aux_text);
+ g_free(aux_text);
+
pinyin_train(instance);
pinyin_reset(instance);
pinyin_save(context);