From 4d64b779ee2aac216b5d2b547b23888a5af529ec Mon Sep 17 00:00:00 2001 From: Dmitriy Khmaladze Date: Sun, 9 Jun 2024 23:11:50 -0400 Subject: [PATCH] #915 wip --- src/Azos/Time/HourList.cs | 2 +- .../Azos.Tests.Nub/Time/HourListSpanTests.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Azos/Time/HourList.cs b/src/Azos/Time/HourList.cs index c2ae225a6..08b8527d9 100644 --- a/src/Azos/Time/HourList.cs +++ b/src/Azos/Time/HourList.cs @@ -179,7 +179,7 @@ public bool CoversAnother(Span other) return (new Span(other.FinishMinute + 1, this.FinishMinute - other.FinishMinute), default); //at right - return (new Span(this.StartMinute, other.StartMinute - this.StartMinute + 1), default); + return (new Span(this.StartMinute, other.StartMinute - this.StartMinute), default); } } diff --git a/src/testing/Azos.Tests.Nub/Time/HourListSpanTests.cs b/src/testing/Azos.Tests.Nub/Time/HourListSpanTests.cs index 568ed7b9a..a923aac58 100644 --- a/src/testing/Azos.Tests.Nub/Time/HourListSpanTests.cs +++ b/src/testing/Azos.Tests.Nub/Time/HourListSpanTests.cs @@ -220,5 +220,23 @@ public void Exclude02() Aver.AreEqual(new HLS(), b); } + [Run] + public void Exclude03() + { + var (a, b) = new HLS(0, 10).Exclude(new HLS(3, 2)); + Aver.AreEqual(new HLS(0, 3), a); + Aver.AreEqual(new HLS(5, 5), b); + } + + [Run] + public void Exclude04() + { + var (a, b) = new HLS(0, 10).Exclude(new HLS(3, 50)); + // a.See(); + // b.See(); + Aver.AreEqual(new HLS(0, 3), a); + Aver.AreEqual(new HLS(), b); + } + } }