summaryrefslogtreecommitdiffstats
path: root/test/dtypes.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/dtypes.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/dtypes.c')
-rw-r--r--test/dtypes.c48
1 files changed, 17 insertions, 31 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index d0e4d83..2f8f030 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1584,20 +1584,17 @@ test_compound_9(void)
goto error;
} /* end if */
- if((cmpd_tid = H5Topen(file, "compound")) < 0) {
- H5_FAILED(); AT();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((cmpd_tid = H5Topen2(file, "compound", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- if((dup_tid = H5Tcopy(cmpd_tid))<0) {
+ if((dup_tid = H5Tcopy(cmpd_tid)) < 0) {
H5_FAILED(); AT();
printf("Can't copy datatype\n");
goto error;
} /* end if */
dim1[0] = 1;
- if((space_id=H5Screate_simple(1,dim1,NULL))<0) {
+ if((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED(); AT();
printf("Can't create space\n");
goto error;
@@ -2337,16 +2334,10 @@ test_query(void)
} /* end if */
/* Open the dataytpe for query */
- if((tid1 = H5Topen(file, compnd_type)) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
- if((tid2 = H5Topen(file, enum_type)) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((tid1 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((tid2 = H5Topen2(file, enum_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Query member number and member index by name, for compound type */
if(H5Tget_nmembers(tid1) != 4) {
@@ -2668,7 +2659,8 @@ test_named (hid_t fapl)
* Close the committed type and reopen it. It should return a named type.
*/
if(H5Tclose(type) < 0) goto error;
- if((type = H5Topen(file, "native-int")) < 0) goto error;
+ if((type = H5Topen2(file, "native-int", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) goto error;
if(!status) {
H5_FAILED();
@@ -4186,16 +4178,10 @@ test_encode(void)
enum_buf_size = 0;
/* Open the dataytpe for query */
- if((tid1=H5Topen(file, compnd_type))<0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
- if((tid2=H5Topen(file, enum_type))<0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((tid1 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((tid2 = H5Topen2(file, enum_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Encode compound type in a buffer */
@@ -4411,7 +4397,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Open the dataytpe for query */
- if((tid2 = H5Topen(file, compnd_type)) < 0)
+ if((tid2 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Verify that the datatype was encoded/decoded correctly */
@@ -4476,7 +4462,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Open the dataytpe for query */
- if((tid2 = H5Topen(file, compnd_type)) < 0)
+ if((tid2 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Verify that the datatype was encoded/decoded correctly */
@@ -4755,7 +4741,7 @@ test_compat(hid_t fapl)
* Close the committed type and reopen it. It should return a named type.
*/
if(H5Tclose(type) < 0) FAIL_STACK_ERROR
- if((type = H5Topen(file, "native-int")) < 0) FAIL_STACK_ERROR
+ if((type = H5Topen1(file, "native-int")) < 0) FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) FAIL_STACK_ERROR
if(!status)
FAIL_PUTS_ERROR(" Opened named types should be named types!")