test_one_timer Subroutine

public subroutine test_one_timer()

Arguments

None

Calls

proc~~test_one_timer~2~~CallsGraph proc~test_one_timer~2 test_one_timer assertequal assertequal proc~test_one_timer~2->assertequal none~get_header~2 NameColumn%get_header proc~test_one_timer~2->none~get_header~2 none~get_row NameColumn%get_row proc~test_one_timer~2->none~get_row none~get_num_rows_header~2 NameColumn%get_num_rows_header none~get_header~2->none~get_num_rows_header~2 none~get_separator TextColumn%get_separator none~get_header~2->none~get_separator none~get_width TextColumn%get_width none~get_header~2->none~get_width get_depth get_depth none~get_row->get_depth get_name get_name none~get_row->get_name none~get_row->none~get_width none~get_num_rows_separator TextColumn%get_num_rows_separator none~get_num_rows_header~2->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