diff options
author | Peng Wu <alexepico@gmail.com> | 2011-04-18 15:46:15 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-04-18 15:46:15 +0800 |
commit | 1ab6f0e8292074a8feac390db820305968147b3b (patch) | |
tree | 2ff976febc6a7cbfb260b8d268327d3e834800df /tests/storage/test_ngram.cpp | |
parent | 469bcc917fdc827b6904c329a3c7c6e8c43aabaf (diff) | |
download | libpinyin-1ab6f0e8292074a8feac390db820305968147b3b.tar.gz libpinyin-1ab6f0e8292074a8feac390db820305968147b3b.tar.xz libpinyin-1ab6f0e8292074a8feac390db820305968147b3b.zip |
add more test cases for n-gram
Diffstat (limited to 'tests/storage/test_ngram.cpp')
-rw-r--r-- | tests/storage/test_ngram.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/storage/test_ngram.cpp b/tests/storage/test_ngram.cpp index 841a0f4..b93a55d 100644 --- a/tests/storage/test_ngram.cpp +++ b/tests/storage/test_ngram.cpp @@ -15,9 +15,9 @@ int main(int argc, char * argv[]){ for(size_t i = 0; i < 6 ;++i){ if ( single_gram.get_freq(tokens[i], freq)) - single_gram.set_freq(tokens[i], freqs[i]); + assert(single_gram.set_freq(tokens[i], freqs[i])); else - single_gram.insert_freq(tokens[i], freqs[i]); + assert(single_gram.insert_freq(tokens[i], freqs[i])); } single_gram.get_freq(3, freq); |