test_get_year_field Subroutine

public subroutine test_get_year_field()

Arguments

None

Calls

proc~~test_get_year_field~~CallsGraph proc~test_get_year_field test_get_year_field assertequal assertequal proc~test_get_year_field->assertequal asserttrue asserttrue proc~test_get_year_field->asserttrue date_fields date_fields proc~test_get_year_field->date_fields is_valid is_valid proc~test_get_year_field->is_valid year year proc~test_get_year_field->year

Source Code

   subroutine test_get_year_field
      type(date_fields) :: df
      integer :: d = 23, m = 4, y = 2023
      df = date_fields(y, m, d)
      @assertTrue(df % is_valid(), 'Failed to initialize df')
      @assertEqual(y, df % year(), 'Wrong year')
   end subroutine test_get_year_field