test_parse_time Subroutine

public subroutine test_parse_time()

Arguments

None

Calls

proc~~test_parse_time~2~~CallsGraph proc~test_parse_time~2 test_parse_time assertequal assertequal proc~test_parse_time~2->assertequal asserttrue asserttrue proc~test_parse_time~2->asserttrue proc~parse_time parse_time proc~test_parse_time~2->proc~parse_time 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 proc~is_between is_between proc~is_valid_hour->proc~is_between proc~is_valid_millisecond->proc~is_between proc~is_valid_minute->proc~is_between proc~is_valid_second->proc~is_between proc~read_whole_number_indexed->proc~is_whole_number proc~get_integer_digit_from_string get_integer_digit_from_string proc~read_whole_number_indexed->proc~get_integer_digit_from_string

Source Code

   subroutine test_parse_time()
      type(time_fields) :: time

      time = parse_time('T17:41:07.513Z')
      @assertTrue(time%is_valid_)
      @assertEqual(17, time%hour_)
      @assertEqual(41, time%minute_)
      @assertEqual(7, time%second_)
      @assertEqual(513, time%millisecond_)
      @assertEqual(0, time%timezone_offset_)

      time = parse_time('T174107.513Z')
      @assertTrue(time%is_valid_)
      @assertEqual(17, time%hour_)
      @assertEqual(41, time%minute_)
      @assertEqual(7, time%second_)
      @assertEqual(513, time%millisecond_)
      @assertEqual(0, time%timezone_offset_)

   end subroutine test_parse_time