test_construct_ISO8601Time Subroutine

public subroutine test_construct_ISO8601Time()

Arguments

None

Calls

proc~~test_construct_iso8601time~~CallsGraph proc~test_construct_iso8601time test_construct_ISO8601Time assertequal assertequal proc~test_construct_iso8601time->assertequal proc~construct_iso8601time construct_ISO8601Time proc~test_construct_iso8601time->proc~construct_iso8601time proc~get_hour ISO8601Time%get_hour proc~test_construct_iso8601time->proc~get_hour proc~get_millisecond ISO8601Time%get_millisecond proc~test_construct_iso8601time->proc~get_millisecond proc~get_minute ISO8601Time%get_minute proc~test_construct_iso8601time->proc~get_minute proc~get_second ISO8601Time%get_second proc~test_construct_iso8601time->proc~get_second proc~get_timezone_offset ISO8601Time%get_timezone_offset proc~test_construct_iso8601time->proc~get_timezone_offset interface~mapl_assert MAPL_Assert proc~construct_iso8601time->interface~mapl_assert proc~mapl_return MAPL_Return proc~construct_iso8601time->proc~mapl_return proc~parse_time parse_time proc~construct_iso8601time->proc~parse_time 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~is_valid_time~2 is_valid_time proc~parse_time->proc~is_valid_time~2 proc~is_whole_number is_whole_number proc~parse_time->proc~is_whole_number proc~parse_timezone_offset parse_timezone_offset proc~parse_time->proc~parse_timezone_offset proc~read_whole_number read_whole_number proc~parse_time->proc~read_whole_number proc~undelimit undelimit proc~parse_time->proc~undelimit proc~is_valid_hour is_valid_hour proc~is_valid_time~2->proc~is_valid_hour proc~is_valid_millisecond is_valid_millisecond proc~is_valid_time~2->proc~is_valid_millisecond proc~is_valid_minute is_valid_minute proc~is_valid_time~2->proc~is_valid_minute proc~is_valid_second is_valid_second proc~is_valid_time~2->proc~is_valid_second proc~is_valid_timezone_offset is_valid_timezone_offset proc~is_valid_time~2->proc~is_valid_timezone_offset proc~parse_timezone_offset->proc~is_whole_number proc~parse_timezone_offset->proc~read_whole_number proc~read_whole_number_indexed read_whole_number_indexed proc~read_whole_number->proc~read_whole_number_indexed

Source Code

   subroutine test_construct_ISO8601Time()
      type(ISO8601Time) :: isotime
      integer :: hour = 17
      integer :: minute = 49
      integer :: second = 07
      integer :: millisecond = 357
      integer :: timezone_offset = 0
      character(len=*), parameter :: delimited = 'T17:49:07.357Z'
      character(len=*), parameter :: undelimited = 'T174907.357Z'
      integer :: status

      isotime = construct_ISO8601Time(delimited, rc = status)

      @assertEqual(SUCCESS, status)
      @assertEqual(hour, isotime%get_hour())
      @assertEqual(minute, isotime%get_minute())
      @assertEqual(second, isotime%get_second())
      @assertEqual(millisecond, isotime%get_millisecond())
      @assertEqual(timezone_offset, isotime%get_timezone_offset())

      isotime = construct_ISO8601Time(undelimited, rc = status)

      @assertEqual(SUCCESS, status)
      @assertEqual(hour, isotime%get_hour())
      @assertEqual(minute, isotime%get_minute())
      @assertEqual(second, isotime%get_second())
      @assertEqual(millisecond, isotime%get_millisecond())
      @assertEqual(timezone_offset, isotime%get_timezone_offset())

   end subroutine test_construct_ISO8601Time