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