Constructor interface for a TestRealArrVal object.
Construct new TestRealArrVal given a name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the new TestRealArrVal object. |
Return new TestRealArrVal object.
Constructor interface for a TestRealVal object.
Construct new TestRealVal given a name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the new TestRealVal object. |
Return new TestRealVal object.
Constructor interface for a TestSuite object.
Construct a new test suite.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the test suite. |
Return the new test suite.
Abstract function interface for an array comparisson function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | res | See res and tgt in TestRealArrVal class. |
|
real(kind=wp), | intent(in), | dimension(:) | :: | tgt | See res and tgt in TestRealArrVal class. |
Return whether or not the test succeeded based on a comparrison.
Abstract function interface for a value comparisson function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | res | Result being tested. |
||
real(kind=wp), | intent(in) | :: | tgt | Target value used to compare result to. |
Return whether or not the test succeeded based on a comparrison.
Abstract function interface for running a test.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Test), | intent(in) | :: | self | The test itself. The Test object should contain all information needed to run the test. |
Return total number of tests which passed in the linked list up to and including this test.
Test performed on an array of real values.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(realArrCompInterface), | public, | nopass, pointer | :: | compare | Pointer to a comparisson function used to perform the test. |
||
real(kind=wp), | public, | allocatable, dimension(:) | :: | res | Real array result from some process. |
||
character(len=NAME_LENGTH), | public | :: | test_name | Name of the test case. |
|||
real(kind=wp), | public, | allocatable, dimension(:) | :: | tgt | Target real array result for some process. |
Constructor interface for a TestRealArrVal object.
public function newTestRealArrVal_name(ts_name) | Construct new TestRealArrVal given a name. |
final :: deleteTestRealArrVal |
procedure, public, pass :: run => runTestRealArrVal |
Test performed on single real values.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(realCompInterface), | public, | nopass, pointer | :: | compare | Pointer to a comparisson function used to perform the test. |
||
real(kind=wp), | public | :: | res | Real value result from some process. |
|||
character(len=NAME_LENGTH), | public | :: | test_name | Name of the test case. |
|||
real(kind=wp), | public | :: | tgt | Target real value result for some process. |
Constructor interface for a TestRealVal object.
public function newTestRealVal_name(ts_name) | Construct new TestRealVal given a name. |
final :: deleteTestRealVal |
procedure, public, pass :: run => runTestRealVal |
Holds tests and manages their executtion. Represents a set of procedures to test a certain feature. First node of the test linked list.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(Test), | public, | pointer | :: | test | Current test whose attributes are available to be set. |
Constructor interface for a TestSuite object.
public function newTestSuite(ts_name) | Construct a new test suite. |
final :: deleteTestSuite |
generic, public :: add => addUnitTest, addTestRealVal, addTestRealArrVal | |
procedure, public, pass :: addUnitTest | |
procedure, public, pass :: runTests |
Construct new TestRealArrVal given a name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the new TestRealArrVal object. |
Return new TestRealArrVal object.
Construct new TestRealVal given a name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the new TestRealVal object. |
Return new TestRealVal object.
Construct a new test suite.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ts_name | Name of the test suite. |
Return the new test suite.
Test if two real arrays are exactly equal. Arrays must be of the same length and have the same values in the same positions. Uses epsilon value to account for floating point error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | res | Real value result being tested. |
|
real(kind=wp), | intent(in), | dimension(:) | :: | tgt | Target real value to compare result to. |
Test if two real values are equal. Uses an epsilon value to account for floating point error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | res | Real value result being tested. |
||
real(kind=wp), | intent(in) | :: | tgt | Target real value to compare result to. |
Return whether both values are equal.
Run test on real arrays and print summary report for images.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TestRealArrVal), | intent(in) | :: | self |
Return the tests that passed up to and including this one in the linked list.
Run test on real values and print summary report for images.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TestRealVal), | intent(in) | :: | self |
Return the tests that passed up to and including this one in the linked list.
Compact alternative to add a TestRealArrVal object to the test suite.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TestSuite), | intent(inout) | :: | self | |||
type(TestRealArrVal), | intent(in) | :: | ut | An initialized TestRealArrVal object with the desired name. |
||
real(kind=wp), | allocatable, dimension(:) | :: | res | See TestRealArrVal. |
||
real(kind=wp), | allocatable, dimension(:) | :: | tgt | See TestRealArrVal. |
Compact alternative to add a TestRealVal object to the test suite.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TestSuite), | intent(inout) | :: | self | |||
type(TestRealVal), | intent(in) | :: | ut | An initialized TestRealVal object with the desired name. |
||
real(kind=wp), | intent(in) | :: | res | See TestRealVal. |
||
real(kind=wp), | intent(in) | :: | tgt | See TestRealVal. |
Add a Test object to the test suite and make it available for setup.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TestSuite), | intent(inout) | :: | self | |||
class(Test), | intent(inout), | target | :: | ut | Object derived from the Test abstract type. |
Destruct TestRealVal object by deallocating its next object pointer as well as its res and tgt arrays.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TestRealArrVal), | intent(inout) | :: | self |
Destruct TestRealVal object by deallocating its next object pointer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TestRealVal), | intent(inout) | :: | self |
Destruct a test suite by deallocating its test pointer attribute.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(TestSuite), | intent(inout) | :: | self |
Print failure message of a real array comparrison.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | img | Image where the failure occured. |
||
real(kind=wp), | intent(in), | dimension(:) | :: | res | (Incorrect) result array of some procedure. |
|
real(kind=wp), | intent(in), | dimension(:) | :: | tgt | (Correct) target result array of some procedure. |
Print failure message of a real value comparrison.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | img | Image where the failure occured. |
||
real(kind=wp), | intent(in) | :: | res | (Incorrect) result value of some procedure. |
||
real(kind=wp), | intent(in) | :: | tgt | (Correct) target result value of some procedure. |