summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-14 13:39:06 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-14 13:39:06 +0800
commit9ffdfaa1b77c0a9e2136ad49768bc7df4329d454 (patch)
tree494495408df9ed82bf258bcfda4b87afdaacfd55 /tests
parent2970679b136f91607f7db1d1a64c3158b1d60881 (diff)
downloadlibpinyin-9ffdfaa1b77c0a9e2136ad49768bc7df4329d454.tar.gz
libpinyin-9ffdfaa1b77c0a9e2136ad49768bc7df4329d454.tar.xz
libpinyin-9ffdfaa1b77c0a9e2136ad49768bc7df4329d454.zip
refine ChewingKeyRest
Diffstat (limited to 'tests')
-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");