FLASH-X
Doxygen Generated Documentation From Interface Source Code
Data Types | Functions/Subroutines | Variables
ut_testDriverMod Module Reference

Data Types

interface  assertEqual
 
interface  assertSetEqual
 

Functions/Subroutines

subroutine start_test_run ()
 
subroutine finish_test_run
 
subroutine assertTrue (a, msg)
 
subroutine assertFalse (a, msg)
 
subroutine assertEqualInt (a, b, msg)
 
subroutine assertEqualReal (a, b, msg)
 
subroutine assertAlmostEqual (a, b, prec, msg)
 
subroutine assertSetEqual2dIntArray (A, B, msg)
 

Variables

integer, save my_n_tests = 0
 
integer, save my_n_failed = 0
 
real, save my_t_start = 0.0d0
 
logical, save is_testing = .FALSE.
 

Detailed Description

A module that encapsulates common routines and variables that can be used in unittests. Typically, this module is used in the unittests version of Driver_evolveAll as follows

<declare variables and setup for test> ... call start_test_run ... call assertFalse(didAbort, "Action aborted") call assertAlmostEqual(x, 1.1, 1.0d-15, "Incorrect x value") ... call finish_test_run ... <clean-up>

NOTES

The finish_test_run prints results to standard output.

Function/Subroutine Documentation

◆ assertAlmostEqual()

subroutine ut_testDriverMod::assertAlmostEqual ( real  a,
real  b,
real  prec,
character(*)  msg 
)

Definition at line 189 of file ut_testDriverMod.F90.

◆ assertEqualInt()

subroutine ut_testDriverMod::assertEqualInt ( integer  a,
integer  b,
character(*)  msg 
)

Definition at line 159 of file ut_testDriverMod.F90.

◆ assertEqualReal()

subroutine ut_testDriverMod::assertEqualReal ( real  a,
real  b,
character(*)  msg 
)

Definition at line 174 of file ut_testDriverMod.F90.

◆ assertFalse()

subroutine ut_testDriverMod::assertFalse ( logical  a,
character(*)  msg 
)

Definition at line 145 of file ut_testDriverMod.F90.

◆ assertSetEqual2dIntArray()

subroutine ut_testDriverMod::assertSetEqual2dIntArray ( integer  A,
integer  B,
character(*)  msg 
)

Definition at line 205 of file ut_testDriverMod.F90.

◆ assertTrue()

subroutine ut_testDriverMod::assertTrue ( logical  a,
character(*)  msg 
)

Definition at line 131 of file ut_testDriverMod.F90.

◆ finish_test_run()

subroutine ut_testDriverMod::finish_test_run

Definition at line 80 of file ut_testDriverMod.F90.

References Driver_abort(), and ut_getFreeFileUnit().

Here is the call graph for this function:

◆ start_test_run()

subroutine ut_testDriverMod::start_test_run

Definition at line 67 of file ut_testDriverMod.F90.

References Driver_abort().

Here is the call graph for this function:

Variable Documentation

◆ is_testing

logical, save ut_testDriverMod::is_testing = .FALSE.

Definition at line 45 of file ut_testDriverMod.F90.

◆ my_n_failed

integer, save ut_testDriverMod::my_n_failed = 0

Definition at line 43 of file ut_testDriverMod.F90.

◆ my_n_tests

integer, save ut_testDriverMod::my_n_tests = 0

Definition at line 42 of file ut_testDriverMod.F90.

◆ my_t_start

real, save ut_testDriverMod::my_t_start = 0.0d0

Definition at line 44 of file ut_testDriverMod.F90.