summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diffgentest.c
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2009-07-28 19:40:18 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2009-07-28 19:40:18 (GMT)
commita6676de3c8cf07ef5a2e8f6d9b8f6bf4f3e779d3 (patch)
tree0ff6e6745ac32b88cb280a15d77dd671833b9f1b /tools/h5diff/h5diffgentest.c
parentc9b33f6dd48024708989753fecf6ee8e849a5542 (diff)
downloadhdf5-a6676de3c8cf07ef5a2e8f6d9b8f6bf4f3e779d3.zip
hdf5-a6676de3c8cf07ef5a2e8f6d9b8f6bf4f3e779d3.tar.gz
hdf5-a6676de3c8cf07ef5a2e8f6d9b8f6bf4f3e779d3.tar.bz2
[svn-r17254] Fixed Bug 1563 - h5diff and Infinity
Added test cases
Diffstat (limited to 'tools/h5diff/h5diffgentest.c')
-rw-r--r--tools/h5diff/h5diffgentest.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 95b28ee..cae79b6 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -331,7 +331,24 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1,1,dims1,"fp17",H5T_NATIVE_DOUBLE,data17);
write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18);
+ }
+
+ /*------------------------------------------------------------------------
+ * INFINITY values
+ *------------------------------------------------------------------------
+ */
+ {
+ float data19[6];
+ double data20[6];
+
+ data19[0] = data19[1] = data19[2] = log(0);
+ data19[3] = data19[4] = data19[5] = -log(0);
+
+ data20[0] = data20[1] = data20[2] = log(0);
+ data20[3] = data20[4] = data20[5] = -log(0);
+ write_dset(gid1,1,dims1,"fp19",H5T_NATIVE_FLOAT,data19);
+ write_dset(gid1,1,dims1,"fp20",H5T_NATIVE_DOUBLE,data20);
}
/*-------------------------------------------------------------------------