summaryrefslogtreecommitdiffstats
path: root/tests/storage/test_parser2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storage/test_parser2.cpp')
-rw-r--r--tests/storage/test_parser2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/storage/test_parser2.cpp b/tests/storage/test_parser2.cpp
index f42db49..276a3a9 100644
--- a/tests/storage/test_parser2.cpp
+++ b/tests/storage/test_parser2.cpp
@@ -105,7 +105,7 @@ int main(int argc, char * argv[]) {
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(),
+ printf("pinyin:%s\t%d\t%d\n", key.get_pinyin_string(),
key_rest.m_raw_begin, key_rest.m_raw_end);
#endif
@@ -123,9 +123,11 @@ int main(int argc, char * argv[]) {
assert(keys->len == key_rests->len);
for (size_t i = 0; i < keys->len; ++i) {
+ ChewingKey * key =
+ &g_array_index(keys, ChewingKey, i);
ChewingKeyRest * key_rest =
&g_array_index(key_rests, ChewingKeyRest, i);
- printf("%s %d %d\t", key_rest->get_pinyin_string(),
+ printf("%s %d %d\t", key->get_pinyin_string(),
key_rest->m_raw_begin, key_rest->m_raw_end);
}
printf("\n");