Construct new TestRealVal given a name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the new TestRealVal object. |
||
real(kind=wp), | optional | :: | eps | Allowed margin of error |
Return new TestRealVal object.
function newTestRealVal_name(ts_name, eps) result(new_ts)
!! Construct new TestRealVal given a name.
character(len=*), intent(in) :: ts_name
!! Name of the new TestRealVal object.
real(kind=wp), optional :: eps
!! Allowed margin of error
type(TestRealVal) :: new_ts
!! Return new TestRealVal object.
new_ts%test_name = ts_name
if (present(eps)) then
new_ts%eps = eps
else
new_ts%eps = default_eps
end if
new_ts%next => null()
new_ts%compare => realEq
!TODO: create a bunch of subclasses with different comparisson
! operators.
new_ts%res = 0
new_ts%tgt = 0
end function newTestRealVal_name