diff --git a/src/version_f.f90 b/src/version_f.f90 index 5d6e0d3..b77bd8b 100644 --- a/src/version_f.f90 +++ b/src/version_f.f90 @@ -325,39 +325,32 @@ elemental function create_error_t(msg) result(err) err%msg = msg end - subroutine try_satisfy(string) - character(*), intent(in) :: string + subroutine try_satisfy() type(version_range_t) :: version_range - call version_range%parse_version_range(string) + call version_range%parse_version_range() if (version_range%comp_sets(1)%comps(1)%op /= '>') then print *, 'Operator not >: ', version_range%comp_sets(1)%comps(1)%op; stop 1 end if end - subroutine parse_version_range(this, string) + subroutine parse_version_range(this) class(version_range_t), intent(out) :: this - character(*), intent(in) :: string type(comparator_set_t) :: comp_set allocate (this%comp_sets(0)) - call comp_set%parse_comp_set(string) + call comp_set%parse_comp_set() this%comp_sets = [this%comp_sets, comp_set] end - subroutine parse_comp_set(this, string) + subroutine parse_comp_set(this) class(comparator_set_t), intent(out) :: this - character(*), intent(in) :: string - character(:), allocatable :: str type(comparator_t) :: comp - type(error_t), allocatable :: error - - str = trim(adjustl(string)) allocate (this%comps(0)) diff --git a/test/version_f_test.f90 b/test/version_f_test.f90 index 8dfb530..9c18d23 100644 --- a/test/version_f_test.f90 +++ b/test/version_f_test.f90 @@ -2,7 +2,7 @@ program test use version_f implicit none - call try_satisfy('> 1.0.1 < 2.1.0') + call try_satisfy() print *, achar(10)//achar(27)//'[92m All tests passed.'//achar(27)