test_get_dimension_missing Subroutine

public subroutine test_get_dimension_missing()

Arguments

None

Calls

proc~~test_get_dimension_missing~~CallsGraph proc~test_get_dimension_missing test_get_dimension_missing assertequal assertequal proc~test_get_dimension_missing->assertequal none~get_dimension FileMetadata%get_dimension proc~test_get_dimension_missing->none~get_dimension at at none~get_dimension->at find find none~get_dimension->find proc~mapl_return MAPL_Return none~get_dimension->proc~mapl_return proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

   subroutine test_get_dimension_missing()
      type (FileMetadata) :: cf
      integer :: extent
      integer :: status

      !W.Y notes: If missing, crash

      extent = cf%get_dimension('x',rc=status)
      @assertEqual(status, pFIO_DIMENSION_NOT_FOUND)
      !extent = cf%get_dimension('x') ! without rc
      !@assertExceptionRaised('FileMetadata::get_dimension() - no such dimension <x>.')
      !@assertEqual(pFIO_DIMENSION_NOT_FOUND, status)

   end subroutine test_get_dimension_missing