Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebenelli committed Apr 3, 2024
1 parent 72acc8d commit ce16bef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ subroutine test_values
call test(1.3327_pr, sus%mathiascopeman(1)%value, "MathiasCopemanC1")
call test(0.96946_pr, sus%mathiascopeman(2)%value, "MathiasCopemanC2")
call test(-3.1879_pr, sus%mathiascopeman(3)%value, "MathiasCopemanC3")
call test_int([1, 2, 15], sus%unifac_vle%ids, "UNIFAC-VLE ids")
call test_int([1, 1, 1], sus%unifac_vle%counts, "UNIFAC-VLE counts")
end subroutine

subroutine test_critical
Expand All @@ -54,6 +56,20 @@ subroutine test(value, calc_value, name)
print *, "Ok!"
end if
end subroutine

subroutine test_int(value, calc_value, name)
integer, intent(in) :: value(:)
integer, intent(in) :: calc_value(:)
character(len=*), intent(in) :: name

write (*, "(A)", advance="no") name
if (maxval(abs((value - calc_value)/value)) > tolerance) then
print *, "Error!"
error stop 1

Check warning on line 68 in test/test.f90

View check run for this annotation

Codecov / codecov/patch

test/test.f90#L67-L68

Added lines #L67 - L68 were not covered by tests
else
print *, "Ok!"
end if
end subroutine

subroutine test_failed_read
integer :: exitstat, cmdstat
Expand Down

0 comments on commit ce16bef

Please sign in to comment.