summaryrefslogtreecommitdiffstats
path: root/tests/storage/test_phrase_index.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-04-28 15:04:46 +0800
committerPeng Wu <alexepico@gmail.com>2011-04-28 15:04:46 +0800
commit80d2b005249b772e7cd7fdf763e217576d401823 (patch)
tree1b1611cef942e5b98b88c1448ad53d9df7ba5e85 /tests/storage/test_phrase_index.cpp
parentb7909ecd1b39843c99b44118a8e0fe269da7f098 (diff)
downloadlibpinyin-80d2b005249b772e7cd7fdf763e217576d401823.tar.gz
libpinyin-80d2b005249b772e7cd7fdf763e217576d401823.tar.xz
libpinyin-80d2b005249b772e7cd7fdf763e217576d401823.zip
use errno
Diffstat (limited to 'tests/storage/test_phrase_index.cpp')
-rw-r--r--tests/storage/test_phrase_index.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp
index c5d5828..12cc398 100644
--- a/tests/storage/test_phrase_index.cpp
+++ b/tests/storage/test_phrase_index.cpp
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <sys/time.h>
+#include <errno.h>
#include <glib.h>
#include "pinyin.h"
@@ -93,7 +94,7 @@ int main(int argc, char * argv[]){
FILE* infile = fopen("../../data/gb_char.table", "r");
if ( NULL == infile ){
printf("open gb_char.table failed!\n");
- exit(1);
+ exit(ENOENT);
}
phrase_index_load.load_text(1, infile);
@@ -102,7 +103,7 @@ int main(int argc, char * argv[]){
infile = fopen("../../data/gbk_char.table", "r");
if ( NULL == infile ){
printf("open gbk_char.table failed!\n");
- exit(1);
+ exit(ENOENT);
}
phrase_index_load.load_text(2, infile);