diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-04-24 22:24:47 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-04-24 22:24:47 (GMT) |
commit | 68887995c8059f311a5f23c3e6096b4747de1a4c (patch) | |
tree | fe85740d071de84ee30b7af49d265647a965861e | |
parent | bf5b897dc9e35c68f38cd6abadf36459dfe76970 (diff) | |
download | hdf5-68887995c8059f311a5f23c3e6096b4747de1a4c.zip hdf5-68887995c8059f311a5f23c3e6096b4747de1a4c.tar.gz hdf5-68887995c8059f311a5f23c3e6096b4747de1a4c.tar.bz2 |
[svn-r3853] Purpose:
Adding Tests
Description:
Added tests for the h5dump subsetting feature.
Platforms tested:
Linux
-rwxr-xr-x | tools/h5dump/testh5dump.sh | 6 | ||||
-rw-r--r-- | tools/testfiles/tall-4s.ddl | 34 | ||||
-rw-r--r-- | tools/testfiles/tall-5s.ddl | 18 | ||||
-rw-r--r-- | tools/testfiles/tdset-3s.ddl | 27 | ||||
-rw-r--r-- | tools/testfiles/tdset2-1s.ddl | 21 |
5 files changed, 106 insertions, 0 deletions
diff --git a/tools/h5dump/testh5dump.sh b/tools/h5dump/testh5dump.sh index 05dfb09..2a64fa7 100755 --- a/tools/h5dump/testh5dump.sh +++ b/tools/h5dump/testh5dump.sh @@ -146,6 +146,12 @@ TOOLTEST tarray7.ddl tarray7.h5 # test for files with empty data TOOLTEST tempty.ddl tempty.h5 +# test Subsetting +TOOLTEST tall-4s.ddl --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5 +TOOLTEST tall-5s.ddl -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5 +TOOLTEST tdset-3s.ddl -d "/dset1[1,1;;;]" tdset.h5 +TOOLTEST tdset2-1s.ddl -d "/dset1[;3 2;4 4;1 4]" tdset2.h5 + # test XML TOOLTEST tall.h5.xml --xml tall.h5 TOOLTEST tattr.h5.xml --xml tattr.h5 diff --git a/tools/testfiles/tall-4s.ddl b/tools/testfiles/tall-4s.ddl new file mode 100644 index 0000000..89b0ebe --- /dev/null +++ b/tools/testfiles/tall-4s.ddl @@ -0,0 +1,34 @@ +############################# +Expected output for 'h5dump --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5' +############################# +HDF5 "tall.h5" { +DATASET "/g1/g1.1/dset1.1.1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + SUBSET { + START ( 1, 1 ); + STRIDE ( 2, 3 ); + COUNT ( 3, 2 ); + BLOCK ( 1, 1 ); + DATA { + 1, 3, 5, 4, 12, 20 + } + } + ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + 49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32, 111, + 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } + } + ATTRIBUTE "attr2" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + 50, 110, 100, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32, 111, + 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } + } +} +} diff --git a/tools/testfiles/tall-5s.ddl b/tools/testfiles/tall-5s.ddl new file mode 100644 index 0000000..f497ae1 --- /dev/null +++ b/tools/testfiles/tall-5s.ddl @@ -0,0 +1,18 @@ +############################# +Expected output for 'h5dump -d /g1/g1.1/dset1.1.2[0;2;10;] tall.h5' +############################# +HDF5 "tall.h5" { +DATASET "/g1/g1.1/dset1.1.2" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 20 ) / ( 20 ) } + SUBSET { + START ( 0 ); + STRIDE ( 2 ); + COUNT ( 10 ); + BLOCK ( 1 ); + DATA { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 + } + } +} +} diff --git a/tools/testfiles/tdset-3s.ddl b/tools/testfiles/tdset-3s.ddl new file mode 100644 index 0000000..2f74c2c --- /dev/null +++ b/tools/testfiles/tdset-3s.ddl @@ -0,0 +1,27 @@ +############################# +Expected output for 'h5dump -d /dset1[1,1;;;] tdset.h5' +############################# +HDF5 "tdset.h5" { +DATASET "/dset1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 10, 20 ) / ( 10, 20 ) } + SUBSET { + START ( 1, 1 ); + STRIDE ( 1, 1 ); + COUNT ( 9, 19 ); + BLOCK ( 1, 1 ); + DATA { + 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 5, 6, 7, 8, 9, 10, 11, 12, 13, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 17, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18, 19, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 13, 14, 15, 16, 17, 18, 19, 20, 21, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 15, 16, 17, 18, 19, 20, 21, 22, 23, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 19, 20, 21, 22, 23, 24, 25, 26, 27, 20, 21, 22, 23, 24, + 25, 26, 27, 28 + } + } +} +} diff --git a/tools/testfiles/tdset2-1s.ddl b/tools/testfiles/tdset2-1s.ddl new file mode 100644 index 0000000..97fcd9d --- /dev/null +++ b/tools/testfiles/tdset2-1s.ddl @@ -0,0 +1,21 @@ +############################# +Expected output for 'h5dump -d /dset1[;3 2;4 4;1 4] tdset2.h5' +############################# +HDF5 "tdset2.h5" { +DATASET "/dset1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 10, 20 ) / ( H5S_UNLIMITED, 20 ) } + SUBSET { + START ( 0, 0 ); + STRIDE ( 3, 2 ); + COUNT ( 4, 4 ); + BLOCK ( 1, 4 ); + DATA { + 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 2, 3, 4, 5, + 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 4, 5, 6, 7, 4, 5, 6, 7, + 4, 5, 6, 7, 4, 5, 6, 7, 6, 7, 8, 9, 6, 7, 8, 9, 6, 7, 8, 9, + 6, 7, 8, 9 + } + } +} +} |