Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitFlow: Merge main into develop #459

Merged
merged 6 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
cmake_minimum_required(VERSION 3.12)

project (PFUNIT
VERSION 4.8.0
VERSION 4.9.0
LANGUAGES Fortran C)

cmake_policy(SET CMP0077 NEW)
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.9.0] - 2024-02-06

### Added

- Fujitsu compiler support
Expand All @@ -13,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- This fixes a small CMake bug which can lead to posix_predefined.x being built in the wrong build subdirectory when CMAKE_RUNTIME_OUTPUT_DIRECTORY is set*.
- Missing implementation of `assertIsFinite_real80()`. Apparently undetected until recent attempt to port to flang.
- Made support for REAL128 optional. (Port to nvfortran)

### Changed

Expand Down
40 changes: 32 additions & 8 deletions tests/fhamcrest/Test_IsEqual.pf
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ contains
double precision, parameter :: a_d = 1.d0
double precision, parameter :: b_d = 2.d0

#ifdef _REAL32
real(kind=REAL32), parameter :: a_32 = 1.0_REAL32
real(kind=REAL32), parameter :: b_32 = 2.0_REAL32
#endif

#ifdef _REAL64
real(kind=REAL64), parameter :: a_64 = 1.0_REAL64
real(kind=REAL64), parameter :: b_64 = 2.0_REAL64
#endif

#ifdef _REAL128
real(kind=REAL128), parameter :: a_128 = 1.0_REAL128
real(kind=REAL128), parameter :: b_128 = 2.0_REAL128
#endif

! real
@assert_that(a_s, is(equal_to(a_s)))
Expand All @@ -93,26 +99,29 @@ contains
@assert_that(a_d, is(not(equal_to(b_d))))
@assert_that(b_d, is(not(equal_to(a_d))))

! REAL32
#ifdef _REAL32
@assert_that(a_32, is(equal_to(a_32)))
@assert_that(b_32, is(equal_to(b_32)))

@assert_that(a_32, is(not(equal_to(b_32))))
@assert_that(b_32, is(not(equal_to(a_32))))
#endif

! REAL64
#ifdef _REAL64
@assert_that(a_64, is(equal_to(a_64)))
@assert_that(b_64, is(equal_to(b_64)))

@assert_that(a_64, is(not(equal_to(b_64))))
@assert_that(b_64, is(not(equal_to(a_64))))
#endif

! REAL128
#ifdef _REAL128
@assert_that(a_128, is(equal_to(a_128)))
@assert_that(b_128, is(equal_to(b_128)))

@assert_that(a_128, is(not(equal_to(b_128))))
@assert_that(b_128, is(not(equal_to(a_128))))
#endif
end subroutine test_is_equal_intrinsic_real

@test
Expand All @@ -123,14 +132,20 @@ contains
double complex, parameter :: a_d = (1.d0, 2.d0)
double complex, parameter :: b_d = (3.d0, 4.d0)

#ifdef _REAL32
complex(kind=REAL32), parameter :: a_32 = (1.0_REAL32, 2.0_REAL32)
complex(kind=REAL32), parameter :: b_32 = (3.0_REAL32, 4.0_REAL32)
#endif

#ifdef _REAL64
complex(kind=REAL64), parameter :: a_64 = (1.0_REAL64, 2.0_REAL64)
complex(kind=REAL64), parameter :: b_64 = (3.0_REAL64, 4.0_REAL64)
#endif

#ifdef _REAL128
complex(kind=REAL128), parameter :: a_128 = (1.0_REAL128, 2.0_REAL128)
complex(kind=REAL128), parameter :: b_128 = (3.0_REAL128, 4.0_REAL128)
#endif

! complex single
@assert_that(a_s, is(equal_to(a_s)))
Expand All @@ -146,34 +161,43 @@ contains
@assert_that(a_d, is(not(equal_to(b_d))))
@assert_that(b_d, is(not(equal_to(a_d))))

! complex REAL32
#ifdef _REAL32
@assert_that(a_32, is(equal_to(a_32)))
@assert_that(b_32, is(equal_to(b_32)))

@assert_that(a_32, is(not(equal_to(b_32))))
@assert_that(b_32, is(not(equal_to(a_32))))
#endif

! complex REAL64
#ifdef _REAL64
@assert_that(a_64, is(equal_to(a_64)))
@assert_that(b_64, is(equal_to(b_64)))

@assert_that(a_64, is(not(equal_to(b_64))))
@assert_that(b_64, is(not(equal_to(a_64))))

! complex REAL128
#endif

#ifdef _REAL128
@assert_that(a_128, is(equal_to(a_128)))
@assert_that(b_128, is(equal_to(b_128)))

@assert_that(a_128, is(not(equal_to(b_128))))
@assert_that(b_128, is(not(equal_to(a_128))))
#endif

!! Below specifically tests that issue #234 no longer occurs
#ifdef _REAL32
call assert_that(a_32, is(equal_to(b_32)))
@assertExceptionRaised()
#endif
#ifdef _REAL64
call assert_that(a_64, is(equal_to(b_64)))
@assertExceptionRaised()
#endif
#ifdef _REAL128
call assert_that(a_128, is(equal_to(b_128)))
@assertExceptionRaised()
#endif
end subroutine test_is_equal_intrinsic_complex

@test
Expand Down Expand Up @@ -364,4 +388,4 @@ contains
@assert_that(complex32_array, is(not(equal_to(int_2D))))
@assert_that(complex64_array, is(not(equal_to(int_2D))))
end subroutine test_is_equal_array_3d
end module Test_IsEqual
end module Test_IsEqual
Loading