test_description_t Derived Type

type, public :: test_description_t

Encapsulate test descriptions and test-functions


Inherits

type~~test_description_t~~InheritsGraph type~test_description_t test_description_t type~string_t string_t type~test_description_t->type~string_t description_ characterizable_t characterizable_t type~string_t->characterizable_t

Components

Type Visibility Attributes Name Initial
type(string_t), private :: description_
procedure(test_function_i), private, pointer, nopass :: test_function_ => null()

Constructor

public interface test_description_t

  • private module function construct_from_character(description, test_function) result(test_description)

    The result is a test_description_t object with the components defined by the dummy arguments

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: description
    procedure(test_function_i), intent(in), pointer :: test_function

    Return Value type(test_description_t)

  • private module function construct_from_string_t(description, test_function) result(test_description)

    The result is a test_description_t object with the components defined by the dummy arguments

    Arguments

    Type IntentOptional Attributes Name
    type(string_t), intent(in) :: description
    procedure(test_function_i), intent(in), pointer :: test_function

    Return Value type(test_description_t)


Type-Bound Procedures

procedure, public :: contains_text

  • interface

    private impure elemental module function contains_text(self, substring) result(match)

    The result is .true. if the test description includes the value of substring

    Arguments

    Type IntentOptional Attributes Name
    class(test_description_t), intent(in) :: self
    type(string_t), intent(in) :: substring

    Return Value logical

generic, public :: operator(==) => equals

  • private interface equals()

    Arguments

    None

procedure, public :: run

  • interface

    private impure elemental module function run(self) result(test_result)

    The result encapsulates the test description and test outcome

    Arguments

    Type IntentOptional Attributes Name
    class(test_description_t), intent(in) :: self

    Return Value type(test_result_t)

procedure, private :: equals

  • interface

    private elemental module function equals(lhs, rhs) result(lhs_eq_rhs)

    The result is .true. if the components of the lhs & rhs are equal

    Arguments

    Type IntentOptional Attributes Name
    class(test_description_t), intent(in) :: lhs
    class(test_description_t), intent(in) :: rhs

    Return Value logical