test_get_adjusted_time Subroutine

public subroutine test_get_adjusted_time()

Arguments

None

Calls

proc~~test_get_adjusted_time~~CallsGraph proc~test_get_adjusted_time test_get_adjusted_time ESMF_TimeIntervalSet ESMF_TimeIntervalSet proc~test_get_adjusted_time->ESMF_TimeIntervalSet assertequal assertequal proc~test_get_adjusted_time->assertequal none~create_from_parameters ExtDataPointerUpdate%create_from_parameters proc~test_get_adjusted_time->none~create_from_parameters none~get_adjusted_time ExtDataPointerUpdate%get_adjusted_time proc~test_get_adjusted_time->none~get_adjusted_time proc~get_int_time get_int_time proc~test_get_adjusted_time->proc~get_int_time proc~mapl_verify MAPL_Verify proc~test_get_adjusted_time->proc~mapl_verify none~create_from_parameters->proc~mapl_verify ESMF_ClockGet ESMF_ClockGet none~create_from_parameters->ESMF_ClockGet ESMF_TimeGet ESMF_TimeGet none~create_from_parameters->ESMF_TimeGet ESMF_TimeSet ESMF_TimeSet none~create_from_parameters->ESMF_TimeSet ESMF_UtilStringUpperCase ESMF_UtilStringUpperCase none~create_from_parameters->ESMF_UtilStringUpperCase interface~mapl_assert MAPL_Assert none~create_from_parameters->interface~mapl_assert proc~mapl_return MAPL_Return none~create_from_parameters->proc~mapl_return proc~string_to_esmf_timeinterval string_to_esmf_timeinterval none~create_from_parameters->proc~string_to_esmf_timeinterval proc~string_to_integer_time string_to_integer_time none~create_from_parameters->proc~string_to_integer_time none~get_adjusted_time->proc~mapl_return proc~get_int_time->proc~mapl_verify proc~get_int_time->ESMF_TimeGet proc~get_int_time->proc~mapl_return proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~mapl_return->proc~mapl_throw_exception at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~string_to_esmf_timeinterval->ESMF_TimeIntervalSet proc~string_to_esmf_timeinterval->proc~mapl_verify proc~string_to_esmf_timeinterval->interface~mapl_assert proc~string_to_esmf_timeinterval->proc~mapl_return proc~string_to_integer_time->proc~mapl_return

Source Code

   subroutine test_get_adjusted_time
      type(ExtDataPointerUpdate) :: ex
      integer :: status, rc
      character(len=STRLEN) :: offset_string
      type(ESMF_TimeInterval) :: offset
      integer :: ios
      integer, parameter :: OFFSET_IN_SECONDS = 300
      integer :: expected(NF), actual(NF)

      write(offset_string, fmt='("PT", I03, "S")', iostat=ios) OFFSET_IN_SECONDS
      _VERIFY(ios)
      call ESMF_TimeIntervalSet(offset, s=OFFSET_IN_SECONDS, _RC)
      call get_int_time(default_time+offset, expected, _RC)
      call ex%create_from_parameters(UPDATE_TIMESTRING, UPDATE_FREQ_STRING, offset_string, default_time, clock, _RC)
      call get_int_time(ex%get_adjusted_time(default_time), actual, _RC)
      @assertEqual(expected, actual, 'Adjusted time does match expected time.')

   end subroutine test_get_adjusted_time