summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5T.f90
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-04-08 00:18:20 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-04-08 00:18:20 (GMT)
commitff9a10cfdacfd30fc1720b7c82bc28d204b76ce2 (patch)
tree2e7c07b41caace92775d8162012d94e79b4df029 /fortran/test/tH5T.f90
parent67a61ed22f31b9af0ace476b0cc58d7236bb9ac3 (diff)
downloadhdf5-ff9a10cfdacfd30fc1720b7c82bc28d204b76ce2.zip
hdf5-ff9a10cfdacfd30fc1720b7c82bc28d204b76ce2.tar.gz
hdf5-ff9a10cfdacfd30fc1720b7c82bc28d204b76ce2.tar.bz2
[svn-r24984] Added overload operatorZ to compare REALs for tests.
Tested on jam (gfortran, (-r8))
Diffstat (limited to 'fortran/test/tH5T.f90')
-rw-r--r--fortran/test/tH5T.f9020
1 files changed, 7 insertions, 13 deletions
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index aac5f33..cb8e27c 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -112,7 +112,7 @@ CONTAINS
INTEGER(HID_T) :: decoded_tid1
INTEGER(HID_T) :: fixed_str1, fixed_str2
- LOGICAL :: are_equal, differ
+ LOGICAL :: are_equal
INTEGER(SIZE_T), PARAMETER :: str_size = 10
INTEGER(SIZE_T) :: query_size
@@ -528,13 +528,8 @@ CONTAINS
CALL h5dread_f(dset_id, dt3_id, double_member_out, data_dims, error)
CALL check("h5dread_f", error, total_error)
do i = 1, dimsize
- differ = .FALSE.
- if (abs(double_member_out(i) - double_member(i)) .ge. 1.D-08) THEN
- differ = .TRUE.
- endif
- ! This is temorary fix until we figure out how to compare floats
- !CALL compare_floats(double_member_out(i), double_member(i), differ)
- if (differ) then
+
+ IF( .NOT.(double_member_out(i) .REALEQ. double_member(i)) ) THEN
write(*,*) " Wrong double precision data is read back "
total_error = total_error + 1
endif
@@ -552,11 +547,10 @@ CONTAINS
CALL h5dread_f(dset_id, dt4_id, real_member_out, data_dims, error)
CALL check("h5dread_f", error, total_error)
do i = 1, dimsize
- CALL compare_floats(real_member_out(i), real_member(i), differ)
- if (differ) then
- write(*,*) " Wrong real precision data is read back "
- total_error = total_error + 1
- endif
+ IF( .NOT.(real_member_out(i) .REALEQ. real_member(i) ) ) THEN
+ WRITE(*,*) " Wrong real precision data is read back "
+ total_error = total_error + 1
+ ENDIF
enddo
!
! *-----------------------------------------------------------------------