sourcery_test_description_s.f90 Source File


This file depends on

sourcefile~~sourcery_test_description_s.f90~~EfferentGraph sourcefile~sourcery_test_description_s.f90 sourcery_test_description_s.f90 sourcefile~sourcery_test_description_m.f90 sourcery_test_description_m.F90 sourcefile~sourcery_test_description_s.f90->sourcefile~sourcery_test_description_m.f90 sourcefile~sourcery_string_m.f90 sourcery_string_m.f90 sourcefile~sourcery_test_description_m.f90->sourcefile~sourcery_string_m.f90 sourcefile~sourcery_test_result_m.f90 sourcery_test_result_m.f90 sourcefile~sourcery_test_description_m.f90->sourcefile~sourcery_test_result_m.f90 sourcefile~sourcery_test_result_m.f90->sourcefile~sourcery_string_m.f90

Source Code

submodule(sourcery_test_description_m) sourcery_test_description_s
  implicit none
contains
    module procedure construct_from_character
      test_description%description_ = description
      test_description%test_function_ => test_function
    end procedure

    module procedure construct_from_string_t
      test_description%description_ = description
      test_description%test_function_ => test_function
    end procedure

    module procedure run
      test_result = test_result_t(self%description_, self%test_function_())
    end procedure

    module procedure contains_text
      match = index(self%description_%string(), substring%string()) /= 0
    end procedure

    module procedure equals
      lhs_eq_rhs = (lhs%description_ == rhs%description_) .and. associated(lhs%test_function_, rhs%test_function_)
    end procedure
end submodule sourcery_test_description_s