summaryrefslogtreecommitdiffstats
path: root/test/dt_arith.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-27 20:28:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-27 20:28:27 (GMT)
commit2c93a80648a72fd19d13c3c014ef998dc1f88f8f (patch)
tree545dda6a2ce07309b440397baa189bb10e70bc3f /test/dt_arith.c
parent0ee1ca5c204516f07f71476906218850a67425a3 (diff)
downloadhdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.zip
hdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.tar.gz
hdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.tar.bz2
[svn-r14160] Description:
Make H5Topen versioned, and add regression test for H5Topen1. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r--test/dt_arith.c54
1 files changed, 20 insertions, 34 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index e27176d..67885a3 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -1001,23 +1001,20 @@ test_derived_flt(void)
goto error;
}
- if((tid1 = H5Topen(file, "new float type 1")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
- if(H5Tget_fields(tid1, &spos, &epos, &esize, &mpos, &msize)<0) {
+ if((tid1 = H5Topen2(file, "new float type 1", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_fields(tid1, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
printf("Can't get fields\n");
goto error;
}
- if(spos!=44 || epos!=34 || esize!=10 || mpos!=3 || msize!=31) {
+ if(spos != 44 || epos != 34 || esize != 10 || mpos != 3 || msize != 31) {
H5_FAILED();
printf("Wrong field values\n");
goto error;
}
- if(H5Tget_precision(tid1)!=42) {
+ if(H5Tget_precision(tid1) != 42) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
@@ -1163,23 +1160,20 @@ test_derived_flt(void)
goto error;
}
- if((tid2 = H5Topen(file, "new float type 2")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
- if(H5Tget_fields(tid2, &spos, &epos, &esize, &mpos, &msize)<0) {
+ if((tid2 = H5Topen2(file, "new float type 2", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_fields(tid2, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
printf("Can't get fields\n");
goto error;
}
- if(spos!=23 || epos!=16 || esize!=7 || mpos!=0 || msize!=16) {
+ if(spos != 23 || epos != 16 || esize != 7 || mpos != 0 || msize != 16) {
H5_FAILED();
printf("Wrong field values\n");
goto error;
}
- if(H5Tget_precision(tid2)!=24) {
+ if(H5Tget_precision(tid2) != 24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
@@ -1427,23 +1421,19 @@ test_derived_integer(void)
goto error;
}
- if((tid1 = H5Topen(file, "new integer type 1")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
-
- if(H5Tget_precision(tid1)!=24) {
+ if((tid1 = H5Topen2(file, "new integer type 1", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_precision(tid1) != 24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
}
- if(H5Tget_offset(tid1)!=0) {
+ if(H5Tget_offset(tid1) != 0) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
goto error;
}
- if(H5Tget_size(tid1)!=3) {
+ if(H5Tget_size(tid1) != 3) {
H5_FAILED();
printf("Can't get size or wrong size\n");
goto error;
@@ -1492,23 +1482,19 @@ test_derived_integer(void)
goto error;
}
- if((tid2 = H5Topen(file, "new integer type 2")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
-
- if(H5Tget_precision(tid2)!=48) {
+ if((tid2 = H5Topen2(file, "new integer type 2", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_precision(tid2) != 48) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
}
- if(H5Tget_offset(tid2)!=10) {
+ if(H5Tget_offset(tid2) != 10) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
goto error;
}
- if(H5Tget_size(tid2)!=8) {
+ if(H5Tget_size(tid2) != 8) {
H5_FAILED();
printf("Can't get size or wrong size\n");
goto error;