test_add_cycle Subroutine

public subroutine test_add_cycle()

Arguments

None

Calls

proc~~test_add_cycle~~CallsGraph proc~test_add_cycle test_add_cycle assertequal assertequal proc~test_add_cycle->assertequal assertfalse assertfalse proc~test_add_cycle->assertfalse none~add_cycle~2 AdvancedMeter%add_cycle proc~test_add_cycle->none~add_cycle~2 none~get_num_cycles AdvancedMeter%get_num_cycles proc~test_add_cycle->none~get_num_cycles none~get_total~2 AdvancedMeter%get_total proc~test_add_cycle->none~get_total~2 none~is_active AdvancedMeter%is_active proc~test_add_cycle->none~is_active none~get_mean_cycle AdvancedMeter%get_mean_cycle none~add_cycle~2->none~get_mean_cycle none~get_mean_cycle->none~get_num_cycles

Source Code

   subroutine test_add_cycle()
      type (AdvancedMeter) :: t

      t = AdvancedMeter(MpiTimerGauge())
      call t%add_cycle(increment=1.0_REAL64)
      @assertEqual(1.0, t%get_total())
      call t%add_cycle(increment=2.0_REAL64)
      @assertEqual(3.0, t%get_total())

      @assertEqual(2, t%get_num_cycles())
      @assertFalse(t%is_active())
      
   end subroutine test_add_cycle