summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-07-26 15:26:17 +0800
committerPeng Wu <alexepico@gmail.com>2011-07-26 15:26:17 +0800
commit20817e002894a3897f262938dba393296af10b53 (patch)
treec4502412cedc59a8c0a285f0475766c4d102ad4b /tests
parent8ef85b7328061e215f928346cf0881d2808ad284 (diff)
downloadlibpinyin-20817e002894a3897f262938dba393296af10b53.tar.gz
libpinyin-20817e002894a3897f262938dba393296af10b53.tar.xz
libpinyin-20817e002894a3897f262938dba393296af10b53.zip
fixes stderr fprintf
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/test_phrase_index.cpp4
-rw-r--r--tests/storage/test_phrase_table.cpp4
-rw-r--r--tests/storage/test_pinyin_index.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp
index 12cc398..b48d92c 100644
--- a/tests/storage/test_phrase_index.cpp
+++ b/tests/storage/test_phrase_index.cpp
@@ -93,7 +93,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");
+ fprintf(stderr, "open gb_char.table failed!\n");
exit(ENOENT);
}
@@ -102,7 +102,7 @@ int main(int argc, char * argv[]){
infile = fopen("../../data/gbk_char.table", "r");
if ( NULL == infile ){
- printf("open gbk_char.table failed!\n");
+ fprintf(stderr, "open gbk_char.table failed!\n");
exit(ENOENT);
}
diff --git a/tests/storage/test_phrase_table.cpp b/tests/storage/test_phrase_table.cpp
index 66ed060..c81b472 100644
--- a/tests/storage/test_phrase_table.cpp
+++ b/tests/storage/test_phrase_table.cpp
@@ -28,7 +28,7 @@ int main(int argc, char * argv[]){
FILE * gbfile = fopen("../../data/gb_char.table", "r");
if ( gbfile == NULL ) {
- printf("open gb_char.table failed!\n");
+ fprintf(stderr, "open gb_char.table failed!\n");
return 1;
}
@@ -37,7 +37,7 @@ int main(int argc, char * argv[]){
FILE * gbkfile = fopen("../../data/gbk_char.table", "r");
if (gbkfile == NULL ) {
- printf("open gbk_char.table failed!\n");
+ fprintf(stderr, "open gbk_char.table failed!\n");
return 1;
}
diff --git a/tests/storage/test_pinyin_index.cpp b/tests/storage/test_pinyin_index.cpp
index e0e42bf..5b54df6 100644
--- a/tests/storage/test_pinyin_index.cpp
+++ b/tests/storage/test_pinyin_index.cpp
@@ -30,7 +30,7 @@ int main( int argc, char * argv[]){
FILE * gbfile = fopen("../../data/gb_char.table", "r");
if ( gbfile == NULL ) {
- printf("open gb_char.table failed!\n");
+ fprintf(stderr, "open gb_char.table failed!\n");
return 1;
}
@@ -39,7 +39,7 @@ int main( int argc, char * argv[]){
FILE * gbkfile = fopen("../../data/gbk_char.table","r");
if ( gbkfile == NULL ) {
- printf("open gb_char.table failed!\n");
+ fprintf(stderr, "open gb_char.table failed!\n");
return 1;
}
@@ -50,7 +50,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");
+ fprintf(stderr, "open gb_char.table failed!\n");
exit(ENOENT);
}
@@ -59,7 +59,7 @@ int main( int argc, char * argv[]){
infile = fopen("../../data/gbk_char.table", "r");
if ( NULL == infile ){
- printf("open gbk_char.table failed!\n");
+ fprintf(stderr, "open gbk_char.table failed!\n");
exit(ENOENT);
}