From 7144b18c76d32ebe73cb64ae30c143ce47f1a574 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 17 May 2010 10:44:57 -0500 Subject: [svn-r18826] Added packed bits tests on Compound and Array data types. Tested: AlbertPax. Will do h5committest after check in. --- tools/h5dump/testh5dump.sh.in | 4 +++ tools/testfiles/tpbitsArray.ddl | 17 ++++++++++ tools/testfiles/tpbitsCompound.ddl | 69 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 tools/testfiles/tpbitsArray.ddl create mode 100644 tools/testfiles/tpbitsCompound.ddl diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index e8145ce..d18a6b0 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -536,6 +536,10 @@ $xCMD tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5 $xCMD tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5 # Maximum number of packed bits. $xCMD tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 +# Compound type. +$xCMD tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5 +# Array type. +$xCMD tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5 # Test Error handling. # Too many packed bits requested. Max is 8 for now. $xCMD tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 diff --git a/tools/testfiles/tpbitsArray.ddl b/tools/testfiles/tpbitsArray.ddl new file mode 100644 index 0000000..a20cbb2 --- /dev/null +++ b/tools/testfiles/tpbitsArray.ddl @@ -0,0 +1,17 @@ +############################# +Expected output for 'h5dump -d /Dataset1 -M 0,1,1,1 tarray1.h5' +############################# +HDF5 "tarray1.h5" { +DATASET "/Dataset1" { + DATATYPE H5T_ARRAY { [4] H5T_STD_I32LE } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0): [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ] + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0): [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ] + } +} +} diff --git a/tools/testfiles/tpbitsCompound.ddl b/tools/testfiles/tpbitsCompound.ddl new file mode 100644 index 0000000..87df46f --- /dev/null +++ b/tools/testfiles/tpbitsCompound.ddl @@ -0,0 +1,69 @@ +############################# +Expected output for 'h5dump -d /dset1 -M 0,1,1,1 tcompound.h5' +############################# +HDF5 "tcompound.h5" { +DATASET "/dset1" { + DATATYPE H5T_COMPOUND { + H5T_STD_I32BE "a_name"; + H5T_IEEE_F32BE "b_name"; + H5T_IEEE_F64BE "c_name"; + } + DATASPACE SIMPLE { ( 5 ) / ( 5 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0): { + 0, + 0, + 1 + }, + (1): { + 1, + 1, + 0.5 + }, + (2): { + 0, + 4, + 0.333333 + }, + (3): { + 1, + 9, + 0.25 + }, + (4): { + 0, + 16, + 0.2 + } + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0): { + 0, + 0, + 1 + }, + (1): { + 0, + 1, + 0.5 + }, + (2): { + 1, + 4, + 0.333333 + }, + (3): { + 1, + 9, + 0.25 + }, + (4): { + 0, + 16, + 0.2 + } + } +} +} -- cgit v0.12