test_one_timer Subroutine

public subroutine test_one_timer()

Arguments

None

Calls

proc~~test_one_timer~~CallsGraph proc~test_one_timer test_one_timer assertequal assertequal proc~test_one_timer->assertequal none~get_header~5 NameColumn%get_header proc~test_one_timer->none~get_header~5 none~get_row~12 NameColumn%get_row proc~test_one_timer->none~get_row~12 none~get_num_rows_header~5 NameColumn%get_num_rows_header none~get_header~5->none~get_num_rows_header~5 none~get_separator TextColumn%get_separator none~get_header~5->none~get_separator none~get_width TextColumn%get_width none~get_header~5->none~get_width get_depth get_depth none~get_row~12->get_depth get_name get_name none~get_row~12->get_name none~get_row~12->none~get_width none~get_num_rows_separator TextColumn%get_num_rows_separator none~get_num_rows_header~5->none~get_num_rows_separator none~get_separator->none~get_width

Source Code

   subroutine test_one_timer()
      type (NameColumn) :: column
      type (MeterNode), target :: node
      integer, parameter :: WIDTH = 10
      character(:), allocatable :: header(:)

      node = MeterNode('all', AdvancedMeter(MpiTimerGauge()))
      column = NameColumn(width=WIDTH)

      ! Check proper padding.
      call column%get_header(header)
      @assertEqual(WIDTH, len(header))
      @assertEqual(WIDTH, len(column%get_row(node)))
      @assertEqual('Name      ',header(1))
      @assertEqual('all       ',column%get_row(node))
      
   end subroutine test_one_timer