1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Explain why segment end positions are not recovered in test

This commit is contained in:
Bartłomiej Dach 2023-08-21 08:27:08 +02:00
parent dd1ac461db
commit 479c463751
No known key found for this signature in database

View File

@ -207,6 +207,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("shorten last segment", () => path.ExpectedDistance.Value = 150);
AddAssert("segment ends are correct", () => path.GetSegmentEnds(), () => Is.EqualTo(distances.Select(d => d / 150)));
// see remarks in `GetSegmentEnds()` xmldoc (`SliderPath.PositionAt()` clamps progress to [0,1]).
AddAssert("segment end positions not recovered", () => path.GetSegmentEnds().Select(p => path.PositionAt(p)), () => Is.EqualTo(new[]
{
positions[1],