julienne_test_description_m Module

Define an abstraction for describing test intentions and test functions


Uses

  • module~~julienne_test_description_m~~UsesGraph module~julienne_test_description_m julienne_test_description_m module~julienne_string_m julienne_string_m module~julienne_test_description_m->module~julienne_string_m module~julienne_test_result_m julienne_test_result_m module~julienne_test_description_m->module~julienne_test_result_m assert_m assert_m module~julienne_string_m->assert_m module~julienne_test_result_m->module~julienne_string_m

Used by

  • module~~julienne_test_description_m~~UsedByGraph module~julienne_test_description_m julienne_test_description_m module~julienne_m julienne_m module~julienne_m->module~julienne_test_description_m module~julienne_test_description_s julienne_test_description_s module~julienne_test_description_s->module~julienne_test_description_m program~check_command_line_argument check_command_line_argument program~check_command_line_argument->module~julienne_m program~get_flag_value get_flag_value program~get_flag_value->module~julienne_m program~handle_missing_flag handle_missing_flag program~handle_missing_flag->module~julienne_m

Interfaces

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)

interface

  • private impure elemental module function contains_characters(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
    character(len=*), intent(in) :: substring

    Return Value logical

interface

  • private impure elemental module function contains_string_t(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

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

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)


Abstract Interfaces

abstract interface

  • public function test_function_i() result(passes)

    Arguments

    None

    Return Value logical


Derived Types

type, public ::  test_description_t

Encapsulate test descriptions and test-functions

Components

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

Constructor

private module function construct_from_character (description, test_function)

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

private module function construct_from_string_t (description, test_function)

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

Type-Bound Procedures

generic, public :: contains_text => contains_string_t, contains_characters
generic, public :: operator(==) => equals
procedure, public :: run
procedure, private :: contains_characters
procedure, private :: contains_string_t
procedure, private :: equals