summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5dump/h5dumpgentest.c')
-rw-r--r--tools/test/h5dump/h5dumpgentest.c87
1 files changed, 86 insertions, 1 deletions
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 9358fbb..aaf5c3e 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -113,6 +113,7 @@
#define FILE83 "tvlenstr_array.h5"
#define FILE84 "tudfilter.h5"
#define FILE85 "tgrpnullspace.h5"
+#define FILE87 "tintsnodata.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -292,7 +293,7 @@ typedef struct s1_t {
#define THRESHOLD10 10 /* Free-space section threshold */
#define FSPACE_PAGE_SIZE 8192 /* File space page size */
-/* "FILE66" macros and for FILE69 */
+/* "FILE66" macros and for FILE69, FILE87 */
#define F66_XDIM 8
#define F66_DATASETU08 "DU08BITS"
#define F66_DATASETS08 "DS08BITS"
@@ -7525,6 +7526,89 @@ gent_attr_intsize(void)
H5Gclose(root);
H5Fclose(fid);
}
+static void
+gent_nodata(void)
+{
+ hid_t fid, dataset, space;
+ hsize_t dims[2];
+ uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits;
+ uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits;
+ uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits;
+ uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits;
+ int8_t dset8[F66_XDIM][F66_YDIM8], val8bits;
+ int16_t dset16[F66_XDIM][F66_YDIM16], val16bits;
+ int32_t dset32[F66_XDIM][F66_YDIM32], val32bits;
+ int64_t dset64[F66_XDIM][F66_YDIM64], val64bits;
+ double dsetdbl[F66_XDIM][F66_YDIM8];
+ unsigned int i, j;
+
+ fid = H5Fcreate(FILE87, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Dataset of 8 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU08, H5T_STD_U8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM16;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU16, H5T_STD_U16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM32;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU32, H5T_STD_U32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU64, H5T_STD_U64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 8 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS08, H5T_STD_I8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM16;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS16, H5T_STD_I16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM32;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS32, H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS64, H5T_STD_I64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Double Dummy set for failure tests */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DUMMYDBL, H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(space);
+ H5Dclose(dataset);
+ H5Fclose(fid);
+}
+
/*-------------------------------------------------------------------------
* Function: gent_charsets
@@ -10563,6 +10647,7 @@ int main(void)
gent_intattrscalars();
gent_intsattrs();
gent_bitnopaquefields();
+ gent_nodata();
gent_intsfourdims();
gent_null_space_group();