summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-28 17:54:25 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-28 17:54:25 +0800
commit3a77085a17a66bcd9d231dfcefbbf886e79cfe82 (patch)
treeacd96b9e92fea7ac05237ac1f3c804cc51c55e27
parentd685c3add83239b70b8ed00408ac1613a9a654cb (diff)
downloadlibpinyin-3a77085a17a66bcd9d231dfcefbbf886e79cfe82.tar.gz
libpinyin-3a77085a17a66bcd9d231dfcefbbf886e79cfe82.tar.xz
libpinyin-3a77085a17a66bcd9d231dfcefbbf886e79cfe82.zip
add more tests for test parser2
-rw-r--r--tests/storage/test_parser2.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/storage/test_parser2.cpp b/tests/storage/test_parser2.cpp
index 32b80ff..9ab6bb3 100644
--- a/tests/storage/test_parser2.cpp
+++ b/tests/storage/test_parser2.cpp
@@ -97,6 +97,16 @@ int main(int argc, char * argv[]) {
if ( strcmp ( linebuf, "quit" ) == 0)
break;
+#if 0
+ ChewingKey key; ChewingKeyRest key_rest;
+ bool success = parser->parse_one_key(options, key, key_rest,
+ linebuf, strlen(linebuf));
+ if (success)
+ printf("pinyin:%s\t%d\t%d\n", key_rest.get_pinyin_string(),
+ key_rest.m_raw_begin, key_rest.m_raw_end);
+#endif
+
+#if 1
int len = parser->parse(options, keys, key_rests,
linebuf, strlen(linebuf));
printf("parsed %d chars, %d keys.\n", len, keys->len);
@@ -110,6 +120,7 @@ int main(int argc, char * argv[]) {
key_rest->m_raw_begin, key_rest->m_raw_end);
}
printf("\n");
+#endif
}