diff options
author | Peng Wu <alexepico@gmail.com> | 2011-12-06 18:10:20 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-06 18:10:20 +0800 |
commit | d89098230d873ca1e56af70b3c25a136576e743f (patch) | |
tree | 624205d1e5d25c3387959ecc53c318d486846f5a /tests/storage | |
parent | 2f329c267b26da0161135ec9f4033c7cd6bad508 (diff) | |
download | libpinyin-d89098230d873ca1e56af70b3c25a136576e743f.tar.gz libpinyin-d89098230d873ca1e56af70b3c25a136576e743f.tar.xz libpinyin-d89098230d873ca1e56af70b3c25a136576e743f.zip |
fixes test chewing table
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test_chewing_table.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/storage/test_chewing_table.cpp b/tests/storage/test_chewing_table.cpp index dfc1fca..157a367 100644 --- a/tests/storage/test_chewing_table.cpp +++ b/tests/storage/test_chewing_table.cpp @@ -67,7 +67,12 @@ int main(int argc, char * argv[]) { ChewingKeyVector keys = g_array_new(FALSE, FALSE, sizeof(ChewingKey)); ChewingKeyRestVector key_rests = g_array_new(FALSE, FALSE, sizeof(ChewingKeyRest)); + parser.parse(options, keys, key_rests, linebuf, strlen(linebuf)); + if (0 == keys->len) { + fprintf(stderr, "Invalid input.\n"); + continue; + } guint32 start = record_time(); PhraseIndexRanges ranges; |