diff options
author | Peng Wu <alexepico@gmail.com> | 2013-03-28 12:21:41 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-03-28 12:32:01 +0800 |
commit | 5c520717118df51ed6977e556fa846495419af24 (patch) | |
tree | 0151f46d26db7072a309bf52ad552b8e1ab813cc /tests | |
parent | 6e7f0c8dd8b6c0f6efdc1d91a5ffdd1a85de6522 (diff) | |
download | libpinyin-5c520717118df51ed6977e556fa846495419af24.tar.gz libpinyin-5c520717118df51ed6977e556fa846495419af24.tar.xz libpinyin-5c520717118df51ed6977e556fa846495419af24.zip |
write add_pronunciation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/storage/test_phrase_index.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp index 807b29c..96f9ca0 100644 --- a/tests/storage/test_phrase_index.cpp +++ b/tests/storage/test_phrase_index.cpp @@ -14,8 +14,8 @@ int main(int argc, char * argv[]){ phrase_item.set_phrase_string(1, &string1); - phrase_item.append_pronunciation(&key1, 100); - phrase_item.append_pronunciation(&key2, 300); + phrase_item.add_pronunciation(&key1, 100); + phrase_item.add_pronunciation(&key2, 300); assert(phrase_item.get_phrase_length() == 1); @@ -104,7 +104,7 @@ int main(int argc, char * argv[]){ phrase_index.get_phrase_item(16777222, item2); assert(item2.get_phrase_length() == 1); - assert(item2.get_n_pronunciation() == 6); + assert(item2.get_n_pronunciation() == 2); return 0; } |