addUnitTest Subroutine

public subroutine addUnitTest(self, ut)

Add a Test object to the test suite and make it available for setup.

Arguments

Type IntentOptional AttributesName
class(TestSuite), intent(inout) :: self
class(Test), intent(inout), target:: ut

Object derived from the Test abstract type.


Contents

Source Code


Variables

TypeVisibility AttributesNameInitial
class(Test), public, pointer:: next

Source Code

subroutine addUnitTest(self, ut)
    !! Add a Test object to the test suite and make it available for setup.

    class(TestSuite), intent(inout) :: self
    class(Test), target, intent(inout) :: ut
        !! Object derived from the Test abstract type.

    class(Test), pointer :: next
        
    if (this_image() == 1) self%n_tests = self%n_tests + 1

    allocate(next)
    next => self%test

    ut%next => next
    self%test => ut
end subroutine addUnitTest