diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-07-10 18:58:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-07-10 18:58:20 (GMT) |
commit | 912daba46405bdee90f58b61aa1c270bea21d65d (patch) | |
tree | d748ac4f51d875f30f4b2dec70c6622128dc5698 | |
parent | a7f482142e9c6031cb54dae58ef7e193a5ece1ca (diff) | |
download | hdf5-912daba46405bdee90f58b61aa1c270bea21d65d.zip hdf5-912daba46405bdee90f58b61aa1c270bea21d65d.tar.gz hdf5-912daba46405bdee90f58b61aa1c270bea21d65d.tar.bz2 |
[svn-r22546] Correct generation of testfile
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 16 | ||||
-rw-r--r-- | tools/testfiles/tnestedcmpddt.ddl | 74 | ||||
-rw-r--r-- | tools/testfiles/tnestedcmpddt.h5 | bin | 16536 -> 16536 bytes |
3 files changed, 47 insertions, 43 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index d7dfdbc..da78089 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -7966,7 +7966,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset2_t dset2[10]; typedef struct { - int a[4]; + int a[5]; float b[5][6]; dset1_t c; } dset3_t; @@ -7975,7 +7975,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE}; dset1_t dset5[10]; - int i; + int i, j, k; unsigned ndims; hsize_t dim[2]; @@ -7987,11 +7987,15 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset1[i].b = (float)(i*i); dset2[i].a = i; - dset2[i].b = (float)(i+ i*0.1); + dset2[i].b = (float)(i+i*0.1); dset2[i].c = GREEN; - dset3[i].a[0] = i; - dset3[i].b[0][0] = (float)(i*1.0); + for(j = 0; j < 5; j++) { + dset3[i].a[j] = i*j; + for(k = 0; k < 6; k++) { + dset3[i].b[j][k] = (float)(i*j*k*1.0); + } + } dset3[i].c.a = i; dset3[i].c.b = (float)(i*1.0); } @@ -8062,7 +8066,7 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t)); - ndims = 1; dim[0] = 4; + ndims = 1; dim[0] = 5; array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); H5Tinsert(type2, "int_name", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); diff --git a/tools/testfiles/tnestedcmpddt.ddl b/tools/testfiles/tnestedcmpddt.ddl index 4091d04..8f1af21 100644 --- a/tools/testfiles/tnestedcmpddt.ddl +++ b/tools/testfiles/tnestedcmpddt.ddl @@ -128,7 +128,7 @@ GROUP "/" { GROUP "group1" { DATASET "dset3" { DATATYPE H5T_COMPOUND { - H5T_ARRAY { [4] H5T_STD_I32BE } "int_name"; + H5T_ARRAY { [5] H5T_STD_I32BE } "int_name"; H5T_ARRAY { [5][6] H5T_IEEE_F32BE } "float_name"; H5T_COMPOUND { H5T_STD_I32BE "int_name"; @@ -138,72 +138,72 @@ GROUP "/" { DATASPACE SIMPLE { ( 6 ) / ( H5S_UNLIMITED ) } DATA { (0): { - [ 0, 14745599, 0, 12648447 ], - [ 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, - 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41, - 0, 8.07134e-41, 0, 6.9234e-41, 0, 4.62751e-41, - 0, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, - 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43 ], + [ 0, 0, 0, 0, 0 ], + [ 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 ], { 0, 0 } }, (1): { - [ 16777216, 128, 0, 0 ], - [ 4.6006e-41, 0, 0, 0, 0, 0, - 0, 0, -8, -nan, -2.35099e-38, -nan, - 2.35099e-38, -nan, 2.34181e-38, -nan, 2.32344e-38, -nan, - 2.2867e-38, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, - 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan ], + [ 0, 16777216, 33554432, 50331648, 67108864 ], + [ 0, 0, 0, 0, 0, 0, + 0, 4.6006e-41, 8.96831e-44, 2.30486e-41, 4.60074e-41, 5.74869e-41, + 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, + 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41 ], { 16777216, 4.6006e-41 } }, (2): { - [ 33554432, -1, 63743, -1 ], - [ 8.96831e-44, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, - 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan, - 3.53127e-43, -nan, 3.47522e-43, -nan, 3.36312e-43, -nan, - 3.13891e-43, -nan, 2.69049e-43, -nan, 1.79366e-43, -nan, - 0, -nan, 0, -1.70141e+38, 0, -1.06338e+37 ], + [ 0, 33554432, 67108864, 100663296, 134217728 ], + [ 0, 0, 0, 0, 0, 0, + 0, 8.96831e-44, 4.60074e-41, 6.89663e-41, 9.10844e-44, 1.15705e-41, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, + 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, + 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41 ], { 33554432, 8.96831e-44 } }, (3): { - [ 50331648, -251658241, 0, -520093697 ], - [ 2.30486e-41, -8, 0, -2.35099e-38, 0, 2.35099e-38, - 0, 2.34181e-38, 0, 2.32344e-38, 0, 2.2867e-38, - 0, 2.21324e-38, 0, 2.0663e-38, 0, 1.77242e-38, - 0, 1.18468e-38, 0, 9.18341e-41, 0, 9.14754e-41, - 0, 9.07579e-41, 0, 8.9323e-41, 0, 8.64531e-41 ], + [ 0, 50331648, 100663296, 150994944, 201326592 ], + [ 0, 0, 0, 0, 0, 0, + 0, 2.30486e-41, 6.89663e-41, 5.8308e-42, 2.305e-41, 4.02691e-41, + 0, 6.89663e-41, 2.305e-41, 5.17486e-41, 6.89677e-41, 8.61869e-41, + 0, 5.8308e-42, 5.17486e-41, 7.75773e-41, 5.8322e-42, 1.87466e-41, + 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41 ], { 50331648, 2.30486e-41 } }, (4): { - [ 67108864, 49407, 0, 33023 ], - [ 4.60074e-41, 3.57331e-43, 0, 3.5593e-43, 0, 3.53127e-43, - 0, 3.47522e-43, 0, 3.36312e-43, 0, 3.13891e-43, - 0, 2.69049e-43, 0, 1.79366e-43, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -2.35099e-38, -nan ], + [ 0, 67108864, 134217728, 201326592, 268435456 ], + [ 0, 0, 0, 0, 0, 0, + 0, 4.60074e-41, 9.10844e-44, 2.305e-41, 4.60088e-41, 5.74883e-41, + 0, 9.10844e-44, 4.60088e-41, 6.89677e-41, 9.24857e-44, 1.15719e-41, + 0, 2.305e-41, 6.89677e-41, 5.8322e-42, 2.30514e-41, 4.02705e-41, + 0, 4.60088e-41, 9.24857e-44, 2.30514e-41, 4.60102e-41, 5.74897e-41 ], { 67108864, 4.60074e-41 } }, (5): { - [ 83886080, -1, 16580607, -1 ], - [ 5.74869e-41, -nan, 2.21324e-38, -nan, 2.0663e-38, -nan, - 1.77242e-38, -nan, 1.18468e-38, -nan, 9.18341e-41, -nan, - 9.14754e-41, -nan, 9.07579e-41, -nan, 8.9323e-41, -nan, - 8.64531e-41, -nan, 8.07134e-41, -nan, 6.9234e-41, -nan, - 4.62751e-41, -nan, 3.57331e-43, -nan, 3.5593e-43, -nan ], + [ 0, 83886080, 167772160, 251658240, 335544320 ], + [ 0, 0, 0, 0, 0, 0, + 0, 5.74869e-41, 1.15705e-41, 4.02691e-41, 5.74883e-41, 7.18376e-41, + 0, 1.15705e-41, 5.74883e-41, 8.61869e-41, 1.15719e-41, 2.59212e-41, + 0, 4.02691e-41, 8.61869e-41, 1.87466e-41, 4.02705e-41, 5.39023e-41, + 0, 5.74883e-41, 1.15719e-41, 4.02705e-41, 5.74897e-41, 7.1839e-41 ], { 83886080, 5.74869e-41 diff --git a/tools/testfiles/tnestedcmpddt.h5 b/tools/testfiles/tnestedcmpddt.h5 Binary files differindex f0429ba..4d992bc 100644 --- a/tools/testfiles/tnestedcmpddt.h5 +++ b/tools/testfiles/tnestedcmpddt.h5 |