test_ISO8601DateTime_getters Subroutine

public subroutine test_ISO8601DateTime_getters()

Arguments

None

Calls

proc~~test_iso8601datetime_getters~~CallsGraph proc~test_iso8601datetime_getters test_ISO8601DateTime_getters assertequal assertequal proc~test_iso8601datetime_getters->assertequal proc~get_day_datetime ISO8601DateTime%get_day_datetime proc~test_iso8601datetime_getters->proc~get_day_datetime proc~get_hour_datetime ISO8601DateTime%get_hour_datetime proc~test_iso8601datetime_getters->proc~get_hour_datetime proc~get_millisecond_datetime ISO8601DateTime%get_millisecond_datetime proc~test_iso8601datetime_getters->proc~get_millisecond_datetime proc~get_minute_datetime ISO8601DateTime%get_minute_datetime proc~test_iso8601datetime_getters->proc~get_minute_datetime proc~get_month_datetime ISO8601DateTime%get_month_datetime proc~test_iso8601datetime_getters->proc~get_month_datetime proc~get_second_datetime ISO8601DateTime%get_second_datetime proc~test_iso8601datetime_getters->proc~get_second_datetime proc~get_timezone_offset_datetime ISO8601DateTime%get_timezone_offset_datetime proc~test_iso8601datetime_getters->proc~get_timezone_offset_datetime proc~get_year_datetime ISO8601DateTime%get_year_datetime proc~test_iso8601datetime_getters->proc~get_year_datetime proc~mapl_verify MAPL_Verify proc~test_iso8601datetime_getters->proc~mapl_verify proc~get_day ISO8601Date%get_day proc~get_day_datetime->proc~get_day proc~get_hour ISO8601Time%get_hour proc~get_hour_datetime->proc~get_hour proc~get_millisecond ISO8601Time%get_millisecond proc~get_millisecond_datetime->proc~get_millisecond proc~get_minute ISO8601Time%get_minute proc~get_minute_datetime->proc~get_minute proc~get_month ISO8601Date%get_month proc~get_month_datetime->proc~get_month proc~get_second ISO8601Time%get_second proc~get_second_datetime->proc~get_second proc~get_timezone_offset ISO8601Time%get_timezone_offset proc~get_timezone_offset_datetime->proc~get_timezone_offset proc~get_year ISO8601Date%get_year proc~get_year_datetime->proc~get_year proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_ISO8601DateTime_getters()
      character(len=*), parameter :: isodate = '20220707'
      character(len=*), parameter :: isotime = 'T174107.513Z'
      integer, parameter :: YEAR = 2022 
      integer, parameter :: MONTH = 07
      integer, parameter :: DAY = 07
      integer, parameter :: HOUR = 17
      integer, parameter :: MINUTE = 41
      integer, parameter :: SECOND = 07
      integer, parameter :: MILLISECOND = 513
      integer, parameter :: TIMEZONE_OFFSET = 0
      type(ISO8601DateTime) :: datetime
      type(ISO8601Date) :: date
      type(ISO8601Time) :: time
      integer :: status
      integer :: rc

      date = ISO8601Date(isodate, _RC)
      datetime%date_ = date
      time = ISO8601Time(isotime, _RC)
      datetime%time_ = time

      @assertEqual(YEAR, datetime%get_year())
      @assertEqual(MONTH, datetime%get_month())
      @assertEqual(DAY, datetime%get_day())
      @assertEqual(HOUR, datetime%get_hour())
      @assertEqual(MINUTE, datetime%get_minute())
      @assertEqual(SECOND, datetime%get_second())
      @assertEqual(MILLISECOND, datetime%get_millisecond())
      @assertEqual(TIMEZONE_OFFSET, datetime%get_timezone_offset())
   end subroutine test_ISO8601DateTime_getters