summaryrefslogtreecommitdiffstats
path: root/tests/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-21 11:27:10 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-21 11:27:10 +0800
commitb381ab0f9d3aa3a607403f4981f32911869ea62e (patch)
treee45803f8ace5d73bc1a60196080282e50c1158d9 /tests/storage
parente0e72e33e5ef14c89e57685cdf5d44f0faddedb1 (diff)
downloadlibpinyin-b381ab0f9d3aa3a607403f4981f32911869ea62e.tar.gz
libpinyin-b381ab0f9d3aa3a607403f4981f32911869ea62e.tar.xz
libpinyin-b381ab0f9d3aa3a607403f4981f32911869ea62e.zip
polish test chewing table
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test_chewing_table.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/storage/test_chewing_table.cpp b/tests/storage/test_chewing_table.cpp
index 396eaa8..ba76cf0 100644
--- a/tests/storage/test_chewing_table.cpp
+++ b/tests/storage/test_chewing_table.cpp
@@ -122,6 +122,19 @@ int main(int argc, char * argv[]) {
NULL, NULL, NULL);
printf("%s\t", string);
g_free(string);
+
+ ChewingKey chewing_buffer[1024];
+ size_t npron = item.get_n_pronunciation();
+ guint32 freq;
+ for (size_t m = 0; m < npron; ++m){
+ item.get_nth_pronunciation(m, chewing_buffer, freq);
+ for (size_t n = 0; n < item.get_phrase_length();
+ ++n){
+ printf("%s'",
+ chewing_buffer[n].get_pinyin_string());
+ }
+ printf("\b\t%d\t", freq);
+ }
}
printf("\n");
}