summaryrefslogtreecommitdiffstats
path: root/test/tvlstr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-10 01:41:34 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-10 01:41:34 (GMT)
commit7f6fbe6b604423782f6195b809a23c32d0bd1863 (patch)
treee8c77f2aec3dbc365983995305864e47c5119b18 /test/tvlstr.c
parentc891e4a01e575cec23d51b526fd792b57eab9d06 (diff)
downloadhdf5-7f6fbe6b604423782f6195b809a23c32d0bd1863.zip
hdf5-7f6fbe6b604423782f6195b809a23c32d0bd1863.tar.gz
hdf5-7f6fbe6b604423782f6195b809a23c32d0bd1863.tar.bz2
[svn-r8049] Purpose:
Code cleanup & reorganization Description: Move further in the testing framework cleanup, eliminating all the global variables (moving them into testframe.c as static variables) from the testing framework code and moving it into the libh5test.a. Platforms tested: FreeBSD 4.9 (sleipnir) w & w/o thread-safety, c++ & parallel h5committested
Diffstat (limited to 'test/tvlstr.c')
-rw-r--r--test/tvlstr.c39
1 files changed, 13 insertions, 26 deletions
diff --git a/test/tvlstr.c b/test/tvlstr.c
index ef35267..f22f04d 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -206,13 +206,11 @@ test_vlstrings_basic(void)
/* Compare data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(strlen(wdata[i])!=strlen(rdata[i])) {
- num_errs++;
- printf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
continue;
} /* end if */
if( strcmp(wdata[i],rdata[i]) != 0 ) {
- num_errs++;
- printf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
continue;
} /* end if */
} /* end for */
@@ -297,8 +295,7 @@ test_vlstrings_special(void)
/* Check data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(rdata[i]!=NULL) {
- num_errs++;
- printf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
} /* end if */
} /* end for */
@@ -313,13 +310,11 @@ test_vlstrings_special(void)
/* Compare data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(strlen(wdata[i])!=strlen(rdata[i])) {
- num_errs++;
- printf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
continue;
} /* end if */
if( strcmp(wdata[i],rdata[i]) != 0 ) {
- num_errs++;
- printf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
continue;
} /* end if */
} /* end for */
@@ -355,8 +350,7 @@ test_vlstrings_special(void)
/* Check data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(rdata[i]!=NULL) {
- num_errs++;
- printf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
} /* end if */
} /* end for */
@@ -371,8 +365,7 @@ test_vlstrings_special(void)
/* Check data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(rdata[i]!=NULL) {
- num_errs++;
- printf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
} /* end if */
} /* end for */
@@ -538,13 +531,11 @@ test_compact_vlstring(void)
/* Compare data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(strlen(wdata[i])!=strlen(rdata[i])) {
- num_errs++;
- printf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
continue;
} /* end if */
if( strcmp(wdata[i],rdata[i]) != 0 ) {
- num_errs++;
- printf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
continue;
} /* end if */
} /* end for */
@@ -615,8 +606,7 @@ static void test_write_vl_string_attribute(void)
CHECK(ret, FAIL, "H5Aread");
if(HDstrcmp(string_att_check,string_att)!=0) {
- num_errs++;
- printf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
+ TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
} /* end if */
HDfree(string_att_check);
@@ -638,8 +628,7 @@ static void test_write_vl_string_attribute(void)
CHECK(ret, FAIL, "H5Aread");
if(HDstrcmp(string_att_check,string_att_write)!=0) {
- num_errs++;
- printf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
+ TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
} /* end if */
HDfree(string_att_check);
@@ -699,8 +688,7 @@ static void test_read_vl_string_attribute(void)
CHECK(ret, FAIL, "H5Aread");
if(HDstrcmp(string_att_check,string_att)!=0) {
- num_errs++;
- printf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
+ TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
} /* end if */
HDfree(string_att_check);
@@ -716,8 +704,7 @@ static void test_read_vl_string_attribute(void)
CHECK(ret, FAIL, "H5Aread");
if(HDstrcmp(string_att_check,string_att_write)!=0) {
- num_errs++;
- printf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
+ TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
} /* end if */
HDfree(string_att_check);