test_complex Subroutine

public subroutine test_complex()

Arguments

None

Calls

proc~~test_complex~~CallsGraph proc~test_complex test_complex assertequal assertequal proc~test_complex->assertequal none~append~2 DirPath%append proc~test_complex->none~append~2 none~find~41 DirPath%find proc~test_complex->none~find~41 push_back push_back none~append~2->push_back begin begin none~find~41->begin next next none~find~41->next of of none~find~41->of

Source Code

   subroutine test_complex()
      type (DirPath) :: path
      character(len=:), allocatable :: full_name
      integer :: status

      call path%append('dir1')
      call path%append('dir1/dir3')
      call path%append('dir2')

      full_name = path%find('exist.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir1/exist.dat', full_name)

      full_name = path%find('exist2.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir2/exist2.dat', full_name)

      full_name = path%find('exist3.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir1/dir3/exist3.dat', full_name)


   end subroutine test_complex