1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Update slider sample source asserts to match expected behaviour

As pointed out in review, if the current time is after the end of the
slider, the correct hit object to use for sample retrieval is the object
itself, not any nested object.
This commit is contained in:
Dean Herbert 2023-02-21 14:04:37 +09:00
parent e686b4393e
commit 9321ec29dc

View File

@ -155,7 +155,7 @@ namespace osu.Game.Tests.Visual.Gameplay
// This is because the (parent) object will only play its sample at the final EndTime.
AddAssert("check valid object is slider's first nested", () => sampleTriggerSource.GetMostValidObject(), () => Is.EqualTo(beatmap.HitObjects[4].NestedHitObjects.First()));
AddStep("seek to just after slider", () => Beatmap.Value.Track.Seek(beatmap.HitObjects[4].GetEndTime() + 100));
AddStep("seek to just before slider ends", () => Beatmap.Value.Track.Seek(beatmap.HitObjects[4].GetEndTime() - 100));
waitForCatchUp();
AddUntilStep("wait until valid object is slider's last nested", () => sampleTriggerSource.GetMostValidObject(), () => Is.EqualTo(beatmap.HitObjects[4].NestedHitObjects.Last()));