Test_MAPL_GetResource_array_int8 Subroutine

public subroutine Test_MAPL_GetResource_array_int8()

Arguments

None

Calls

proc~~test_mapl_getresource_array_int8~~CallsGraph proc~test_mapl_getresource_array_int8 Test_MAPL_GetResource_array_int8 ESMF_ConfigCreate ESMF_ConfigCreate proc~test_mapl_getresource_array_int8->ESMF_ConfigCreate ESMF_ConfigSetAttribute ESMF_ConfigSetAttribute proc~test_mapl_getresource_array_int8->ESMF_ConfigSetAttribute assertequal assertequal proc~test_mapl_getresource_array_int8->assertequal proc~mapl_getresource_config_array MAPL_GetResource_config_array proc~test_mapl_getresource_array_int8->proc~mapl_getresource_config_array ESMF_ConfigFindLabel ESMF_ConfigFindLabel proc~mapl_getresource_config_array->ESMF_ConfigFindLabel ESMF_ConfigGetAttribute ESMF_ConfigGetAttribute proc~mapl_getresource_config_array->ESMF_ConfigGetAttribute begin begin proc~mapl_getresource_config_array->begin interface~mapl_am_i_root MAPL_Am_I_Root proc~mapl_getresource_config_array->interface~mapl_am_i_root interface~mapl_assert MAPL_Assert proc~mapl_getresource_config_array->interface~mapl_assert next next proc~mapl_getresource_config_array->next of of proc~mapl_getresource_config_array->of proc~mapl_return MAPL_Return proc~mapl_getresource_config_array->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_getresource_config_array->proc~mapl_verify push_back push_back proc~mapl_getresource_config_array->push_back 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 proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine Test_MAPL_GetResource_array_int8()
      type(ESMF_Config) :: config
      integer :: status
      integer(kind=int64) :: expected(4), actual(4)
      character(len=*), parameter :: LABEL = 'label'
      character(len=*), parameter :: VAL = '1 2 3 4'
      logical :: value_is_set
      character(len=MAX_LINE_LENGTH) :: output_string

      expected = [1, 2, 3, 4]
      config = ESMF_ConfigCreate(rc = status)
      @assertEqual(0, status, 'Failed to create ESMF_Config')
      call ESMF_ConfigSetAttribute(config, PRINT_ALL, label = 'PRINTRC:', rc = status)
      @assertEqual(0, status, 'Failed to set PRINTRC')
      call ESMF_ConfigSetAttribute(config, VAL, label = LABEL, rc = status)
      @assertEqual(0, status, 'Failed to set attribute')
      call MAPL_GetResource_config_array(config, actual, label = LABEL, value_is_set = value_is_set, iunit=output_string, rc = status)
      @assertEqual(0, status, 'Failed to get resource')
      @assertEqual(expected, actual, 'actual does not match expected.')

   end subroutine Test_MAPL_GetResource_array_int8