summaryrefslogtreecommitdiffstats
path: root/tests/storage/test_pinyin_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storage/test_pinyin_index.cpp')
-rw-r--r--tests/storage/test_pinyin_index.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/storage/test_pinyin_index.cpp b/tests/storage/test_pinyin_index.cpp
index e79eb3b..ab30dfd 100644
--- a/tests/storage/test_pinyin_index.cpp
+++ b/tests/storage/test_pinyin_index.cpp
@@ -1,7 +1,6 @@
#include <string.h>
#include <stdio.h>
#include <sys/time.h>
-#include <glib.h>
#include "novel_types.h"
#include "pinyin_base.h"
#include "pinyin_phrase.h"
@@ -34,18 +33,20 @@ int main( int argc, char * argv[]){
PinyinLargeTable largetable(&custom);
FILE * gbfile = fopen("../../data/gb_char.table", "r");
- if ( gbfile == NULL) {
- printf("open gb_char.table failed!");
+ if ( gbfile == NULL ) {
+ printf("open gb_char.table failed!\n");
return 1;
}
+
+ largetable.load_text(gbfile);
+ fclose(gbfile);
+
FILE * gbkfile = fopen("../../data/gbk_char.table","r");
- if ( gbkfile == NULL) {
- printf("open gb_char.table failed!");
+ if ( gbkfile == NULL ) {
+ printf("open gb_char.table failed!\n");
return 1;
}
- largetable.load_text(gbfile);
- fclose(gbfile);
largetable.load_text(gbkfile);
fclose(gbkfile);