3   use fruit
, only : assert_equals
    14     integer :: i, nn_timesteps
    22       current_state%timestep = int(r*10000)+1
    24       nn_timesteps= int(r*9)+1
    26       current_state%last_timestep_column = .true. 
    27       current_state%continue_timestep=.true.
    28       call options_add(current_state%options_database, 
"nn_timesteps", nn_timesteps)
    30       call assert_equals(mod(current_state%timestep, nn_timesteps) /= 0, current_state%continue_timestep,&
    31         "Timestep completion consistent with expectations")
    37     integer :: i, nn_timesteps, nn_consolidation, multiplier
    45       nn_timesteps= int(r*9)+1
    47       multiplier = int(r*199)+1
    49       nn_consolidation = int(r*9)+1
    51       current_state%timestep = nn_timesteps * multiplier 
    52       current_state%continue_consolidation=.true.
    53       call options_add(current_state%options_database, 
"nn_timesteps", nn_timesteps)
    54       call options_add(current_state%options_database, 
"nn_consolidation", nn_consolidation)
    55       call consolidation_callback(current_state)
    56       call assert_equals(mod(current_state%timestep / nn_timesteps, nn_consolidation) /= 0, current_state%continue_consolidation,&
    57         "Consolidation completion consistent with expectations")
    63     integer :: i, nn_timesteps, nn_consolidation, nn_modeldump, multiplier
    71       nn_timesteps= int(r*9)+1
    73       multiplier = int(r*39)+1
    75       nn_consolidation = int(r*9)+1
    77       nn_modeldump = int(r*9)+1
    79       current_state%timestep = nn_timesteps * nn_consolidation * multiplier  
    80       current_state%continue_modeldump=.true.
    81       call options_add(current_state%options_database, 
"nn_timesteps", nn_timesteps)
    82       call options_add(current_state%options_database, 
"nn_consolidation", nn_consolidation)
    83       call options_add(current_state%options_database, 
"nn_modeldump", nn_modeldump)
    84       call modeldump_callback(current_state)
    85       call assert_equals(mod(current_state%timestep / nn_timesteps / nn_consolidation, nn_modeldump) /= 0,&
    86        current_state%continue_modeldump, 
"Model dump completion consistent with expectations")
    92     integer :: i, n, clock
    93     integer, 
dimension(:), 
allocatable :: seed
    95     call random_seed(
size = n)
    98     call system_clock(count=clock)
   100     seed = clock + 37 * (/ (i - 1, i = 1, n) /)
   101     call random_seed(put=seed)
   109   use fruit
, only : init_fruit, run_test_case, fruit_summary
 subroutine test_modeldump_callback()
subroutine test_consolidation_callback()
subroutine init_random_seed()
integer, parameter max_tests
subroutine test_timestep_callback()
The ModelState which represents the current state of a run. 
This component will check for termination conditions at stages of the model run and terminate that sp...
subroutine timestep_callback(current_state)
Timestep hook which is called at each timestep to determine whether or not to terminate timestep iter...
program test_terminationcheck_driver
The model state which represents the current state of a run.