diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lookup/test_pinyin_lookup.cpp | 5 | ||||
-rw-r--r-- | tests/storage/test_matrix.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp index ac43ce5..9978551 100644 --- a/tests/lookup/test_pinyin_lookup.cpp +++ b/tests/lookup/test_pinyin_lookup.cpp @@ -82,7 +82,8 @@ int main( int argc, char * argv[]){ ChewingKeyVector keys = g_array_new(FALSE, FALSE, sizeof(ChewingKey)); ChewingKeyRestVector key_rests = g_array_new(FALSE, FALSE, sizeof(ChewingKeyRest)); - parser.parse(options, keys, key_rests, linebuf, strlen(linebuf)); + int parsed_len = parser.parse(options, keys, key_rests, + linebuf, strlen(linebuf)); PhoneticKeyMatrix matrix; @@ -90,7 +91,7 @@ int main( int argc, char * argv[]){ continue; /* fill the matrix. */ - fill_matrix(&matrix, keys, key_rests); + fill_matrix(&matrix, keys, key_rests, parsed_len); resplit_step(options, &matrix); diff --git a/tests/storage/test_matrix.cpp b/tests/storage/test_matrix.cpp index 5602bd6..bc7ede4 100644 --- a/tests/storage/test_matrix.cpp +++ b/tests/storage/test_matrix.cpp @@ -124,7 +124,7 @@ int main(int argc, char * argv[]) { len = parser->parse(options, keys, key_rests, linebuf, strlen(linebuf)); - fill_matrix(&matrix, keys, key_rests); + fill_matrix(&matrix, keys, key_rests, len); resplit_step(options, &matrix); |