fortran_test_helper 1.0.0
A Fortran library to provide assistance to testing.
Loading...
Searching...
No Matches
fortran_test_helper::assert Interface Reference

Asserts that two items are equal. More...

Detailed Description

Asserts that two items are equal.

Supported Data Types
  • real(real32)
  • real(real64)
  • complex(real32)
  • complex(real64)
  • integer(int16)
  • integer(int32)
  • integer(int64)
Syntax 1
Compares scalar values.
logical function assert(T x, T y, optional T tol)
Where T is the one of the types previously mentioned.
Parameters
[in]xThe first item.
[in]yThe second item.
[in]tolAn optional value, only for the floating-point types, that specifies the comparison tolerance. The default value is the square root of the machine epsilon.
Returns
Returns true if all items in x and y are equivalent; else, returns false.
Syntax 2
Compares 1D arrays.
logical function assert(T x(:), t y(:), optional t tol, optional integer(int32) flag)
Where T is the one of the types previously mentioned.
Parameters
[in]xThe first item.
[in]yThe second item.
[in]tolAn optional value, only for the floating-point types, that specifies the comparison tolerance. The default value is the square root of the machine epsilon.
[out]flagAn optional 32-bit integer (int32) output that returns a value of -1 if x and y are different sizes; else, returns the index of the first non-equivalent items.
Returns
Returns true if all items in x and y are equivalent; else, returns false.
Syntax 3
Compares matrices.
logical function assert(T x(:,:), t y(:,:), optional t tol, optional integer(int32) flag, optional integer(int32) row, optional integer(int32) col)
Where T is the one of the types previously mentioned.
Parameters
[in]xThe first item.
[in]yThe second item.
[in]tolAn optional value, only for the floating-point types, that specifies the comparison tolerance. The default value is the square root of the machine epsilon.
[out]flagAn optional 32-bit integer (int32) output that returns a value of -1 if x and y are different sizes, returns the column-major index of the first value that is not equivalent, or returns zero in the event of equivalance.
[out]rowAn optional 32-bit integer (int32) output that returns a the row index of the first non-equivalent value encountered; else, returns a value of zero for a successful test.
[out]colAn optional 32-bit integer (int32) output that returns a the column index of the first non-equivalent value encountered; else, returns a value of zero for a successful test.
Returns
Returns true if all items in x and y are equivalent; else, returns false.

Definition at line 80 of file fortran_test_helper.f90.


The documentation for this interface was generated from the following file: