test_construct_datetime_duration Subroutine

public subroutine test_construct_datetime_duration()

Arguments

None

Calls

proc~~test_construct_datetime_duration~~CallsGraph proc~test_construct_datetime_duration test_construct_datetime_duration assertequal assertequal proc~test_construct_datetime_duration->assertequal assertfalse assertfalse proc~test_construct_datetime_duration->assertfalse datetime_duration datetime_duration proc~test_construct_datetime_duration->datetime_duration day_is_set day_is_set proc~test_construct_datetime_duration->day_is_set hour_is_real hour_is_real proc~test_construct_datetime_duration->hour_is_real hour_is_set hour_is_set proc~test_construct_datetime_duration->hour_is_set minute_is_real minute_is_real proc~test_construct_datetime_duration->minute_is_real minute_is_set minute_is_set proc~test_construct_datetime_duration->minute_is_set month_is_set month_is_set proc~test_construct_datetime_duration->month_is_set second_is_real second_is_real proc~test_construct_datetime_duration->second_is_real second_is_set second_is_set proc~test_construct_datetime_duration->second_is_set year_is_set year_is_set proc~test_construct_datetime_duration->year_is_set

Source Code

   subroutine test_construct_datetime_duration()
      integer, parameter :: IEX = UNSET_FIELD
      real(kind=R64), parameter :: REX = real(IEX, kind=R64)
      logical, parameter :: LEX = .FALSE.
      type(datetime_duration) :: d
      d = datetime_duration()
      @assertEqual(IEX, d % year, 'year should be unset')
      @assertEqual(IEX, d % month, 'month should be unset')
      @assertEqual(IEX, d % day, 'day should be unset')
      @assertEqual(IEX, d % hour, 'hour should be unset')
      @assertEqual(IEX, d % minute, 'minute should be unset')
      @assertEqual(IEX, d % second, 'second should be unset')
      @assertEqual(REX, d % hour_real, 'hour_real should be unset')
      @assertEqual(REX, d % minute_real, 'minute_real should be unset')
      @assertEqual(REX, d % second_real, 'second_real should be unset')
      @assertFalse(d % year_is_set(), 'year_is_set should be .FALSE.')
      @assertFalse(d % month_is_set(), 'month_is_set should be .FALSE.')
      @assertFalse(d % day_is_set(), 'hour_is_set should be .FALSE.')
      @assertFalse(d % hour_is_set(), 'hour_is_set should be .FALSE.')
      @assertFalse(d % minute_is_set(), 'minute_is_set should be .FALSE.')
      @assertFalse(d % second_is_set(), 'hour_is_set should be .FALSE.')
      @assertFalse(d % hour_is_real(), 'hour_is_real should be .FALSE.')
      @assertFalse(d % minute_is_real(), 'minute_is_real should be .FALSE.')
      @assertFalse(d % second_is_real(), 'hour_is_real should be .FALSE.')
   end subroutine test_construct_datetime_duration