summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-05-21 14:47:06 +0800
committerPeng Wu <alexepico@gmail.com>2015-05-21 14:47:06 +0800
commit7a5a8b88cef79e3f5db45a860201d5d5d9841d52 (patch)
tree44803cf8f42332e7167a5cc52e19809620f3ccb4 /tests
parentc0442398c0bed7f1f4c67bfd338faf3e37904547 (diff)
downloadlibpinyin-7a5a8b88cef79e3f5db45a860201d5d5d9841d52.tar.gz
libpinyin-7a5a8b88cef79e3f5db45a860201d5d5d9841d52.tar.xz
libpinyin-7a5a8b88cef79e3f5db45a860201d5d5d9841d52.zip
update test cases
Diffstat (limited to 'tests')
-rw-r--r--tests/lookup/test_phrase_lookup.cpp4
-rw-r--r--tests/lookup/test_pinyin_lookup.cpp4
-rw-r--r--tests/storage/test_chewing_table.cpp4
-rw-r--r--tests/storage/test_phrase_index.cpp4
-rw-r--r--tests/storage/test_phrase_table.cpp4
-rw-r--r--tests/storage/test_table_info.cpp4
6 files changed, 12 insertions, 12 deletions
diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp
index c7bfd19..0538ddf 100644
--- a/tests/lookup/test_phrase_lookup.cpp
+++ b/tests/lookup/test_phrase_lookup.cpp
@@ -53,7 +53,7 @@ bool try_phrase_lookup(PhraseLookup * phrase_lookup,
int main(int argc, char * argv[]){
setlocale(LC_ALL, "");
- SystemTableInfo system_table_info;
+ SystemTableInfo2 system_table_info;
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
@@ -68,7 +68,7 @@ int main(int argc, char * argv[]){
phrase_table.load(chunk, NULL);
const pinyin_table_info_t * phrase_files =
- system_table_info.get_table_info();
+ system_table_info.get_default_tables();
/* init phrase index */
FacadePhraseIndex phrase_index;
diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp
index 3175db0..525cd76 100644
--- a/tests/lookup/test_pinyin_lookup.cpp
+++ b/tests/lookup/test_pinyin_lookup.cpp
@@ -28,7 +28,7 @@
size_t bench_times = 100;
int main( int argc, char * argv[]){
- SystemTableInfo system_table_info;
+ SystemTableInfo2 system_table_info;
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
@@ -45,7 +45,7 @@ int main( int argc, char * argv[]){
largetable.load(options, chunk, NULL);
const pinyin_table_info_t * phrase_files =
- system_table_info.get_table_info();
+ system_table_info.get_default_tables();
FacadePhraseIndex phrase_index;
if (!load_phrase_index(phrase_files, &phrase_index))
diff --git a/tests/storage/test_chewing_table.cpp b/tests/storage/test_chewing_table.cpp
index f3d0f5d..0aaa45e 100644
--- a/tests/storage/test_chewing_table.cpp
+++ b/tests/storage/test_chewing_table.cpp
@@ -27,7 +27,7 @@
size_t bench_times = 1000;
int main(int argc, char * argv[]) {
- SystemTableInfo system_table_info;
+ SystemTableInfo2 system_table_info;
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
@@ -40,7 +40,7 @@ int main(int argc, char * argv[]) {
FacadePhraseIndex phrase_index;
const pinyin_table_info_t * phrase_files =
- system_table_info.get_table_info();
+ system_table_info.get_default_tables();
if (!load_phrase_table(phrase_files, &largetable, NULL, &phrase_index))
exit(ENOENT);
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp
index 79a3ca4..3687ca5 100644
--- a/tests/storage/test_phrase_index.cpp
+++ b/tests/storage/test_phrase_index.cpp
@@ -71,7 +71,7 @@ int main(int argc, char * argv[]){
assert(poss == 0.5);
}
- SystemTableInfo system_table_info;
+ SystemTableInfo2 system_table_info;
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
@@ -82,7 +82,7 @@ int main(int argc, char * argv[]){
FacadePhraseIndex phrase_index;
const pinyin_table_info_t * phrase_files =
- system_table_info.get_table_info();
+ system_table_info.get_default_tables();
if (!load_phrase_table(phrase_files, NULL, NULL, &phrase_index))
exit(ENOENT);
diff --git a/tests/storage/test_phrase_table.cpp b/tests/storage/test_phrase_table.cpp
index a9c8ed5..88c5c1b 100644
--- a/tests/storage/test_phrase_table.cpp
+++ b/tests/storage/test_phrase_table.cpp
@@ -6,7 +6,7 @@
size_t bench_times = 1000;
int main(int argc, char * argv[]){
- SystemTableInfo system_table_info;
+ SystemTableInfo2 system_table_info;
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
@@ -18,7 +18,7 @@ int main(int argc, char * argv[]){
FacadePhraseIndex phrase_index;
const pinyin_table_info_t * phrase_files =
- system_table_info.get_table_info();
+ system_table_info.get_default_tables();
if (!load_phrase_table(phrase_files, NULL, &largetable, &phrase_index))
exit(ENOENT);
diff --git a/tests/storage/test_table_info.cpp b/tests/storage/test_table_info.cpp
index 172aaf2..06f2767 100644
--- a/tests/storage/test_table_info.cpp
+++ b/tests/storage/test_table_info.cpp
@@ -36,8 +36,8 @@ void dump_table_info(const pinyin_table_info_t * table_info) {
break;
case DICTIONARY:
- printf("dictionary:%s %s %s.\n", table_info->m_table_filename,
- table_info->m_system_filename, table_info->m_user_filename);
+ printf("dictionary:%s %s.\n", table_info->m_table_filename,
+ table_info->m_system_filename);
break;
case USER_FILE: