[svn-r728] Added tests and expected optput for dumper options.

This commit is contained in:
Ruey-Hsia Li 1998-09-28 10:12:14 -05:00
parent 1b13f305ad
commit af405e8a6f
18 changed files with 360 additions and 27 deletions

View File

@ -1,16 +1,16 @@
/*
* Generate the binary hdf5 files for the h5dump tests.
*/
#include "hdf5.h"
#define FILE1 "tgroup.h5"
#define FILE2 "tdset.h5"
#define FILE3 "tattr.h5"
#define FILE4 "tslink.h5"
#define FILE5 "tall.h5"
#define FILE5 "thlink.h5"
#define FILE6 "tall.h5"
static void test_group() {
static void test_group(void) {
hid_t fid, group;
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@ -54,7 +54,7 @@ hid_t fid, group;
H5Fclose(fid);
}
static void test_dataset() {
static void test_dataset(void) {
hid_t fid, dataset, space;
hsize_t dims[2];
int dset1[10][20];
@ -69,22 +69,22 @@ int i, j;
/* dset1 */
dims[0] = 10; dims[1] = 20;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(fid, "/dset1", H5T_NATIVE_INT, space, H5P_DEFAULT);
dataset = H5Dcreate(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 20; j++)
dset1[i][j] = j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
H5Dclose(dataset);
/* dset2 */
dims[0] = 30; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(fid, "/dset2", H5T_NATIVE_DOUBLE, space, H5P_DEFAULT);
dataset = H5Dcreate(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT);
for (i = 0; i < 30; i++)
for (j = 0; j < 10; j++)
dset2[i][j] = j*1.1 + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_IEEE_F64BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@ -97,7 +97,7 @@ static void test_nameddt() {
}
*/
static void test_attribute() {
static void test_attribute(void) {
hid_t fid, root, space, attr;
hsize_t dims[2];
char buf[60];
@ -121,18 +121,18 @@ double d[10];
/* attribute 2 */
dims[0] = 20;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr2", H5T_NATIVE_INT, space, H5P_DEFAULT);
attr = H5Acreate (root, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
for (i = 0; i < 20; i++) data[i] = i+1;
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Awrite(attr, H5T_STD_I32BE, data);
H5Sclose(space);
H5Aclose(attr);
/* attribute 3 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (root, "attr3", H5T_NATIVE_DOUBLE, space, H5P_DEFAULT);
attr = H5Acreate (root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT);
for (i = 0; i < 10; i++) d[i] = 0.0001 * i+ 0.0001;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Awrite(attr, H5T_IEEE_F64BE, d);
H5Sclose(space);
H5Aclose(attr);
@ -141,7 +141,7 @@ double d[10];
H5Fclose(fid);
}
static void test_softlink() {
static void test_softlink(void) {
hid_t fid, root;
herr_t status;
@ -159,6 +159,44 @@ herr_t status;
}
/*
/
/ | \
g1 g2 dset
/ \ |
link1 link2 link3
(g2) (dset) (dset) */
static void test_hardlink(void) {
hid_t fid, group, dataset, space;
hsize_t dim;
int i, dset[5];
fid = H5Fcreate(FILE5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
dim = 5;
space = H5Screate_simple(1, &dim, NULL);
dataset = H5Dcreate(fid, "/dset", H5T_STD_I32BE, space, H5P_DEFAULT);
for (i = 0; i < 5; i++) dset[i] = i;
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
H5Sclose(space);
H5Dclose(dataset);
group = H5Gcreate (fid, "/g1", 0);
H5Glink (group, H5G_LINK_HARD, "/dset", "link2");
H5Gclose(group);
group = H5Gcreate (fid, "/g2", 0);
H5Glink (group, H5G_LINK_HARD, "/dset", "link3");
H5Gclose(group);
group = H5Gopen(fid, "/g1");
H5Glink (group, H5G_LINK_HARD, "/g2", "link1");
H5Gclose(group);
H5Fclose(fid);
}
/*
@ -171,7 +209,7 @@ g2 : dset2.1 dset2.2
*/
static void test_all() {
static void test_all(void) {
hid_t fid, group, attr, dataset, space;
hsize_t dims[2];
int data[2][2], dset1[10][10], dset2[20];
@ -179,7 +217,7 @@ char buf[60];
int i, j;
float dset2_1[10], dset2_2[3][5];
fid = H5Fcreate(FILE5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
fid = H5Fcreate(FILE6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* create groups */
group = H5Gcreate (fid, "/g1", 0);
@ -210,9 +248,9 @@ float dset2_1[10], dset2_2[3][5];
dims[0] = 2; dims[1] = 2;
space = H5Screate_simple(2, dims, NULL);
attr = H5Acreate (group, "attr2", H5T_NATIVE_INT, space, H5P_DEFAULT);
attr = H5Acreate (group, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Awrite(attr, H5T_STD_I32BE, data);
H5Sclose(space);
H5Aclose(attr);
@ -223,11 +261,11 @@ float dset2_1[10], dset2_2[3][5];
/* dset1.1.1 */
dims[0] = 10; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset1.1.1", H5T_NATIVE_INT, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset1.1.1", H5T_STD_I32BE, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
dset1[i][j] = j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
/* attributes of dset1.1.1 */
@ -252,10 +290,10 @@ float dset2_1[10], dset2_2[3][5];
/* dset1.1.2 */
dims[0] = 20;
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate(group, "dset1.1.2", H5T_NATIVE_INT, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset1.1.2", H5T_STD_I32BE, space, H5P_DEFAULT);
for (i = 0; i < 20; i++)
dset2[i] = i;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Dwrite(dataset, H5T_STD_I32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
H5Sclose(space);
H5Dclose(dataset);
@ -271,21 +309,21 @@ float dset2_1[10], dset2_2[3][5];
/* dset2.1 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
dataset = H5Dcreate(group, "dset2.1", H5T_NATIVE_FLOAT, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2.1", H5T_IEEE_F32BE, space, H5P_DEFAULT);
for (i = 0; i < 10; i++)
dset2_1[i] = i*0.1+1;
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Dwrite(dataset, H5T_IEEE_F32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_1);
H5Sclose(space);
H5Dclose(dataset);
/* dset2.2 */
dims[0] = 3; dims[1] = 5;
space = H5Screate_simple(2, dims, NULL);
dataset = H5Dcreate(group, "dset2.2", H5T_NATIVE_FLOAT, space, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2.2", H5T_IEEE_F32BE, space, H5P_DEFAULT);
for (i = 0; i < 3; i++)
for (j = 0; j < 5; j++)
dset2_2[i][j] = i*0.1;
H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Dwrite(dataset, H5T_IEEE_F32BE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_2);
H5Sclose(space);
H5Dclose(dataset);
@ -296,13 +334,15 @@ float dset2_1[10], dset2_2[3][5];
}
void main(){
int main(void){
test_group();
test_attribute();
test_softlink();
test_dataset();
test_hardlink();
test_all();
return 0;
}

View File

@ -0,0 +1,60 @@
#############################
Expected output for '../h5dump tall.h5'
#############################
HDF5 "tall.h5" {
GROUP "/" {
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
DATA {"abcdefghi\000"}
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 2, 2 ) ( 2, 2 ) }
DATA {0,1,2,3}
}
GROUP "g1" {
GROUP "g1.1" {
DATASET "dset1.1.1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 10 ) ( 10, 10 ) }
DATA {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
DATA {"1st attribute of dset1.1.1\000"}
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
DATA {"2nd attribute of dset1.1.1\000"}
}
}
DATASET "dset1.1.2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 20 ) ( 20 ) }
DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
}
}
GROUP "g1.2" {
GROUP "g1.2.1" {
SOFTLINK "slink" {
linktarget "../somevalue/."
}
}
}
}
GROUP "g2" {
DATASET "dset2.1" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
DATA {1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9}
}
DATASET "dset2.2" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 3, 5 ) ( 3, 5 ) }
DATA {0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2}
}
}
}
}

View File

@ -0,0 +1,27 @@
#############################
Expected output for '../h5dump -header -g /g1/g1.1 -a attr2 tall.h5'
#############################
HDF5 "tall.h5" {
GROUP "/g1/g1.1" {
DATASET "dset1.1.1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 10 ) ( 10, 10 ) }
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 27 ) ( 27 ) }
}
}
DATASET "dset1.1.2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 20 ) ( 20 ) }
}
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 2, 2 ) ( 2, 2 ) }
}
}

View File

@ -0,0 +1,13 @@
#############################
Expected output for '../h5dump -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5'
#############################
HDF5 "tall.h5" {
DATASET "/g2/dset2.1" {
DATATYPE { "H5T_IEEE_F32BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
DATA {1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9}
}
SOFTLINK "/g1/g1.2/g1.2.1/slink" {
linktarget "../somevalue/."
}
}

Binary file not shown.

View File

@ -0,0 +1,22 @@
#############################
Expected output for '../h5dump tattr.h5'
#############################
HDF5 "tattr.h5" {
GROUP "/" {
ATTRIBUTE "attr1" {
DATATYPE { "H5T_STD_I8LE" }
DATASPACE { ARRAY ( 24 ) ( 24 ) }
DATA {"attribute of root group\000"}
}
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 20 ) ( 20 ) }
DATA {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
}
ATTRIBUTE "attr3" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 10 ) ( 10 ) }
DATA {0.0001,0.0002,0.0003,0.0004,0.0005,0.0006,0.0007,0.0008,0.0009,0.001}
}
}
}

View File

@ -0,0 +1,9 @@
#############################
Expected output for '../h5dump -header -a attr2 tattr.h5'
#############################
HDF5 "tattr.h5" {
ATTRIBUTE "attr2" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 20 ) ( 20 ) }
}
}

View File

@ -0,0 +1,8 @@
#############################
Expected output for '../h5dump -a attr4 tattr.h5'
#############################
HDF5 "tattr.h5" {
ATTRIBUTE "attr4" {
h5dump error: unable to open attribute.
}
}

View File

@ -0,0 +1,17 @@
#############################
Expected output for '../h5dump tdset.h5'
#############################
HDF5 "tdset.h5" {
GROUP "/" {
DATASET "dset1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
}
DATASET "dset2" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 30, 10 ) ( 30, 10 ) }
DATA {0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,1,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,2,3.1,4.2,5.3,6.4,7.5,8.6,9.7,10.8,11.9,3,4.1,5.2,6.3,7.4,8.5,9.6,10.7,11.8,12.9,4,5.1,6.2,7.3,8.4,9.5,10.6,11.7,12.8,13.9,5,6.1,7.2,8.3,9.4,10.5,11.6,12.7,13.8,14.9,6,7.1,8.2,9.3,10.4,11.5,12.6,13.7,14.8,15.9,7,8.1,9.2,10.3,11.4,12.5,13.6,14.7,15.8,16.9,8,9.1,10.2,11.3,12.4,13.5,14.6,15.7,16.8,17.9,9,10.1,11.2,12.3,13.4,14.5,15.6,16.7,17.8,18.9,10,11.1,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,11,12.1,13.2,14.3,15.4,16.5,17.6,18.7,19.8,20.9,12,13.1,14.2,15.3,16.4,17.5,18.6,19.7,20.8,21.9,13,14.1,15.2,16.3,17.4,18.5,19.6,20.7,21.8,22.9,14,15.1,16.2,17.3,18.4,19.5,20.6,21.7,22.8,23.9,15,16.1,17.2,18.3,19.4,20.5,21.6,22.7,23.8,24.9,16,17.1,18.2,19.3,20.4,21.5,22.6,23.7,24.8,25.9,17,18.1,19.2,20.3,21.4,22.5,23.6,24.7,25.8,26.9,18,19.1,20.2,21.3,22.4,23.5,24.6,25.7,26.8,27.9,19,20.1,21.2,22.3,23.4,24.5,25.6,26.7,27.8,28.9,20,21.1,22.2,23.3,24.4,25.5,26.6,27.7,28.8,29.9,21,22.1,23.2,24.3,25.4,26.5,27.6,28.7,29.8,30.9,22,23.1,24.2,25.3,26.4,27.5,28.6,29.7,30.8,31.9,23,24.1,25.2,26.3,27.4,28.5,29.6,30.7,31.8,32.9,24,25.1,26.2,27.3,28.4,29.5,30.6,31.7,32.8,33.9,25,26.1,27.2,28.3,29.4,30.5,31.6,32.7,33.8,34.9,26,27.1,28.2,29.3,30.4,31.5,32.6,33.7,34.8,35.9,27,28.1,29.2,30.3,31.4,32.5,33.6,34.7,35.8,36.9,28,29.1,30.2,31.3,32.4,33.5,34.6,35.7,36.8,37.9,29,30.1,31.2,32.3,33.4,34.5,35.6,36.7,37.8,38.9}
}
}
}

View File

@ -0,0 +1,15 @@
#############################
Expected output for '../h5dump -d dset1 /dset2 tdset.h5'
#############################
HDF5 "tdset.h5" {
DATASET "dset1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
DATA {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
}
DATASET "/dset2" {
DATATYPE { "H5T_IEEE_F64BE" }
DATASPACE { ARRAY ( 30, 10 ) ( 30, 10 ) }
DATA {0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,1,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,2,3.1,4.2,5.3,6.4,7.5,8.6,9.7,10.8,11.9,3,4.1,5.2,6.3,7.4,8.5,9.6,10.7,11.8,12.9,4,5.1,6.2,7.3,8.4,9.5,10.6,11.7,12.8,13.9,5,6.1,7.2,8.3,9.4,10.5,11.6,12.7,13.8,14.9,6,7.1,8.2,9.3,10.4,11.5,12.6,13.7,14.8,15.9,7,8.1,9.2,10.3,11.4,12.5,13.6,14.7,15.8,16.9,8,9.1,10.2,11.3,12.4,13.5,14.6,15.7,16.8,17.9,9,10.1,11.2,12.3,13.4,14.5,15.6,16.7,17.8,18.9,10,11.1,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,11,12.1,13.2,14.3,15.4,16.5,17.6,18.7,19.8,20.9,12,13.1,14.2,15.3,16.4,17.5,18.6,19.7,20.8,21.9,13,14.1,15.2,16.3,17.4,18.5,19.6,20.7,21.8,22.9,14,15.1,16.2,17.3,18.4,19.5,20.6,21.7,22.8,23.9,15,16.1,17.2,18.3,19.4,20.5,21.6,22.7,23.8,24.9,16,17.1,18.2,19.3,20.4,21.5,22.6,23.7,24.8,25.9,17,18.1,19.2,20.3,21.4,22.5,23.6,24.7,25.8,26.9,18,19.1,20.2,21.3,22.4,23.5,24.6,25.7,26.8,27.9,19,20.1,21.2,22.3,23.4,24.5,25.6,26.7,27.8,28.9,20,21.1,22.2,23.3,24.4,25.5,26.6,27.7,28.8,29.9,21,22.1,23.2,24.3,25.4,26.5,27.6,28.7,29.8,30.9,22,23.1,24.2,25.3,26.4,27.5,28.6,29.7,30.8,31.9,23,24.1,25.2,26.3,27.4,28.5,29.6,30.7,31.8,32.9,24,25.1,26.2,27.3,28.4,29.5,30.6,31.7,32.8,33.9,25,26.1,27.2,28.3,29.4,30.5,31.6,32.7,33.8,34.9,26,27.1,28.2,29.3,30.4,31.5,32.6,33.7,34.8,35.9,27,28.1,29.2,30.3,31.4,32.5,33.6,34.7,35.8,36.9,28,29.1,30.2,31.3,32.4,33.5,34.6,35.7,36.8,37.9,29,30.1,31.2,32.3,33.4,34.5,35.6,36.7,37.8,38.9}
}
}

View File

@ -0,0 +1,9 @@
#############################
Expected output for '../h5dump -d /dset1 -header tdset.h5'
#############################
HDF5 "tdset.h5" {
DATASET "/dset1" {
DATATYPE { "H5T_STD_I32BE" }
DATASPACE { ARRAY ( 10, 20 ) ( 10, 20 ) }
}
}

View File

@ -0,0 +1,8 @@
#############################
Expected output for '../h5dump -d dset3 tdset.h5'
#############################
HDF5 "tdset.h5" {
DATASET "dset3" {
h5dump error: unable to open dset3
}
}

Binary file not shown.

View File

@ -0,0 +1,33 @@
#############################
Expected output for '../h5dump tgroup.h5'
#############################
HDF5 "tgroup.h5" {
GROUP "/" {
GROUP "g1" {
GROUP "g1.1" {
}
GROUP "g1.2" {
}
}
GROUP "g2" {
GROUP "g2.1" {
GROUP "g2.1.1" {
}
GROUP "g2.1.2" {
}
GROUP "g2.1.3" {
}
}
}
GROUP "g3" {
GROUP "g3.1" {
}
GROUP "g3.2" {
}
GROUP "g3.3" {
}
GROUP "g3.4" {
}
}
}
}

View File

@ -0,0 +1,33 @@
#############################
Expected output for '../h5dump -g / tgroup.h5'
#############################
HDF5 "tgroup.h5" {
GROUP "/" {
GROUP "g1" {
GROUP "g1.1" {
}
GROUP "g1.2" {
}
}
GROUP "g2" {
GROUP "g2.1" {
GROUP "g2.1.1" {
}
GROUP "g2.1.2" {
}
GROUP "g2.1.3" {
}
}
}
GROUP "g3" {
GROUP "g3.1" {
}
GROUP "g3.2" {
}
GROUP "g3.3" {
}
GROUP "g3.4" {
}
}
}
}

View File

@ -0,0 +1,18 @@
#############################
Expected output for '../h5dump -g /g2 /y tgroup.h5'
#############################
HDF5 "tgroup.h5" {
GROUP "/g2" {
GROUP "g2.1" {
GROUP "g2.1.1" {
}
GROUP "g2.1.2" {
}
GROUP "g2.1.3" {
}
}
}
GROUP "/y" {
h5dump error: unable to open /y
}
}

View File

@ -0,0 +1,13 @@
#############################
Expected output for '../h5dump tslink.h5'
#############################
HDF5 "tslink.h5" {
GROUP "/" {
SOFTLINK "slink1" {
linktarget "../../somevalue"
}
SOFTLINK "slink2" {
linktarget "linkvalue"
}
}
}

View File

@ -0,0 +1,8 @@
#############################
Expected output for '../h5dump -l slink2 tslink.h5'
#############################
HDF5 "tslink.h5" {
SOFTLINK "slink2" {
linktarget "linkvalue"
}
}