diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-02-24 21:53:56 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-02-24 21:53:56 (GMT) |
commit | 2ca5b16a9fd79d240d5e4ebe4689033c6c7182ad (patch) | |
tree | 30e44b12fa5cfd92d8524fcf2717e19ec21e2043 /hl/test/test_lite.c | |
parent | 3f72ec11cdd07c30ee0340e3c1e9b13d88495807 (diff) | |
parent | 48d9c30923a5d298670cf1f8e930c9a9624f80b9 (diff) | |
download | hdf5-2ca5b16a9fd79d240d5e4ebe4689033c6c7182ad.zip hdf5-2ca5b16a9fd79d240d5e4ebe4689033c6c7182ad.tar.gz hdf5-2ca5b16a9fd79d240d5e4ebe4689033c6c7182ad.tar.bz2 |
[svn-r26296] Merge r26050 through 26295 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'hl/test/test_lite.c')
-rw-r--r-- | hl/test/test_lite.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index d61d6cf..19d3759 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -36,10 +36,12 @@ #define DIM 6 +#define ATTR_NAME_SUB "att" #define ATTR1_NAME "attr string" #define ATTR2_NAME "attr char" #define ATTR3_NAME "attr short" #define ATTR4_NAME "attr int" +#define ATTR_NAME_EXT "att int ext" #define ATTR5_NAME "attr long" #define ATTR6_NAME "attr uchar" #define ATTR7_NAME "attr ushort" @@ -646,6 +648,14 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name ) if ( H5LTset_attribute_int( loc_id, obj_name, ATTR4_NAME, attr_int_in, (size_t)5 ) < 0 ) return -1; + /* Set the attribute which is a substring of an existing attribute */ + if ( H5LTset_attribute_int( loc_id, obj_name, ATTR_NAME_SUB, attr_int_in, (size_t)5 ) < 0 ) + return -1; + + /* Set the attribute which is an extension of an existing attribute */ + if ( H5LTset_attribute_int( loc_id, obj_name, ATTR_NAME_EXT, attr_int_in, (size_t)5 ) < 0 ) + return -1; + PASSED(); /*------------------------------------------------------------------------- @@ -666,6 +676,26 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name ) } } + if ( H5LTget_attribute_int( loc_id, obj_name, ATTR_NAME_SUB, attr_int_out ) < 0 ) + return -1; + + for (i = 0; i < 5; i++) + { + if ( attr_int_in[i] != attr_int_out[i] ) { + return -1; + } + } + + if ( H5LTget_attribute_int( loc_id, obj_name, ATTR_NAME_EXT, attr_int_out ) < 0 ) + return -1; + + for (i = 0; i < 5; i++) + { + if ( attr_int_in[i] != attr_int_out[i] ) { + return -1; + } + } + /* Get the attribute */ if ( H5LTget_attribute( loc_id, obj_name, ATTR4_NAME, H5T_NATIVE_INT, attr_int_out ) < 0 ) return -1; |