summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2010-05-17 15:44:57 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2010-05-17 15:44:57 (GMT)
commit7144b18c76d32ebe73cb64ae30c143ce47f1a574 (patch)
tree116219f8c385340a007802d1b42c04b0a6e3ce79 /tools
parentd14650035782833c86e00a53407d47ccaf570067 (diff)
downloadhdf5-7144b18c76d32ebe73cb64ae30c143ce47f1a574.zip
hdf5-7144b18c76d32ebe73cb64ae30c143ce47f1a574.tar.gz
hdf5-7144b18c76d32ebe73cb64ae30c143ce47f1a574.tar.bz2
[svn-r18826] Added packed bits tests on Compound and Array data types.
Tested: AlbertPax. Will do h5committest after check in.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/testh5dump.sh.in4
-rw-r--r--tools/testfiles/tpbitsArray.ddl17
-rw-r--r--tools/testfiles/tpbitsCompound.ddl69
3 files changed, 90 insertions, 0 deletions
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
+ }
+ }
+}
+}