projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f329c2
)
fixes test chewing table
author
Peng Wu
<alexepico@gmail.com>
Tue, 6 Dec 2011 10:10:20 +0000
(18:10 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Tue, 6 Dec 2011 10:10:20 +0000
(18:10 +0800)
tests/storage/test_chewing_table.cpp
patch
|
blob
|
history
diff --git
a/tests/storage/test_chewing_table.cpp
b/tests/storage/test_chewing_table.cpp
index dfc1fca977763fbe3322b90f761e1ee11da015da..157a3676c0f89256fcc643b54f9b3fa09e7d8bad 100644
(file)
--- 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;