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

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

References mom_diag_vkernels::diag_vkernels_unit_tests(), mom_error_handler::is_root_pe(), mom_error_handler::mom_error(), mom_lateral_boundary_diffusion::near_boundary_unit_tests(), 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().

Here is the call graph for this function:
Here is the caller graph for this function: