diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2004-10-05 15:13:14 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2004-10-05 15:13:14 (GMT) |
commit | 1f8687691d6620473440d745ea6cbe9e16b3d3c1 (patch) | |
tree | bcf783cf560fbfa1e7e3a7ca3b0778abb34e9ac1 /test | |
parent | 9595bba3a45563ddff3a732cd460fecf0c04530a (diff) | |
download | hdf5-1f8687691d6620473440d745ea6cbe9e16b3d3c1.zip hdf5-1f8687691d6620473440d745ea6cbe9e16b3d3c1.tar.gz hdf5-1f8687691d6620473440d745ea6cbe9e16b3d3c1.tar.bz2 |
[svn-r9365]
Purpose: change feature
Description: Back up supporting bitfield and time datatypes in H5Tget_native_type. Leave it for future support. Simply returns "not supported" error message for now.
Platforms tested: h5committest
Misc. update: RELEASE.txt
Diffstat (limited to 'test')
-rw-r--r-- | test/ntypes.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/test/ntypes.c b/test/ntypes.c index df53630..6b7c827 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -2306,7 +2306,7 @@ test_bitfield_dtype(hid_t file) wbuf[i] = (unsigned char)0xff ^ (unsigned char)i; if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf)<0) - TEST_ERROR; + TEST_ERROR; if (H5Sclose(space)<0) TEST_ERROR; if (H5Dclose(dset)<0) TEST_ERROR; @@ -2316,26 +2316,17 @@ test_bitfield_dtype(hid_t file) if((dtype=H5Dget_type(dataset))<0) TEST_ERROR; - if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0) - TEST_ERROR; - - if(!H5Tequal(native_type, type)) TEST_ERROR; - - if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf)<0) + H5E_BEGIN_TRY { + native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT); + } H5E_END_TRY; + if(native_type>0) { + H5_FAILED(); + puts(" Bit field isn't supported. Should have failed."); TEST_ERROR; - - for(i=0; i<sizeof(rbuf); i++) { - if (rbuf[i] != wbuf[i]) { - H5_FAILED(); - printf(" Read different values than written.\n"); - printf(" At index %u\n", (unsigned)i); - goto error; - } } - + if (H5Tclose(type)<0) TEST_ERROR; if (H5Tclose(dtype)<0) TEST_ERROR; - if (H5Tclose(native_type)<0) TEST_ERROR; if (H5Dclose(dataset)<0) TEST_ERROR; PASSED(); @@ -2343,7 +2334,7 @@ test_bitfield_dtype(hid_t file) error: return -1; -} /* test_opaque_dtype */ +} /* test_bitfield_dtype */ |