summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-01-20 20:41:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-01-20 20:41:23 (GMT)
commit75f65c15836248688110342528629039e40c1cd0 (patch)
tree3e51865c389ec58c8745403630b1538579a9b222 /test/dtypes.c
parent1e25bc217fca043e1b5c77e9f538c506c11be7af (diff)
downloadhdf5-75f65c15836248688110342528629039e40c1cd0.zip
hdf5-75f65c15836248688110342528629039e40c1cd0.tar.gz
hdf5-75f65c15836248688110342528629039e40c1cd0.tar.bz2
[svn-r18125] I added the support of bitfield in H5Tget_native_type. Bitfield is similar to unsigned
integer. I also added a test. Tested on jam. But I tested the same change for 1.8 with h5committest.
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 04f526a..020a603 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -4496,7 +4496,7 @@ test_conv_bitfield(void)
static int
test_bitfield_funcs(void)
{
- hid_t type=-1, super=-1;
+ hid_t type=-1, ntype=-1, super=-1;
int size;
char* tag;
H5T_pad_t inpad;
@@ -4521,6 +4521,7 @@ test_bitfield_funcs(void)
if(H5Tset_pad(type, H5T_PAD_ONE, H5T_PAD_ONE)) goto error;
if((size=H5Tget_size(type))==0) goto error;
if(H5Tset_order(type, H5T_ORDER_BE) < 0) goto error;
+ if((ntype = H5Tget_native_type(type, H5T_DIR_ASCEND)) < 0) goto error;
H5E_BEGIN_TRY {
size=H5Tget_ebias(type);
@@ -4585,16 +4586,8 @@ test_bitfield_funcs(void)
goto error;
} /* end if */
- H5E_BEGIN_TRY {
- super = H5Tget_native_type(type, H5T_DIR_ASCEND);
- } H5E_END_TRY;
- if (super>=0) {
- H5_FAILED();
- printf("Operation not allowed for this type.\n");
- goto error;
- } /* end if */
-
H5Tclose(type);
+ H5Tclose(ntype);
PASSED();
reset_hdf5();
return 0;