Skip to content

Commit a5b0238

Browse files
committed
Bring h5diffgentest in line with expected test files
1 parent cf2ca1f commit a5b0238

File tree

6 files changed

+55
-5
lines changed

6 files changed

+55
-5
lines changed

tools/test/h5diff/CMakeTests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b)
760760
ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b)
761761

762762
# 5.3
763-
ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b)
763+
ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset3b)
764764

765765
# 5.4
766766
ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
dataset: </dset3a> and </dset4b>
1+
dataset: </dset3a> and </dset3b>
22
size: [3x2] [3x2]
3-
position dset3a dset4b difference
3+
position dset3a dset3b difference
44
------------------------------------------------------------
55
[ 1 0 ] 1 3 2
66
[ 1 1 ] 1 4 3
77
[ 2 0 ] 1 5 4
88
[ 2 1 ] 1 6 5
99
4 differences found
10+
EXIT CODE: 1

tools/test/h5diff/expected/h5diff_540.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,54 @@ position attr1 of </> attr1 of </> difference
2222
[ 1 ] 10 15 5
2323
[ 1 ] 10.5 15.5 5
2424
8 differences found
25+
attribute: <attr2 of </>> and <attr2 of </>>
26+
size: [2] [2]
27+
position attr2 of </> attr2 of </> difference
28+
------------------------------------------------------------
29+
[ 0 ] 0 5 5
30+
[ 0 ] 0 5 5
31+
[ 1 ] 10 15 5
32+
[ 1 ] 10.5 15.5 5
33+
[ 1 ] 10 15 5
34+
[ 1 ] 10.5 15.5 5
35+
6 differences found
36+
attribute: <attr3 of </>> and <attr3 of </>>
37+
size: [2] [2]
38+
position attr3 of </> attr3 of </> difference
39+
------------------------------------------------------------
40+
[ 0 ] 0 5 5
41+
[ 0 ] 0 5 5
42+
[ 0 ] 10 15 5
43+
[ 0 ] 10.5 15.5 5
44+
[ 0 ] 10 15 5
45+
[ 0 ] 10.5 15.5 5
46+
[ 1 ] 0 5 5
47+
[ 1 ] 0 5 5
48+
[ 1 ] 10 15 5
49+
[ 1 ] 10.5 15.5 5
50+
[ 1 ] 10 15 5
51+
[ 1 ] 10.5 15.5 5
52+
12 differences found
53+
attribute: <attr4 of </>> and <attr4 of </>>
54+
size: [2] [2]
55+
position attr4 of </> attr4 of </> difference
56+
------------------------------------------------------------
57+
[ 0 ] 0 5 5
58+
[ 0 ] 0 5 5
59+
[ 0 ] 0 5 5
60+
[ 0 ] 10 15 5
61+
[ 0 ] 10.5 15.5 5
62+
[ 1 ] 10 15 5
63+
[ 1 ] 0 5 5
64+
[ 1 ] 0 5 5
65+
[ 1 ] 10 15 5
66+
[ 1 ] 10.5 15.5 5
67+
[ 1 ] 10 15 5
68+
[ 1 ] 0 5 5
69+
[ 1 ] 0 5 5
70+
[ 1 ] 10 15 5
71+
[ 1 ] 10.5 15.5 5
72+
15 differences found
2573
dataset: </dset1> and </dset1>
2674
size: [2] [2]
2775
position dset1 dset1 difference
@@ -83,3 +131,4 @@ position dset4 dset4 difference
83131
[ 1 ] 10 15 5
84132
[ 1 ] 10.5 15.5 5
85133
15 differences found
134+
EXIT CODE: 1

tools/test/h5diff/h5diffgentest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8570,7 +8570,7 @@ test_double_epsilon(const char *fname1, const char *fname2)
85708570
wdata[i][j] = 0.0;
85718571

85728572
/* dataset */
8573-
if (write_dset(fid1, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
8573+
if (write_dset(fid1, 2, dims1, "DS1", H5T_IEEE_F64LE, wdata) < 0)
85748574
PROGRAM_ERROR;
85758575

85768576
/*
@@ -8581,7 +8581,7 @@ test_double_epsilon(const char *fname1, const char *fname2)
85818581
wdata[i][j] = (double)1.e-19;
85828582

85838583
/* dataset */
8584-
if (write_dset(fid2, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
8584+
if (write_dset(fid2, 2, dims1, "DS1", H5T_IEEE_F64LE, wdata) < 0)
85858585
PROGRAM_ERROR;
85868586

85878587
error:
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)