This module contains the procedures and variables that the user may use for unit testing with fruit.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | FRUIT_PREFIX_LEN_MAX | = | 50 |
Test that var1 and var2 are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | var1 | |||
logical, | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | dimension(:) | :: | var1 | ||
logical, | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | dimension(:, :) | :: | var1 | ||
logical, | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | var1 | |||
character(len=*), | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | dimension(:) | :: | var1 | ||
character(len=*), | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | dimension(:, :) | :: | var1 | ||
character(len=*), | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | var1 | |||
integer, | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:) | :: | var1 | ||
integer, | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:, :) | :: | var1 | ||
integer, | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | var1 | |||
real, | intent(in) | :: | var2 | |||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | var1 | ||
real, | intent(in), | dimension(:) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:, :) | :: | var1 | ||
real, | intent(in), | dimension(:, :) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var1 | |||
real(kind=dp), | intent(in) | :: | var2 | |||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(:) | :: | var1 | ||
real(kind=dp), | intent(in), | dimension(:) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(:, :) | :: | var1 | ||
real(kind=dp), | intent(in), | dimension(:, :) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | var1 | |||
complex, | intent(in) | :: | var2 | |||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | var1 | ||
complex, | intent(in), | dimension(:) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | var1 | ||
complex, | intent(in), | dimension(:, :) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var1 | |||
complex(kind=dp), | intent(in) | :: | var2 | |||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | dimension(:) | :: | var1 | ||
complex(kind=dp), | intent(in), | dimension(:) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | dimension(:, :) | :: | var1 | ||
complex(kind=dp), | intent(in), | dimension(:, :) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Test that var1 and var2 are not equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | var1 | |||
logical, | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | dimension(:) | :: | var1 | ||
logical, | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | dimension(:, :) | :: | var1 | ||
logical, | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | var1 | |||
character(len=*), | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | dimension(:) | :: | var1 | ||
character(len=*), | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | dimension(:, :) | :: | var1 | ||
character(len=*), | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | var1 | |||
integer, | intent(in) | :: | var2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:) | :: | var1 | ||
integer, | intent(in), | dimension(:) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:, :) | :: | var1 | ||
integer, | intent(in), | dimension(:, :) | :: | var2 | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | var1 | |||
real, | intent(in) | :: | var2 | |||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | var1 | ||
real, | intent(in), | dimension(:) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:, :) | :: | var1 | ||
real, | intent(in), | dimension(:, :) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var1 | |||
real(kind=dp), | intent(in) | :: | var2 | |||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(:) | :: | var1 | ||
real(kind=dp), | intent(in), | dimension(:) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(:, :) | :: | var1 | ||
real(kind=dp), | intent(in), | dimension(:, :) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | var1 | |||
complex, | intent(in) | :: | var2 | |||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | var1 | ||
complex, | intent(in), | dimension(:) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | var1 | ||
complex, | intent(in), | dimension(:, :) | :: | var2 | ||
real, | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var1 | |||
complex(kind=dp), | intent(in) | :: | var2 | |||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | dimension(:) | :: | var1 | ||
complex(kind=dp), | intent(in), | dimension(:) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | dimension(:, :) | :: | var1 | ||
complex(kind=dp), | intent(in), | dimension(:, :) | :: | var2 | ||
real(kind=dp), | intent(in), | optional | :: | delta | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Print message to screen on assert failure and add to count.
Print message to screen on assert failure and add to count.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | message |
Print message to screen on assert failure and add to count.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | caseName | |||
character(len=*), | intent(in) | :: | message |
Return TRUE if any assert in current case has failed.
Return last message.
Return true if last assert is successful in case.
Return true if all asserts are successful in case.
Initialize FRUIT driver environment.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | rank |
Finalize FRUIT driver environment
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | optional | :: | exit_code |
Initialize FRUIT driver environment for output to XML file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | rank |
Write to XML file a passed case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | tc_name | |||
character(len=*), | intent(in) | :: | classname |
Write to XML file a passed case.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | tc_name | |||
character(len=*), | intent(in) | :: | classname |
Summarize FRUIT test results in XML format to result.xml file.
Show dots signifying test success on screen. Visible by default.
Hide dots signifying test success on screen. Visible by default.
Initialize a testcase.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | tc_name |
Finalize a testcase
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | optional | :: | exit_code |
Summarize FRUIT test results to screen.
Print statistics of cases and asserts in default format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | succ_assert | |||
integer, | intent(in) | :: | fail_assert | |||
integer, | intent(in) | :: | succ_case | |||
integer, | intent(in) | :: | fail_case |
Return true to result if any assert has failed till now.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out) | :: | result |
Get filename of XML file. result.xml by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(out) | :: | string |
Set filename of XML file. result.xml by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Get number of failed assertion messages.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | index |
Get failed asssertion messages to msgs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(out) | :: | msgs(:) |
Get failed asssertion messages to msgs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(out) | :: | msgs(:) |
Get total number of asserts.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | count |
Get number of assert failures.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | count |
Print message to screen on assert success and add to count.
Print message to screen and take necessary actions for assert failure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | expected | |||
character(len=*), | intent(in) | :: | got | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | if_is |
Set name of case to value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | value |
Get name of case to value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(out) | :: | value |
Override stdout to a user-specified file. Terminal by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | write_unit | |||
character(len=*), | intent(in) | :: | filename |
Override XML file unit number to a user-specified number. 21 by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | new_unit | |||
character(len=*), | intent(in) | :: | filename |
Stash results of test case for later use.
Restore results of test case for use.
Revert override of stdout to default. Terminal by default.
Revert override of XML file unit number to default. 21 by default.
Set a common prefix for classname. Null by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | str |
Get a common prefix for classname. Null by default.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(out) | :: | str |
Get statistics of cases and asserts.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | fail_assert | |||
integer, | intent(out) | :: | suc_assert | |||
integer, | intent(out) | :: | fail_case | |||
integer, | intent(out) | :: | suc_case |
Test that var1 is true.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | var1 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Test that var1 is false.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | var1 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Compare two files and return true if identical
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename1 | |||
character(len=*), | intent(in) | :: | filename2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |
Compare two files and return true if not identical
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename1 | |||
character(len=*), | intent(in) | :: | filename2 | |||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(out), | optional | :: | status |