MOM6
mom_unit_tests Module Reference

Detailed Description

Invokes unit tests in all modules that have them.

Functions/Subroutines

subroutine 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 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 16 of file MOM_unit_tests.F90.

References mom_diag_vkernels::diag_vkernels_unit_tests(), mom_error_handler::is_root_pe(), mom_error_handler::mom_error(), mom_neutral_diffusion::neutral_diffusion_unit_tests(), mom_remapping::remapping_unit_tests(), and mom_string_functions::string_functions_unit_tests().

Referenced by mom::initialize_mom().

16  ! Arguments
17  integer, intent(in) :: verbosity !< The verbosity level
18  ! Local variables
19  logical :: verbose
20 
21  verbose = verbosity>=5
22 
23  if (is_root_pe()) then ! The following need only be tested on 1 PE
24  if (string_functions_unit_tests(verbose)) call mom_error(fatal, &
25  "MOM_unit_tests: string_functions_unit_tests FAILED")
26  if (remapping_unit_tests(verbose)) call mom_error(fatal, &
27  "MOM_unit_tests: remapping_unit_tests FAILED")
28  if (neutral_diffusion_unit_tests(verbose)) call mom_error(fatal, &
29  "MOM_unit_tests: neutralDiffusionUnitTests FAILED")
30  if (diag_vkernels_unit_tests(verbose)) call mom_error(fatal, &
31  "MOM_unit_tests: diag_vkernels_unit_tests FAILED")
32  endif
33 
Here is the call graph for this function:
Here is the caller graph for this function: