fortplot_testing Module

Testing utilities module with proper error handling



Derived Types

type, public ::  test_result_t

Test result type for better test management

Components

Type Visibility Attributes Name Initial
logical, public :: passed = .true.
character(len=256), public :: message = ""
integer, public :: error_count = 0

Type-Bound Procedures

procedure, public :: fail
procedure, public :: get_status

Subroutines

public subroutine assert_file_exists(filename, test_result)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
type(test_result_t), intent(inout), optional :: test_result

public subroutine assert_equals(actual, expected, tolerance, message, test_result)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: actual
real(kind=wp), intent(in) :: expected
real(kind=wp), intent(in), optional :: tolerance
character(len=*), intent(in), optional :: message
type(test_result_t), intent(inout), optional :: test_result

public subroutine assert_true(condition, message, test_result)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: condition
character(len=*), intent(in), optional :: message
type(test_result_t), intent(inout), optional :: test_result