You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LocalDateRange's day-before-max infinity rule is untested, and a minimum end counts as infinity #257
LocalDateRange's "day before the maximum stands for infinity" rule (#224, PR #238) has no test. Seeding end >= LocalDate.MaxIsoValue.PlusDays(-1) → end >= LocalDate.MaxIsoValue in LocalDateRange.EndIsInfinity passes every suite: unit, NodaTime, conventions, EF, EF-Noda and the full live integration suite. The live NodaTime test uses an inclusive infinity] literal. The same seed on DateRange is caught. Found by the final pre-release analysis on add665c (pass A).
Also in the same function (DateRange.cs:502, LocalDateRange.cs:568): an upper end at the minimum date counts as infinity.DateRange [0001-01-01,0001-01-01].Shift(5) and LocalDateRange [MinIso,MinIso].Shift(5) come back unchanged. In PostgreSQL that range is [-infinity,0001-01-02), whose upper bound is finite. A closed end's exclusive form is the day after it, so the end == MinValue arm is wrong.
Change
Drop the minimum from the end-is-infinity test (an end is infinite only at the day before the maximum, or the maximum, per the read rule), and pin both sides per infinity-backed type.
Done when
LocalDateRange.CreateFinite(x, LocalDate.MaxIsoValue.PlusDays(-1)).Shift(Period.FromDays(-1)) keeps its end. [Min,Min].Shift(5) moves for DateRange and LocalDateRange. Both fail with the respective seed.
Activity