test_parse_date Subroutine

public subroutine test_parse_date()

Arguments

None

Calls

proc~~test_parse_date~2~~CallsGraph proc~test_parse_date~2 test_parse_date assertequal assertequal proc~test_parse_date~2->assertequal asserttrue asserttrue proc~test_parse_date~2->asserttrue parse_date parse_date proc~test_parse_date~2->parse_date

Source Code

   subroutine test_parse_date()
      type(date_fields) :: date

      date = parse_date('2022-07-07', DATE_DELIMITER)
      @assertTrue(date%is_valid_)
      @assertEqual(2022, date%year_)
      @assertEqual(7, date%month_)
      @assertEqual(7, date%day_)

      date = parse_date('20220707', DATE_DELIMITER)
      @assertTrue(date%is_valid_)
      @assertEqual(2022, date%year_)
      @assertEqual(7, date%month_)
      @assertEqual(7, date%day_)
   end subroutine test_parse_date