diff options
author | Peng Wu <alexepico@gmail.com> | 2012-10-09 14:16:47 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-10-09 14:16:47 +0800 |
commit | 1f6d0a9f5155f1e95d1717625fe0a5b4a679aac2 (patch) | |
tree | 078ea1e8d9a415a0162ad80dfa24d88cabab52aa | |
parent | 4f431b35d0241d57ce4edb48e78dd46eb82703e4 (diff) | |
download | libpinyin-1f6d0a9f5155f1e95d1717625fe0a5b4a679aac2.tar.gz |
fixes test_parser2 again
-rw-r--r-- | tests/storage/test_parser2.cpp | 12 |
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 |