test_count_nodes_depth_0 Subroutine

public subroutine test_count_nodes_depth_0()

Arguments

None

Calls

proc~~test_count_nodes_depth_0~~CallsGraph proc~test_count_nodes_depth_0 test_count_nodes_depth_0 assertequal assertequal proc~test_count_nodes_depth_0->assertequal next next proc~test_count_nodes_depth_0->next none~begin~77 MeterNode%begin proc~test_count_nodes_depth_0->none~begin~77 none~get_num_nodes MeterNode%get_num_nodes proc~test_count_nodes_depth_0->none~get_num_nodes get_num_nodes get_num_nodes none~get_num_nodes->get_num_nodes none~begin~103 MeterNodeVector%begin none~get_num_nodes->none~begin~103 none~get~202 MeterNodeVectorIterator%get none~get_num_nodes->none~get~202 none~next~108 MeterNodeVectorIterator%next none~get_num_nodes->none~next~108

Source Code

   subroutine test_count_nodes_depth_0()
      type (MeterNode), target :: node

      class (AbstractMeterNodeIterator), allocatable :: iter
      integer :: count

      node = MeterNode('all', AdvancedMeter(MpiTimerGauge()))

      count = 0
      allocate(iter, source=node%begin())
      do while (iter /= node%end())
         count = count + 1
         call iter%next()
      end do

      @assertEqual(node%get_num_nodes(), count)

      
   end subroutine test_count_nodes_depth_0