summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/storage/test_parser2.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/storage/test_parser2.cpp b/tests/storage/test_parser2.cpp
index 24e38c7..8459684 100644
--- a/tests/storage/test_parser2.cpp
+++ b/tests/storage/test_parser2.cpp
@@ -102,12 +102,14 @@ int main(int argc, char * argv[]) {
break;
#if 0
- ChewingKey key; ChewingKeyRest key_rest;
- bool success = parser->parse_one_key(options, key, key_rest,
+ ChewingKey key;
+ bool success = parser->parse_one_key(options, key,
linebuf, strlen(linebuf));
- if (success)
- printf("pinyin:%s\t%d\t%d\n", key.get_pinyin_string(),
- key_rest.m_raw_begin, key_rest.m_raw_end);
+ if (success) {
+ gchar * pinyins = key.get_pinyin_string();
+ printf("pinyin:%s\n", pinyins);
+ g_free(pinyins);
+ }
#endif
#if 1