From 1f6d0a9f5155f1e95d1717625fe0a5b4a679aac2 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 9 Oct 2012 14:16:47 +0800 Subject: fixes test_parser2 again --- tests/storage/test_parser2.cpp | 12 +++++++----- 1 file 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 -- cgit