summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-10 13:40:33 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-10 13:40:33 +0800
commit4e9b37108c4efc092f03b64a06a43ef95f437541 (patch)
treeb54afd781cbb172556ad6f725158f4eeac226308 /tests
parentd972cff706c35d4bde2627083cf255ffa018db0a (diff)
downloadlibpinyin-4e9b37108c4efc092f03b64a06a43ef95f437541.zip
libpinyin-4e9b37108c4efc092f03b64a06a43ef95f437541.tar.gz
libpinyin-4e9b37108c4efc092f03b64a06a43ef95f437541.tar.xz
update tests_helper.h
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/test_table_info.cpp1
-rw-r--r--tests/tests_helper.h10
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/storage/test_table_info.cpp b/tests/storage/test_table_info.cpp
index 30f6a0d..3201074 100644
--- a/tests/storage/test_table_info.cpp
+++ b/tests/storage/test_table_info.cpp
@@ -28,6 +28,7 @@ int main(int argc, char * argv[]) {
bool retval = system_table_info.load("../../data/table.conf");
if (!retval) {
+ fprintf(stderr, "load table.conf failed.\n");
exit(ENOENT);
}
diff --git a/tests/tests_helper.h b/tests/tests_helper.h
index de8ea51..4f0869f 100644
--- a/tests/tests_helper.h
+++ b/tests/tests_helper.h
@@ -22,10 +22,11 @@
#ifndef TESTS_HELPER_H
#define TESTS_HELPER_H
-static bool load_phrase_index(FacadePhraseIndex * phrase_index){
+static bool load_phrase_index(const pinyin_table_info_t * phrase_files,
+ FacadePhraseIndex * phrase_index){
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const pinyin_table_info_t * table_info = pinyin_phrase_files + i;
+ const pinyin_table_info_t * table_info = phrase_files + i;
if (SYSTEM_FILE != table_info->m_file_type)
continue;
@@ -47,11 +48,12 @@ static bool load_phrase_index(FacadePhraseIndex * phrase_index){
return true;
}
-static bool load_phrase_table(ChewingLargeTable * chewing_table,
+static bool load_phrase_table(const pinyin_table_info_t * phrase_files,
+ ChewingLargeTable * chewing_table,
PhraseLargeTable2 * phrase_table,
FacadePhraseIndex * phrase_index){
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const pinyin_table_info_t * table_info = pinyin_phrase_files + i;
+ const pinyin_table_info_t * table_info = phrase_files + i;
if (SYSTEM_FILE != table_info->m_file_type)
continue;