@@ -294,7 +294,7 @@ end subroutine teardown_alarm_fixture
294294 !> Timeline:
295295 !> A ---------------- B ----- C ---------------- D --------- E
296296 !>
297- !> The test covers 18 cases, including behavior:
297+ !> The test covers 17 cases, including behavior:
298298 !> - Before anchor (A - > B)
299299 !> - Between anchor and window start (B - > C)
300300 !> - At window boundaries (C, D)
@@ -303,11 +303,9 @@ end subroutine teardown_alarm_fixture
303303 !> - After reset operations at various points
304304 !> - With anchor times shifted into the window
305305 !> - When the clock direction changes (forward/ backward)
306- !> - When the window start time is after the stop time (invalid)
307- !> - When the window start time equals the stop time (valid)
308306 !>
309- !> Each case checks whether the alarm rings at the correct times and
310- !> uses mpas_log_write to log PASS / FAIL outcomes .
307+ !> Each case verifies that the alarm rings at the correct times and
308+ !> logs only failures using mpas_log_write .
311309 !-----------------------------------------------------------------------
312310 subroutine test_window_alarm (case_idx , ierr )
313311 implicit none
@@ -526,32 +524,6 @@ subroutine test_window_alarm(case_idx, ierr)
526524 ringing = mpas_is_alarm_ringing(f%clock, f%alarm_id)
527525 call assert_false(ringing, ' Alarm is ringing outside of window after direction change' , local_ierr)
528526 ierr = ierr + local_ierr
529-
530- !-----------------------------------------------------------------------
531- ! Case 18 : Invalid window ordering test
532- !>
533- !> This test verifies that mpas_add_clock_alarm correctly handles
534- !> window time validation:
535- !> 1 . It must reject alarms where the start time occurs after the stop time.
536- !> 2 . It must allow alarms where the start time equals the stop time.
537- !-----------------------------------------------------------------------
538- case(18 )
539- ! Start time after stop time rejected
540- call mpas_remove_clock_alarm(f%clock, f%alarm_id)
541- call mpas_add_clock_alarm(f%clock, f%alarm_id, f%alarm_time, &
542- alarmTimeInterval = f%alarm_interval, &
543- alarmStartTime = f%window_stop_time, &
544- alarmStopTime = f%window_start_time, ierr= local_ierr)
545- call assert_true(local_ierr /= 0 , ' Alarm with start time after stop time did not return error' , local_ierr)
546- ierr = ierr + local_ierr
547-
548- call mpas_remove_clock_alarm(f%clock, f%alarm_id)
549- call mpas_add_clock_alarm(f%clock, f%alarm_id, f%alarm_time, &
550- alarmTimeInterval = f%alarm_interval, &
551- alarmStartTime = f%window_start_time, &
552- alarmStopTime = f%window_start_time, ierr= local_ierr)
553- call assert_false(local_ierr /= 0 , ' Alarm with equal start/stop times incorrectly returned error' , local_ierr)
554- ierr = ierr + local_ierr
555527 end select
556528
557529 call teardown_alarm_fixture(f)
@@ -572,8 +544,8 @@ integer function mpas_window_alarm_tests() result(ierr)
572544 integer :: i, ierr_local
573545
574546 ierr = 0
575- call mpas_log_write(' Running 18 window alarm tests' )
576- do i = 1 , 18
547+ call mpas_log_write(' Running 17 window alarm tests' )
548+ do i = 1 , 17
577549 ierr_local = 0
578550 call test_window_alarm(i, ierr_local)
579551 ierr = ierr + ierr_local
0 commit comments