Skip to content

Commit

Permalink
#915 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zhabis committed Jun 10, 2024
1 parent 224902b commit 4d64b77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Azos/Time/HourList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
18 changes: 18 additions & 0 deletions src/testing/Azos.Tests.Nub/Time/HourListSpanTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
}

0 comments on commit 4d64b77

Please sign in to comment.