MOM6
mom_unit_tests Module Reference

Detailed Description

Invokes unit tests in all modules that have them.

Functions/Subroutines

subroutine, public unit_tests (verbosity)
 Calls unit tests for other modules. Note that if a unit test returns true, a FATAL error is triggered. More...
 

Function/Subroutine Documentation

◆ unit_tests()

subroutine, public mom_unit_tests::unit_tests ( integer, intent(in)  verbosity)

Calls unit tests for other modules. Note that if a unit test returns true, a FATAL error is triggered.

Parameters
[in]verbosityThe verbosity level

Definition at line 22 of file MOM_unit_tests.F90.

22  ! Arguments
23  integer, intent(in) :: verbosity !< The verbosity level
24  ! Local variables
25  logical :: verbose
26 
27  verbose = verbosity>=5
28 
29  if (is_root_pe()) then ! The following need only be tested on 1 PE
30  if (string_functions_unit_tests(verbose)) call mom_error(fatal, &
31  "MOM_unit_tests: string_functions_unit_tests FAILED")
32  if (remapping_unit_tests(verbose)) call mom_error(fatal, &
33  "MOM_unit_tests: remapping_unit_tests FAILED")
34  if (neutral_diffusion_unit_tests(verbose)) call mom_error(fatal, &
35  "MOM_unit_tests: neutralDiffusionUnitTests FAILED")
36  if (diag_vkernels_unit_tests(verbose)) call mom_error(fatal, &
37  "MOM_unit_tests: diag_vkernels_unit_tests FAILED")
38  endif
39