summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-06-18 21:03:30 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-06-18 21:03:30 (GMT)
commit23465486edeb6e9d76ae795d523bedbf4e665d64 (patch)
tree3831eaca941ba6521cd31463bfdcb8739805bb3a /test/dsets.c
parentd6f7fda058353212449fce012787d0d46d866f2f (diff)
downloadhdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.zip
hdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.tar.gz
hdf5-23465486edeb6e9d76ae795d523bedbf4e665d64.tar.bz2
[svn-r432] Changes since 19980617
---------------------- ./html/Datatypes.html ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5detect.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/external.c ./test/tattr.c ./test/th5s.c Organized the predefined data types. ./html/H5.intro.html NO MODIFICATIONS! This file is a mess (obviously generated from something else) so I skipped updating it! ./src/h5ls.c ./test/dsets.c ./test/tattr.c ./test/th5s.c Added extra argument to H5Sget_dims() calls per Albert's last update.
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/test/dsets.c b/test/dsets.c
index cc81319..a3c15df 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -291,7 +291,7 @@ test_tconv(hid_t file)
char *out=NULL, *in=NULL;
int i;
hsize_t dims[1];
- hid_t space, dataset, type;
+ hid_t space, dataset;
herr_t status;
out = malloc (4*1000000);
@@ -316,31 +316,18 @@ test_tconv(hid_t file)
assert(space >= 0);
/* Create the data set */
- dataset = H5Dcreate(file, DSET_TCONV_NAME, H5T_NATIVE_INT32, space,
+ dataset = H5Dcreate(file, DSET_TCONV_NAME, H5T_STD_I32LE, space,
H5P_DEFAULT);
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
+ status = H5Dwrite(dataset, H5T_STD_I32LE, H5S_ALL, H5S_ALL,
H5P_DEFAULT, out);
assert(status >= 0);
- /* Create a new type with the opposite byte order */
- type = H5Tcopy(H5T_NATIVE_INT32);
- switch (H5Tget_order(type)) {
- case H5T_ORDER_BE:
- H5Tset_order(type, H5T_ORDER_LE);
- break;
- case H5T_ORDER_LE:
- H5Tset_order(type, H5T_ORDER_BE);
- break;
- default:
- assert("funny byte order" && 0);
- break;
- }
-
/* Read data with byte order conversion */
- status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, in);
+ status = H5Dread(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, in);
assert(status >= 0);
/* Check */
@@ -352,7 +339,6 @@ test_tconv(hid_t file)
}
H5Dclose(dataset);
- H5Tclose(type);
free (out);
free (in);
@@ -716,7 +702,7 @@ test_multiopen (hid_t file)
/* Get the size from the second handle */
if ((space = H5Dget_space (dset2))<0) goto error;
- if (H5Sget_dims (space, tmp_size)<0) goto error;
+ if (H5Sget_dims (space, tmp_size, NULL)<0) goto error;
if (cur_size[0]!=tmp_size[0]) {
puts ("*FAILED*");
printf (" Got %d instead of %d!\n",