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~106 MeterNode%begin proc~test_count_nodes_depth_0->none~begin~106 none~get_num_nodes~2 MeterNode%get_num_nodes proc~test_count_nodes_depth_0->none~get_num_nodes~2 get_num_nodes get_num_nodes none~get_num_nodes~2->get_num_nodes none~begin~107 MeterNodeVector%begin none~get_num_nodes~2->none~begin~107 none~get~187 MeterNodeVectorIterator%get none~get_num_nodes~2->none~get~187 none~next~106 MeterNodeVectorIterator%next none~get_num_nodes~2->none~next~106

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