From fab6ed834692c3f6535676c48702b7c25a3e1dbb Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Thu, 23 Nov 2017 05:02:13 -0700 Subject: [PATCH] combined two tests to eliminate dependency --- h5_test/tst_h_rd_cmp.c | 62 ------------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 h5_test/tst_h_rd_cmp.c diff --git a/h5_test/tst_h_rd_cmp.c b/h5_test/tst_h_rd_cmp.c deleted file mode 100644 index 4c733a855..000000000 --- a/h5_test/tst_h_rd_cmp.c +++ /dev/null @@ -1,62 +0,0 @@ -/* This is part of the netCDF package. - Copyright 2007 University Corporation for Atmospheric Research/Unidata - See COPYRIGHT file for conditions of use. - -n Test HDF5 compound types. -*/ - -#include "h5_err_macros.h" -#include - -#define FILE_NAME "tst_h_wrt_cmp.h5" -#define DIM1_LEN 3 -#define COMPOUND_NAME "cmp" -#define VAR_NAME "var" - -int -main() -{ - hid_t fileid, access_plist, spaceid, typeid; - hid_t datasetid; - struct s1 { - unsigned char c1; - double d; - } data[DIM1_LEN]; - int i; - - printf("\n*** Checking HDF5 compound types (we're almost there kids).\n"); - printf("*** Checking packing of HDF5 compound types..."); - - /* Open file. */ - if ((access_plist = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR; - if (H5Pset_fclose_degree(access_plist, H5F_CLOSE_STRONG)) ERR; - if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDONLY, access_plist)) < 0) ERR; - - /* Open dataset. */ - if ((datasetid = H5Dopen1(fileid, VAR_NAME)) < 0) ERR; - - /* Check space. */ - if ((spaceid = H5Dget_space(datasetid)) < 0) ERR; - if (H5Sget_simple_extent_ndims(spaceid) != 1) ERR; - if (H5Sget_simple_extent_npoints(spaceid) != DIM1_LEN) ERR; - - /* Get type. */ - if ((typeid = H5Dget_type(datasetid)) < 0) ERR; - -/* if ((native_type = H5Tget_native_type(typeid, H5T_DIR_DEFAULT)) < 0) ERR;*/ - - /* Read the data. */ - if (H5Dread(datasetid, typeid, H5S_ALL, H5S_ALL, H5P_DEFAULT, - data) < 0) ERR; - - /* Check the data. */ - for (i=0; i