@@ -3916,22 +3916,35 @@ public void TestDtStartTimezone(string? tzId)
39163916 Assert . That ( expectedStartTimes . SequenceEqual ( occurrencesStartTimes ) , Is . True ) ;
39173917 }
39183918
3919- [ Test ]
3920- [ TestCase ( null , false ) ]
3921- [ TestCase ( 0 , true ) ]
3922- [ TestCase ( 1000 , true ) ]
3923- [ TestCase ( 1440 , false ) ]
3924- public void TestMaxIncrementCount ( int ? limit , bool expectException )
3925- {
3926- var ical = """
3919+ // Between 00:59 and 00:00 there's a gap of 1380 minutes, which is 690 increments.
3920+ private const string TestMaxIncrementCountWithGaps = """
39273921 BEGIN:VCALENDAR
39283922 BEGIN:VEVENT
39293923 DTSTART:20250305T000000
3930- RRULE:FREQ=MINUTELY;BYHOUR=0;COUNT=100
3924+ RRULE:FREQ=MINUTELY;INTERVAL=2; BYHOUR=0;COUNT=100
39313925 END:VEVENT
39323926 END:VCALENDAR
39333927 """ ;
39343928
3929+ private const string TestMaxIncrementCountWithoutGaps = """
3930+ BEGIN:VCALENDAR
3931+ BEGIN:VEVENT
3932+ DTSTART:20250305T000000
3933+ RRULE:FREQ=DAILY;INTERVAL=10;COUNT=100
3934+ END:VEVENT
3935+ END:VCALENDAR
3936+ """ ;
3937+
3938+ [ Test ]
3939+ [ TestCase ( null , TestMaxIncrementCountWithGaps , false ) ]
3940+ [ TestCase ( 0 , TestMaxIncrementCountWithGaps , true ) ]
3941+ [ TestCase ( 1 , TestMaxIncrementCountWithGaps , true ) ]
3942+ [ TestCase ( 689 , TestMaxIncrementCountWithGaps , true ) ]
3943+ [ TestCase ( 690 , TestMaxIncrementCountWithGaps , false ) ]
3944+ [ TestCase ( 0 , TestMaxIncrementCountWithoutGaps , false ) ]
3945+ [ TestCase ( 1 , TestMaxIncrementCountWithoutGaps , false ) ]
3946+ public void TestMaxIncrementCount ( int ? limit , string ical , bool expectException )
3947+ {
39353948 var cal = Calendar . Load ( ical ) ;
39363949
39373950 var options = new EvaluationOptions
0 commit comments