test_get_fptr_shape_wrong_order_raise_exception Subroutine

public subroutine test_get_fptr_shape_wrong_order_raise_exception()

Arguments

None

Calls

proc~~test_get_fptr_shape_wrong_order_raise_exception~~CallsGraph proc~test_get_fptr_shape_wrong_order_raise_exception test_get_fptr_shape_wrong_order_raise_exception assertexceptionraised assertexceptionraised proc~test_get_fptr_shape_wrong_order_raise_exception->assertexceptionraised proc~get_fptr_shape_private get_fptr_shape_private proc~test_get_fptr_shape_wrong_order_raise_exception->proc~get_fptr_shape_private interface~mapl_assert MAPL_Assert proc~get_fptr_shape_private->interface~mapl_assert proc~mapl_return MAPL_Return proc~get_fptr_shape_private->proc~mapl_return at at 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_fptr_shape_wrong_order_raise_exception()
       integer :: expected(ARRAY_RANK), actual(ARRAY_RANK)
       integer, allocatable :: gridToFieldMap(:)
       integer, allocatable :: localElementCount(:)
       logical :: has_vertical
       integer :: status

       gridToFieldMap = [4, 5]
       has_vertical = .TRUE.
       localElementCount = [2, 3, 5, 7, 11]
       expected = [product(localElementCount(4:5)), localElementCount(3), product(localElementCount(1:2))]
       ! This tests throws an Exception for improper input arguments.
       ! In other words, the improper input arguments ARE the point.
       actual = get_fptr_shape_private(gridToFieldMap, localElementCount, has_vertical, rc=status)
       @assertExceptionRaised()

    end subroutine test_get_fptr_shape_wrong_order_raise_exception