Test Derived Type

type, public, abstract :: Test

Abstract class for a single test case. A node in the test linked list.


Contents

Source Code


Components

TypeVisibility AttributesNameInitial
character(len=NAME_LENGTH), public :: test_name

Name of the test case.


Type-Bound Procedures

procedure(runInterface), public, deferred, pass :: run

  • function runInterface(self) result(tests_passed) Prototype

    Abstract function interface for running a test.

    Arguments

    Type IntentOptional AttributesName
    class(Test), intent(in) :: self

    The test itself. The Test object should contain all information needed to run the test.

    Return Value integer

    Return total number of tests which passed in the linked list up to and including this test.

Source Code

type, abstract, private :: Test
    !! Abstract class for a single test case. A node in the test linked list.

    character(len=NAME_LENGTH), public :: test_name
        !! Name of the test case.
    class(Test), private, pointer :: next
        !! Next test case or null() if this is the first test inserted (last
        !! test in the linked list).
contains
    procedure(runInterface), deferred, pass :: run
end type Test