Skip to content

Commit

Permalink
test_memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed May 3, 2024
1 parent 56e8019 commit 19035c1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/test_equilibrate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ program main
implicit none

call test()
call test_memory()

contains

Expand Down Expand Up @@ -312,6 +313,32 @@ subroutine test()

end subroutine

subroutine test_memory()
type(ChemEquiAnalysis), pointer :: cea
character(:), allocatable :: err

allocate(cea)

cea = ChemEquiAnalysis('../test/thermo_easy_chem_simp_own.yaml', err=err)
if (allocated(err)) then
deallocate(cea)
print*,err
stop 1
endif

cea = ChemEquiAnalysis('../test/thermo_easy_chem_simp_own.yaml', err=err)
if (allocated(err)) then
deallocate(cea)
print*,err
stop 1
endif

deallocate(cea)

print*,'test_memory passed.'

end subroutine

!> coppied from fortran stdlib v0.2.0
elemental function is_close(a, b, tol, abs_tol, equal_nan) result(close)
use, intrinsic :: ieee_arithmetic, only: ieee_is_nan
Expand Down

0 comments on commit 19035c1

Please sign in to comment.