MONC
test_monc_component.F90
Go to the documentation of this file.
1 ! Tests the component registry functionality
3  use fruit, only : assert_equals, add_fail, assert_true, &
4  assert_false, set_unit_name, assert_not_equals
6  use state_mod, only : model_state_type
9  use collections_mod, only : map_type, c_size, c_value_at, c_key_at
10  implicit none
11 
12 
13 
14 contains
15  ! Test
16  subroutine test_parameters
17  call assert_not_equals(2,init_priority_index,"Test INIT_PRIORITY_INDEX is not real")
18  call assert_equals(1,init_priority_index,"Test INIT_PRIORITY_INDEX is value expected")
19  call assert_equals(2,timestep_priority_index,"Test TIMESTEP_PRIORITY_INDEX is value expected")
20  call assert_equals(5,finalisation_priority_index,"Test FINALISATION_PRIORITY_INDEX is value expected")
21  end subroutine test_parameters
22 
23 end module test_monc_component_mod
24 
25 
26 ! The driver for testing the registry
28  use fruit, only : init_fruit, run_test_case, fruit_summary
30 
31  implicit none
32 
33  call init_fruit
34  call run_test_case(test_parameters, "Testing parameters")
35 
36  call fruit_summary
38 
conversions_mod
Conversion between common inbuilt FORTRAN data types.
Definition: conversions.F90:5
collections_mod::map_type
Map data structure that holds string (length 20 maximum) key value pairs.
Definition: collections.F90:86
collections_mod::c_key_at
Retrieves the key currently being held at a specific index in the map or "" if the index > map elemen...
Definition: collections.F90:457
monc_component_mod::init_priority_index
integer, parameter, public init_priority_index
Index of each priority value in the descriptor.
Definition: monc_component.F90:19
test_monc_component_mod::test_parameters
subroutine test_parameters
Definition: test_monc_component.F90:17
conversions_mod::conv_to_integer
Converts data types to integers.
Definition: conversions.F90:49
collections_mod
Collection data structures.
Definition: collections.F90:7
test_monc_component_mod
Definition: test_monc_component.F90:2
collections_mod::c_size
Returns the number of elements in the collection.
Definition: collections.F90:428
conversions_mod::conv_to_generic
Converts a data type into the generic (class *) form.
Definition: conversions.F90:25
monc_component_mod::timestep_priority_index
integer, parameter, public timestep_priority_index
Definition: monc_component.F90:19
monc_component_mod
Interfaces and types that MONC components must specify.
Definition: monc_component.F90:6
conversions_mod::conv_to_string
Converts data types to strings.
Definition: conversions.F90:38
state_mod::model_state_type
The ModelState which represents the current state of a run.
Definition: state.F90:39
test_monc_component_driver
program test_monc_component_driver
Definition: test_monc_component.F90:27
monc_component_mod::finalisation_priority_index
integer, parameter, public finalisation_priority_index
Definition: monc_component.F90:19
monc_component_mod::component_descriptor_type
Description of a component.
Definition: monc_component.F90:42
state_mod
The model state which represents the current state of a run.
Definition: state.F90:2