projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c418ddb
)
fixes test phrase table.
author
Peng Wu
<alexepico@gmail.com>
Mon, 18 Apr 2011 09:16:47 +0000
(17:16 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Mon, 18 Apr 2011 09:16:47 +0000
(17:16 +0800)
tests/storage/test_phrase_table.cpp
patch
|
blob
|
history
diff --git
a/tests/storage/test_phrase_table.cpp
b/tests/storage/test_phrase_table.cpp
index
e5fb24d
..
66ed060
100644
(file)
--- a/
tests/storage/test_phrase_table.cpp
+++ b/
tests/storage/test_phrase_table.cpp
@@
-65,8
+65,11
@@
int main(int argc, char * argv[]){
}
print_time(start, bench_times);
- largetable.search(phrase_len, new_phrase, token);
- printf("%s:\t%d\n", linebuf, token);
+ int retval = largetable.search(phrase_len, new_phrase, token);
+ if ( retval & SEARCH_OK )
+ printf("%s:\t%d\n", linebuf, token);
+ else
+ printf("phrase %s not found.\n", linebuf);
g_free(new_phrase);
}