test_result_t Derived Type

type, public :: test_result_t

Encapsulate test descriptions and outcomes


Inherits

type~~test_result_t~~InheritsGraph type~test_result_t test_result_t type~string_t string_t type~test_result_t->type~string_t description_ type~test_diagnosis_t test_diagnosis_t type~test_result_t->type~test_diagnosis_t diagnosis_

Components

Type Visibility Attributes Name Initial
type(string_t), private :: description_
type(test_diagnosis_t), private, allocatable :: diagnosis_

Constructor

public interface test_result_t

  • private elemental module function construct_from_character(description, diagnosis) result(test_result)

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

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: description
    type(test_diagnosis_t), intent(in), optional :: diagnosis

    Return Value type(test_result_t)

  • private elemental module function construct_from_string(description, diagnosis) result(test_result)

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

    Arguments

    Type IntentOptional Attributes Name
    type(string_t), intent(in) :: description
    type(test_diagnosis_t), intent(in), optional :: diagnosis

    Return Value type(test_result_t)


Type-Bound Procedures

procedure, public :: characterize

  • interface

    private pure module function characterize(self) result(characterization)

    The result is a character description of the test and its outcome

    Arguments

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

    Return Value character(len=:), allocatable

generic, public :: description_contains => description_contains_string, description_contains_characters

procedure, public :: passed

  • interface

    private impure elemental module function passed(self) result(test_passed)

    The result is true if and only if the test passed on all images

    Arguments

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

    Return Value logical

procedure, public :: skipped

  • interface

    private impure elemental module function skipped(self) result(test_skipped)

    The result is true if and only if the test result contains no diagnosis on any image

    Arguments

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

    Return Value logical

procedure, private :: description_contains_characters

  • interface

    private elemental module function description_contains_characters(self, substring) result(substring_found)

    The result is true if and only if the test description contains the substring

    Arguments

    Type IntentOptional Attributes Name
    class(test_result_t), intent(in) :: self
    character(len=*), intent(in) :: substring

    Return Value logical

procedure, private :: description_contains_string

  • interface

    private elemental module function description_contains_string(self, substring) result(substring_found)

    The result is true if and only if the test description contains the substring

    Arguments

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

    Return Value logical