diff options
author | Peng Wu <alexepico@gmail.com> | 2016-05-27 14:03:47 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-05-27 14:03:47 +0800 |
commit | 668d9f00f25a658b9bde6a3cdec313899b727083 (patch) | |
tree | b225df14603545d731d5dfae603446bab5654d31 | |
parent | e297b8fb61ecd765412574c4fb74351a14bb2f3a (diff) | |
download | libpinyin-668d9f00f25a658b9bde6a3cdec313899b727083.tar.gz libpinyin-668d9f00f25a658b9bde6a3cdec313899b727083.tar.xz libpinyin-668d9f00f25a658b9bde6a3cdec313899b727083.zip |
update test_phrase_index.cpp
-rw-r--r-- | tests/storage/test_phrase_index.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp index 3687ca5..ddfea8a 100644 --- a/tests/storage/test_phrase_index.cpp +++ b/tests/storage/test_phrase_index.cpp @@ -28,8 +28,7 @@ int main(int argc, char * argv[]){ assert(key3 == key2); assert(freq == 300); - pinyin_option_t options = 0; - gfloat poss = phrase_item.get_pronunciation_possibility(options, &key1); + gfloat poss = phrase_item.get_pronunciation_possibility(&key1); printf("pinyin possiblitiy:%f\n", poss); assert(phrase_item.get_unigram_frequency() == 0); @@ -52,21 +51,21 @@ int main(int argc, char * argv[]){ assert(item2.get_unigram_frequency() == 0); assert(item2.get_n_pronunciation() == 2); assert(item2.get_phrase_length() == 1); - assert(item2.get_pronunciation_possibility(options, &key2) == 0.75); + assert(item2.get_pronunciation_possibility(&key2) == 0.75); } print_time(time, bench_times); { PhraseItem item3; phrase_index_test.get_phrase_item(1, item3); - item3.increase_pronunciation_possibility(options, &key1, 200); - assert(item3.get_pronunciation_possibility(options, &key1) == 0.5) ; + item3.increase_pronunciation_possibility(&key1, 200); + assert(item3.get_pronunciation_possibility(&key1) == 0.5) ; } { PhraseItem item5; phrase_index_test.get_phrase_item(1, item5); - gfloat poss = item5.get_pronunciation_possibility(options, &key1); + gfloat poss = item5.get_pronunciation_possibility(&key1); printf("pinyin poss:%f\n", poss); assert(poss == 0.5); } |