diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-02-26 21:22:08 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-02-26 21:22:08 (GMT) |
commit | 2f943aacd69af8a9135de16d745855d50bc9c402 (patch) | |
tree | 1bae723339309184ad31d469c2b99db4026de648 /tools | |
parent | ce6440cbb2693c522c19c583d2b157aa5e0afbfa (diff) | |
download | hdf5-2f943aacd69af8a9135de16d745855d50bc9c402.zip hdf5-2f943aacd69af8a9135de16d745855d50bc9c402.tar.gz hdf5-2f943aacd69af8a9135de16d745855d50bc9c402.tar.bz2 |
[svn-r13400]
Revision of the percent tests to have all the same data
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/h5diffgentest.c | 48 | ||||
-rwxr-xr-x | tools/h5diff/testh5diff.sh | 17 | ||||
-rw-r--r-- | tools/testfiles/h5diff_161.txt | 16 | ||||
-rw-r--r-- | tools/testfiles/h5diff_162.txt | 16 | ||||
-rw-r--r-- | tools/testfiles/h5diff_163.txt (renamed from tools/testfiles/h5diff_16.txt) | 2 | ||||
-rw-r--r-- | tools/testfiles/h5diff_191.txt | 12 | ||||
-rw-r--r-- | tools/testfiles/h5diff_192.txt | 12 | ||||
-rw-r--r-- | tools/testfiles/h5diff_attr1.h5 | bin | 19136 -> 19136 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_attr2.h5 | bin | 19136 -> 19136 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_basic1.h5 | bin | 8008 -> 8008 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_basic2.h5 | bin | 4240 -> 4240 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_dset1.h5 | bin | 19888 -> 19888 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_dset2.h5 | bin | 19888 -> 19888 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_dtypes.h5 | bin | 10776 -> 10776 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_hyper1.h5 | bin | 1052720 -> 1052720 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_hyper2.h5 | bin | 1052720 -> 1052720 bytes | |||
-rw-r--r-- | tools/testfiles/h5diff_types.h5 | bin | 4016 -> 4874 bytes |
17 files changed, 73 insertions, 50 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 1695a01..1ab61fd 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -133,27 +133,33 @@ int test_basic(const char *fname1, hsize_t dims[2] = { 3,2 }; /* Test */ - double data1[3][2] = {{1,1}, {1,1}, {0,0}}; - double data2[3][2] = {{0,1.1},{1.01,1.001},{0,1}}; - int data5[3][2] = {{100,100},{100,100},{100,100}}; - int data6[3][2] = {{101,102},{103,104},{150,200}}; - unsigned long_long data7[3][2] = {{100,100},{100,100},{100,100}}; - unsigned long_long data8[3][2] = {{101,102},{103,104},{150,200}}; - double data3[3][2] = {{100,100},{100,100},{100,100}}; - double data4[3][2] = {{105,120},{160,95},{80,40}}; - double data9[3][2] = {{100,100},{100,0},{0,100}}; - /* compare divide by zero */ - /* compare both zero */ - double data10[3][2] ={{120,80},{0,100},{0,50}}; - /* -A B 1-B/A % -100 120 0.2 20 -100 80 0.2 20 -100 0 1 100 -0 100 #DIV/0! #DIV/0! -0 0 #DIV/0! #DIV/0! -100 50 0.5 50 -*/ + double data1[3][2] = {{1,1}, {1,1}, {0,0}}; + double data2[3][2] = {{0,1.1},{1.01,1.001},{0,1}}; + double data3[3][2] = {{100,100},{100,100},{100,100}}; + double data4[3][2] = {{105,120},{160,95},{80,40}}; + +/*------------------------------------------------------------------------- + * relative error, compare divide by zero, both zero + *------------------------------------------------------------------------- + */ + + int data5[3][2] = {{100,100},{100,0},{0,100}}; + int data6[3][2] = {{120,80}, {0,100},{0,50}}; + unsigned long_long data7[3][2] = {{100,100},{100,0},{0,100}}; + unsigned long_long data8[3][2] = {{120,80}, {0,100},{0,50}}; + double data9[3][2] = {{100,100},{100,0},{0,100}}; + double data10[3][2] ={{120,80}, {0,100},{0,50}}; + +/*------------------------------------------------------------------------- + A B 1-B/A % + 100 120 0.2 20 + 100 80 0.2 20 + 100 0 1 100 + 0 100 #DIV/0! #DIV/0! + 0 0 #DIV/0! #DIV/0! + 100 50 0.5 50 + *------------------------------------------------------------------------- + */ /* floating point comparison , epsilon = 0.00001 */ float data11[3][2] ={{0.00000f,0.00001f},{0.00001f, 0.00000f},{0.00001f,0.00001f}}; diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 3dc40ef..5841855 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -286,8 +286,17 @@ TOOLTEST h5diff_14.txt $FILE1 $FILE2 -r g1/dset1 g1/dset2 # 1.5 with -d TOOLTEST h5diff_15.txt $FILE1 $FILE2 -r -d 5 g1/dset3 g1/dset4 -# 1.6 with -p (test divide by zero case) -TOOLTEST h5diff_16.txt $FILE1 $FILE1 g1/dset9 g1/dset10 -p 0.01 -v +# 1.6 with -p (double) +#TOOLTEST h5diff_16.txt $FILE1 $FILE1 g1/dset9 g1/dset10 -p 0.01 -v + +# 1.6.1 with -p (int) +TOOLTEST h5diff_161.txt $FILE1 $FILE1 -v -p 0.02 g1/dset5 g1/dset6 + +# 1.6.2 with -p (unsigned long_long) +TOOLTEST h5diff_162.txt $FILE1 $FILE1 -v -p 0.02 g1/dset7 g1/dset8 + +# 1.6.3 with -p (double) +TOOLTEST h5diff_163.txt $FILE1 $FILE1 -v -p 0.02 g1/dset9 g1/dset10 # 1.7 verbose mode TOOLTEST h5diff_17.txt $FILE1 $FILE2 -v @@ -296,10 +305,10 @@ TOOLTEST h5diff_17.txt $FILE1 $FILE2 -v TOOLTEST h5diff_18.txt $FILE1 $FILE2 -q # 1.9.1 with -p (int) -TOOLTEST h5diff_191.txt $FILE1 $FILE1 -v -p 0.02 g1/dset5 g1/dset6 +#TOOLTEST h5diff_191.txt $FILE1 $FILE1 -v -p 0.02 g1/dset5 g1/dset6 # 1.9.2 with -p (unsigned long_long) -TOOLTEST h5diff_192.txt $FILE1 $FILE1 -v -p 0.02 g1/dset7 g1/dset8 +#TOOLTEST h5diff_192.txt $FILE1 $FILE1 -v -p 0.02 g1/dset7 g1/dset8 # ############################################################################## diff --git a/tools/testfiles/h5diff_161.txt b/tools/testfiles/h5diff_161.txt new file mode 100644 index 0000000..b29d93c --- /dev/null +++ b/tools/testfiles/h5diff_161.txt @@ -0,0 +1,16 @@ +############################# +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset5 g1/dset6' +############################# +dataset: </g1/dset5> and </g1/dset6> +size: [3x2] [3x2] +position dset5 dset6 difference relative +------------------------------------------------------------------------ +[ 0 0 ] 100 120 20 0.200000 +[ 0 1 ] 100 80 20 0.200000 +[ 1 0 ] 100 0 100 1.000000 +[ 1 1 ] 0 100 100 not comparable +[ 2 1 ] 100 50 50 0.500000 +5 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- diff --git a/tools/testfiles/h5diff_162.txt b/tools/testfiles/h5diff_162.txt new file mode 100644 index 0000000..02bc972 --- /dev/null +++ b/tools/testfiles/h5diff_162.txt @@ -0,0 +1,16 @@ +############################# +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset7 g1/dset8' +############################# +dataset: </g1/dset7> and </g1/dset8> +size: [3x2] [3x2] +position dset7 dset8 difference relative +------------------------------------------------------------------------ +[ 0 0 ] 100 120 20 0.200000 +[ 0 1 ] 100 80 20 0.200000 +[ 1 0 ] 100 0 100 1.000000 +[ 1 1 ] 0 100 100 not comparable +[ 2 1 ] 100 50 50 0.500000 +5 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- diff --git a/tools/testfiles/h5diff_16.txt b/tools/testfiles/h5diff_163.txt index d68cd47..be5eb1e 100644 --- a/tools/testfiles/h5diff_16.txt +++ b/tools/testfiles/h5diff_163.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 g1/dset9 g1/dset10 -p 0.01 -v' +Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset9 g1/dset10' ############################# dataset: </g1/dset9> and </g1/dset10> size: [3x2] [3x2] diff --git a/tools/testfiles/h5diff_191.txt b/tools/testfiles/h5diff_191.txt deleted file mode 100644 index 3fa0834..0000000 --- a/tools/testfiles/h5diff_191.txt +++ /dev/null @@ -1,12 +0,0 @@ -############################# -Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset5 g1/dset6' -############################# -dataset: </g1/dset5> and </g1/dset6> -size: [3x2] [3x2] -position dset5 dset6 difference relative ------------------------------------------------------------------------- -[ 1 0 ] 100 103 3 0.030000 -[ 1 1 ] 100 104 4 0.040000 -[ 2 0 ] 100 150 50 0.500000 -[ 2 1 ] 100 200 100 1.000000 -4 differences found diff --git a/tools/testfiles/h5diff_192.txt b/tools/testfiles/h5diff_192.txt deleted file mode 100644 index 38948a5..0000000 --- a/tools/testfiles/h5diff_192.txt +++ /dev/null @@ -1,12 +0,0 @@ -############################# -Expected output for 'h5diff h5diff_basic1.h5 h5diff_basic1.h5 -v -p 0.02 g1/dset7 g1/dset8' -############################# -dataset: </g1/dset7> and </g1/dset8> -size: [3x2] [3x2] -position dset7 dset8 difference relative ------------------------------------------------------------------------- -[ 1 0 ] 100 103 3 0.030000 -[ 1 1 ] 100 104 4 0.040000 -[ 2 0 ] 100 150 50 0.500000 -[ 2 1 ] 100 200 100 1.000000 -4 differences found diff --git a/tools/testfiles/h5diff_attr1.h5 b/tools/testfiles/h5diff_attr1.h5 Binary files differindex 65e2743..e261486 100644 --- a/tools/testfiles/h5diff_attr1.h5 +++ b/tools/testfiles/h5diff_attr1.h5 diff --git a/tools/testfiles/h5diff_attr2.h5 b/tools/testfiles/h5diff_attr2.h5 Binary files differindex bcf597b..0a59fc5 100644 --- a/tools/testfiles/h5diff_attr2.h5 +++ b/tools/testfiles/h5diff_attr2.h5 diff --git a/tools/testfiles/h5diff_basic1.h5 b/tools/testfiles/h5diff_basic1.h5 Binary files differindex 0ece876..bacf18a 100644 --- a/tools/testfiles/h5diff_basic1.h5 +++ b/tools/testfiles/h5diff_basic1.h5 diff --git a/tools/testfiles/h5diff_basic2.h5 b/tools/testfiles/h5diff_basic2.h5 Binary files differindex 908b0b3..209485f 100644 --- a/tools/testfiles/h5diff_basic2.h5 +++ b/tools/testfiles/h5diff_basic2.h5 diff --git a/tools/testfiles/h5diff_dset1.h5 b/tools/testfiles/h5diff_dset1.h5 Binary files differindex 749e0ca..3f853be 100644 --- a/tools/testfiles/h5diff_dset1.h5 +++ b/tools/testfiles/h5diff_dset1.h5 diff --git a/tools/testfiles/h5diff_dset2.h5 b/tools/testfiles/h5diff_dset2.h5 Binary files differindex d93edcf..1f14d29 100644 --- a/tools/testfiles/h5diff_dset2.h5 +++ b/tools/testfiles/h5diff_dset2.h5 diff --git a/tools/testfiles/h5diff_dtypes.h5 b/tools/testfiles/h5diff_dtypes.h5 Binary files differindex 592c28f..7c3cd9d 100644 --- a/tools/testfiles/h5diff_dtypes.h5 +++ b/tools/testfiles/h5diff_dtypes.h5 diff --git a/tools/testfiles/h5diff_hyper1.h5 b/tools/testfiles/h5diff_hyper1.h5 Binary files differindex c3de508..ceeff80 100644 --- a/tools/testfiles/h5diff_hyper1.h5 +++ b/tools/testfiles/h5diff_hyper1.h5 diff --git a/tools/testfiles/h5diff_hyper2.h5 b/tools/testfiles/h5diff_hyper2.h5 Binary files differindex d2c628a..05a2eb1 100644 --- a/tools/testfiles/h5diff_hyper2.h5 +++ b/tools/testfiles/h5diff_hyper2.h5 diff --git a/tools/testfiles/h5diff_types.h5 b/tools/testfiles/h5diff_types.h5 Binary files differindex ecbcc76..805ef5f 100644 --- a/tools/testfiles/h5diff_types.h5 +++ b/tools/testfiles/h5diff_types.h5 |