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 #484

Merged
merged 5 commits into from
Mar 6, 2025
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.11.0
VERSION 4.11.1
LANGUAGES Fortran C)

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

## [Unreleased]

## [4.11.1] - 2025-02-04

### Fixed

- Workaround for gfortran 13/14 on Ubuntu. Failure does not show on other flavors of Linux no macos.

## [4.11.0] - 2025-02-03

### Changed
Expand Down
47 changes: 29 additions & 18 deletions src/funit/fhamcrest/Every.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,35 @@ recursive subroutine describe_first_mismatch(this, actuals, description, index)
class(MatcherDescription), intent(inout) :: description
integer, allocatable, intent(inout) :: index(:)

integer :: i

class(*), allocatable :: item
do i = 1, size(actuals)
item = actuals(i)
if (.not. this%matches(item)) then
select type (item)
class is (AbstractArrayWrapper)
call this%describe_first_mismatch(item%get(), description, index)
index = [index, i]
class default ! scalar
call this%item_matcher%describe_mismatch(actuals(i), description)
index = [i]
end select
return
end if
end do

call describe_with_target(this, actuals, description, index)

contains

subroutine describe_with_target(this, actuals, description, index)
class(Every), intent(in) :: this
class(*), target, intent(in) :: actuals(:)
class(MatcherDescription), intent(inout) :: description
integer, allocatable, intent(inout) :: index(:)

integer :: i

class(*), pointer :: item

do i = 1, size(actuals)
item => actuals(i)
if (.not. this%matches(item)) then
select type (item)
class is (AbstractArrayWrapper)
call this%describe_first_mismatch(item%get(), description, index)
index = [index, i]
class default ! scalar
call this%item_matcher%describe_mismatch(actuals(i), description)
index = [i]
end select
return
end if
end do
end subroutine describe_with_target
end subroutine describe_first_mismatch

subroutine describe_to(this, description)
Expand Down
Loading