summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-26 14:03:11 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-26 14:03:11 (GMT)
commit670e5d7aabc9335e59c4fd03ab26c30e21e06da0 (patch)
treea47ddff6c752444b1d8574b696e4b8dbcf72c616 /hl/test
parente0fa2a2e0e9f6e74ce7885b72d9ac54d73842d4e (diff)
downloadhdf5-670e5d7aabc9335e59c4fd03ab26c30e21e06da0.zip
hdf5-670e5d7aabc9335e59c4fd03ab26c30e21e06da0.tar.gz
hdf5-670e5d7aabc9335e59c4fd03ab26c30e21e06da0.tar.bz2
[svn-r26312] Merged r26294 from the trunk into the branch.
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/test_lite.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 9a15957..d94d1ee 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;