diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 90 | ||||
-rw-r--r-- | tools/testfiles/torderattr.h5 | bin | 2728 -> 4120 bytes | |||
-rw-r--r-- | tools/testfiles/torderattr1.ddl | 46 | ||||
-rw-r--r-- | tools/testfiles/torderattr1.h5.xml | 114 | ||||
-rw-r--r-- | tools/testfiles/torderattr2.ddl | 46 | ||||
-rw-r--r-- | tools/testfiles/torderattr2.h5.xml | 114 | ||||
-rw-r--r-- | tools/testfiles/torderattr3.ddl | 46 | ||||
-rw-r--r-- | tools/testfiles/torderattr3.h5.xml | 114 | ||||
-rw-r--r-- | tools/testfiles/torderattr4.ddl | 50 | ||||
-rw-r--r-- | tools/testfiles/torderattr4.h5.xml | 114 |
10 files changed, 709 insertions, 25 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 0a6b607..d6893d9 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -5950,16 +5950,41 @@ gent_attr_creation_order(void) goto out; /*------------------------------------------------------------------------- - * create a dataset and atributes in it + * create a dataset with creation order tracked for attributes and atributes in it *------------------------------------------------------------------------- */ /* create a dataset */ - if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) + if((did = H5Dcreate2(fid, "dt", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) goto out; /* add attributes */ - for(i = 0; i < 3; i++) { + for(i = 0; i < 3; i++) + { + if((aid = H5Acreate2(did, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* close attribute */ + if(H5Aclose(aid) < 0) + goto out; + } /* end for */ + + if(H5Dclose(did) < 0) + goto out; + + +/*------------------------------------------------------------------------- + * create a dataset without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ + + /* create a dataset */ + if((did = H5Dcreate2(fid, "d", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* add attributes */ + for(i = 0; i < 3; i++) + { if((aid = H5Acreate2(did, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; @@ -5974,11 +5999,11 @@ gent_attr_creation_order(void) /*------------------------------------------------------------------------- - * create a group and atributes in it + * create a group with creation order tracked for attributes and atributes in it *------------------------------------------------------------------------- */ - if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) + if((gid = H5Gcreate2(fid, "gt", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) goto out; /* add attributes */ @@ -5997,14 +6022,38 @@ gent_attr_creation_order(void) goto out; /*------------------------------------------------------------------------- - * create a named datatype and atributes in it + * create a group without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ + + if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* add attributes */ + for(i = 0; i < 3; i++) + { + if((aid = H5Acreate2(gid, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* close attribute */ + if(H5Aclose(aid) < 0) + goto out; + + } /* end for */ + + if(H5Gclose(gid) < 0) + goto out; + + +/*------------------------------------------------------------------------- + * create a named datatype with creation order tracked for attributes and atributes in it *------------------------------------------------------------------------- */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) goto out; - if((H5Tcommit2(fid, "t", tid, H5P_DEFAULT, tcpl_id, H5P_DEFAULT)) < 0) + if((H5Tcommit2(fid, "tt", tid, H5P_DEFAULT, tcpl_id, H5P_DEFAULT)) < 0) goto out; /* add attributes */ @@ -6021,6 +6070,33 @@ gent_attr_creation_order(void) if(H5Tclose(tid) < 0) goto out; + +/*------------------------------------------------------------------------- + * create a named datatype without creation order tracked for attributes and atributes in it + *------------------------------------------------------------------------- + */ + + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) + goto out; + + if((H5Tcommit2(fid, "t", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* add attributes */ + for(i = 0; i < 3; i++) + { + if((aid = H5Acreate2(tid, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto out; + + /* close attribute */ + if(H5Aclose(aid) < 0) + goto out; + + } /* end for */ + + if(H5Tclose(tid) < 0) + goto out; + /*------------------------------------------------------------------------- * add some attributes to the root group *------------------------------------------------------------------------- diff --git a/tools/testfiles/torderattr.h5 b/tools/testfiles/torderattr.h5 Binary files differindex 57b1a87..bafa846 100644 --- a/tools/testfiles/torderattr.h5 +++ b/tools/testfiles/torderattr.h5 diff --git a/tools/testfiles/torderattr1.ddl b/tools/testfiles/torderattr1.ddl index 5572ef1..3c4bd6b 100644 --- a/tools/testfiles/torderattr1.ddl +++ b/tools/testfiles/torderattr1.ddl @@ -15,7 +15,23 @@ GROUP "/" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR } - DATASET "dset" { + DATASET "d" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } + DATASET "dt" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR ATTRIBUTE "a" { @@ -45,6 +61,20 @@ GROUP "/" { DATASPACE SCALAR } } + GROUP "gt" { + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } DATATYPE "t" H5T_STD_I32LE; ATTRIBUTE "a" { DATATYPE H5T_STD_U8LE @@ -59,5 +89,19 @@ GROUP "/" { DATASPACE SCALAR } + DATATYPE "tt" H5T_STD_I32LE; + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } } diff --git a/tools/testfiles/torderattr1.h5.xml b/tools/testfiles/torderattr1.h5.xml index 7ee2f10..fcbe444 100644 --- a/tools/testfiles/torderattr1.h5.xml +++ b/tools/testfiles/torderattr1.h5.xml @@ -43,7 +43,7 @@ Expected output for 'h5dump --xml -H --sort_by=name --sort_order=ascending torde <hdf5:NoData/> </hdf5:Data> </hdf5:Attribute> - <hdf5:Dataset Name="dset" OBJ-XID="xid_800" H5Path= "/dset" Parents="xid_96" H5ParentPaths="/"> + <hdf5:Dataset Name="d" OBJ-XID="xid_1412" H5Path= "/d" Parents="xid_96" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> @@ -103,7 +103,108 @@ Expected output for 'h5dump --xml -H --sort_by=name --sort_order=ascending torde <hdf5:NoData/> </hdf5:Data> </hdf5:Dataset> - <hdf5:Group Name="g" OBJ-XID="xid_1412" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Dataset Name="dt" OBJ-XID="xid_800" H5Path= "/dt" Parents="xid_96" H5ParentPaths="/"> + <hdf5:StorageLayout> + <hdf5:ContiguousLayout/> + </hdf5:StorageLayout> + <hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late"> + <hdf5:FillValue> + <hdf5:NoFill/> + </hdf5:FillValue> + </hdf5:FillValueInfo> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Dataset> + <hdf5:Group Name="g" OBJ-XID="xid_2612" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + </hdf5:Group> + <hdf5:Group Name="gt" OBJ-XID="xid_1700" H5Path="/gt" Parents="xid_96" H5ParentPaths="/" > <hdf5:Attribute Name="a"> <hdf5:Dataspace> <hdf5:ScalarDataspace /> @@ -144,7 +245,14 @@ Expected output for 'h5dump --xml -H --sort_by=name --sort_order=ascending torde </hdf5:Data> </hdf5:Attribute> </hdf5:Group> - <hdf5:NamedDataType Name="t" OBJ-XID="xid_2324" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:NamedDataType Name="t" OBJ-XID="xid_3720" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </hdf5:AtomicType> + </hdf5:DataType> + </hdf5:NamedDataType> + <hdf5:NamedDataType Name="tt" OBJ-XID="xid_3508" H5Path="/tt" Parents="xid_96" H5ParentPaths="/"> <hdf5:DataType> <hdf5:AtomicType> <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> diff --git a/tools/testfiles/torderattr2.ddl b/tools/testfiles/torderattr2.ddl index c0862ed..89799d3 100644 --- a/tools/testfiles/torderattr2.ddl +++ b/tools/testfiles/torderattr2.ddl @@ -15,6 +15,20 @@ GROUP "/" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR } + DATATYPE "tt" H5T_STD_I32LE; + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + DATATYPE "t" H5T_STD_I32LE; ATTRIBUTE "c" { DATATYPE H5T_STD_U8LE @@ -29,6 +43,20 @@ GROUP "/" { DATASPACE SCALAR } + GROUP "gt" { + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } GROUP "g" { ATTRIBUTE "c" { DATATYPE H5T_STD_U8LE @@ -43,7 +71,23 @@ GROUP "/" { DATASPACE SCALAR } } - DATASET "dset" { + DATASET "dt" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } + DATASET "d" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR ATTRIBUTE "c" { diff --git a/tools/testfiles/torderattr2.h5.xml b/tools/testfiles/torderattr2.h5.xml index 9f5d216..5f2b434 100644 --- a/tools/testfiles/torderattr2.h5.xml +++ b/tools/testfiles/torderattr2.h5.xml @@ -43,14 +43,21 @@ Expected output for 'h5dump --xml -H --sort_by=name --sort_order=descending tord <hdf5:NoData/> </hdf5:Data> </hdf5:Attribute> - <hdf5:NamedDataType Name="t" OBJ-XID="xid_2324" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:NamedDataType Name="tt" OBJ-XID="xid_3508" H5Path="/tt" Parents="xid_96" H5ParentPaths="/"> <hdf5:DataType> <hdf5:AtomicType> <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> </hdf5:AtomicType> </hdf5:DataType> </hdf5:NamedDataType> - <hdf5:Group Name="g" OBJ-XID="xid_1412" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:NamedDataType Name="t" OBJ-XID="xid_3720" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </hdf5:AtomicType> + </hdf5:DataType> + </hdf5:NamedDataType> + <hdf5:Group Name="gt" OBJ-XID="xid_1700" H5Path="/gt" Parents="xid_96" H5ParentPaths="/" > <hdf5:Attribute Name="c"> <hdf5:Dataspace> <hdf5:ScalarDataspace /> @@ -91,7 +98,108 @@ Expected output for 'h5dump --xml -H --sort_by=name --sort_order=descending tord </hdf5:Data> </hdf5:Attribute> </hdf5:Group> - <hdf5:Dataset Name="dset" OBJ-XID="xid_800" H5Path= "/dset" Parents="xid_96" H5ParentPaths="/"> + <hdf5:Group Name="g" OBJ-XID="xid_2612" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + </hdf5:Group> + <hdf5:Dataset Name="dt" OBJ-XID="xid_800" H5Path= "/dt" Parents="xid_96" H5ParentPaths="/"> + <hdf5:StorageLayout> + <hdf5:ContiguousLayout/> + </hdf5:StorageLayout> + <hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late"> + <hdf5:FillValue> + <hdf5:NoFill/> + </hdf5:FillValue> + </hdf5:FillValueInfo> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Dataset> + <hdf5:Dataset Name="d" OBJ-XID="xid_1412" H5Path= "/d" Parents="xid_96" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> diff --git a/tools/testfiles/torderattr3.ddl b/tools/testfiles/torderattr3.ddl index 146767c..5dba83e 100644 --- a/tools/testfiles/torderattr3.ddl +++ b/tools/testfiles/torderattr3.ddl @@ -15,7 +15,23 @@ GROUP "/" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR } - DATASET "dset" { + DATASET "d" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } + DATASET "dt" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR ATTRIBUTE "c" { @@ -32,6 +48,20 @@ GROUP "/" { } } GROUP "g" { + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } + GROUP "gt" { ATTRIBUTE "c" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR @@ -46,6 +76,20 @@ GROUP "/" { } } DATATYPE "t" H5T_STD_I32LE; + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + + DATATYPE "tt" H5T_STD_I32LE; ATTRIBUTE "c" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR diff --git a/tools/testfiles/torderattr3.h5.xml b/tools/testfiles/torderattr3.h5.xml index 6659d1b..6488711 100644 --- a/tools/testfiles/torderattr3.h5.xml +++ b/tools/testfiles/torderattr3.h5.xml @@ -43,7 +43,67 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=ascen <hdf5:NoData/> </hdf5:Data> </hdf5:Attribute> - <hdf5:Dataset Name="dset" OBJ-XID="xid_800" H5Path= "/dset" Parents="xid_96" H5ParentPaths="/"> + <hdf5:Dataset Name="d" OBJ-XID="xid_1412" H5Path= "/d" Parents="xid_96" H5ParentPaths="/"> + <hdf5:StorageLayout> + <hdf5:ContiguousLayout/> + </hdf5:StorageLayout> + <hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late"> + <hdf5:FillValue> + <hdf5:NoFill/> + </hdf5:FillValue> + </hdf5:FillValueInfo> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Dataset> + <hdf5:Dataset Name="dt" OBJ-XID="xid_800" H5Path= "/dt" Parents="xid_96" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> @@ -103,7 +163,48 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=ascen <hdf5:NoData/> </hdf5:Data> </hdf5:Dataset> - <hdf5:Group Name="g" OBJ-XID="xid_1412" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Group Name="g" OBJ-XID="xid_2612" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + </hdf5:Group> + <hdf5:Group Name="gt" OBJ-XID="xid_1700" H5Path="/gt" Parents="xid_96" H5ParentPaths="/" > <hdf5:Attribute Name="c"> <hdf5:Dataspace> <hdf5:ScalarDataspace /> @@ -144,7 +245,14 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=ascen </hdf5:Data> </hdf5:Attribute> </hdf5:Group> - <hdf5:NamedDataType Name="t" OBJ-XID="xid_2324" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:NamedDataType Name="t" OBJ-XID="xid_3720" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </hdf5:AtomicType> + </hdf5:DataType> + </hdf5:NamedDataType> + <hdf5:NamedDataType Name="tt" OBJ-XID="xid_3508" H5Path="/tt" Parents="xid_96" H5ParentPaths="/"> <hdf5:DataType> <hdf5:AtomicType> <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> diff --git a/tools/testfiles/torderattr4.ddl b/tools/testfiles/torderattr4.ddl index cd46d41..fc59f6a 100644 --- a/tools/testfiles/torderattr4.ddl +++ b/tools/testfiles/torderattr4.ddl @@ -15,7 +15,7 @@ GROUP "/" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR } - DATATYPE "t" H5T_STD_I32LE; + DATATYPE "tt" H5T_STD_I32LE; ATTRIBUTE "a" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR @@ -29,7 +29,21 @@ GROUP "/" { DATASPACE SCALAR } - GROUP "g" { + DATATYPE "t" H5T_STD_I32LE; + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + + GROUP "gt" { ATTRIBUTE "a" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR @@ -43,7 +57,21 @@ GROUP "/" { DATASPACE SCALAR } } - DATASET "dset" { + GROUP "g" { + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } + DATASET "dt" { DATATYPE H5T_STD_U8LE DATASPACE SCALAR ATTRIBUTE "a" { @@ -59,5 +87,21 @@ GROUP "/" { DATASPACE SCALAR } } + DATASET "d" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + ATTRIBUTE "c" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "b" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + ATTRIBUTE "a" { + DATATYPE H5T_STD_U8LE + DATASPACE SCALAR + } + } } } diff --git a/tools/testfiles/torderattr4.h5.xml b/tools/testfiles/torderattr4.h5.xml index 82e57e0..c6fa0ad 100644 --- a/tools/testfiles/torderattr4.h5.xml +++ b/tools/testfiles/torderattr4.h5.xml @@ -43,14 +43,21 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=desce <hdf5:NoData/> </hdf5:Data> </hdf5:Attribute> - <hdf5:NamedDataType Name="t" OBJ-XID="xid_2324" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:NamedDataType Name="tt" OBJ-XID="xid_3508" H5Path="/tt" Parents="xid_96" H5ParentPaths="/"> <hdf5:DataType> <hdf5:AtomicType> <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> </hdf5:AtomicType> </hdf5:DataType> </hdf5:NamedDataType> - <hdf5:Group Name="g" OBJ-XID="xid_1412" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:NamedDataType Name="t" OBJ-XID="xid_3720" H5Path="/t" Parents="xid_96" H5ParentPaths="/"> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </hdf5:AtomicType> + </hdf5:DataType> + </hdf5:NamedDataType> + <hdf5:Group Name="gt" OBJ-XID="xid_1700" H5Path="/gt" Parents="xid_96" H5ParentPaths="/" > <hdf5:Attribute Name="a"> <hdf5:Dataspace> <hdf5:ScalarDataspace /> @@ -91,7 +98,48 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=desce </hdf5:Data> </hdf5:Attribute> </hdf5:Group> - <hdf5:Dataset Name="dset" OBJ-XID="xid_800" H5Path= "/dset" Parents="xid_96" H5ParentPaths="/"> + <hdf5:Group Name="g" OBJ-XID="xid_2612" H5Path="/g" Parents="xid_96" H5ParentPaths="/" > + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + </hdf5:Group> + <hdf5:Dataset Name="dt" OBJ-XID="xid_800" H5Path= "/dt" Parents="xid_96" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> @@ -151,5 +199,65 @@ Expected output for 'h5dump --xml -H --sort_by=creation_order --sort_order=desce <hdf5:NoData/> </hdf5:Data> </hdf5:Dataset> + <hdf5:Dataset Name="d" OBJ-XID="xid_1412" H5Path= "/d" Parents="xid_96" H5ParentPaths="/"> + <hdf5:StorageLayout> + <hdf5:ContiguousLayout/> + </hdf5:StorageLayout> + <hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late"> + <hdf5:FillValue> + <hdf5:NoFill/> + </hdf5:FillValue> + </hdf5:FillValueInfo> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Attribute Name="c"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="b"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Attribute Name="a"> + <hdf5:Dataspace> + <hdf5:ScalarDataspace /> + </hdf5:Dataspace> + <hdf5:DataType> + <hdf5:AtomicType> + <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </hdf5:AtomicType> + </hdf5:DataType> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Attribute> + <hdf5:Data> + <hdf5:NoData/> + </hdf5:Data> + </hdf5:Dataset> </hdf5:RootGroup> </hdf5:HDF5-File> |