mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Update test expectations
This commit is contained in:
parent
04dad6c6e8
commit
92e89c7df7
@ -18,6 +18,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Storyboards;
|
||||
using osuTK;
|
||||
@ -62,25 +63,30 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
new HitCircle
|
||||
{
|
||||
HitWindows = new HitWindows(),
|
||||
StartTime = t += spacing,
|
||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
||||
},
|
||||
new HitCircle
|
||||
{
|
||||
HitWindows = new HitWindows(),
|
||||
StartTime = t += spacing,
|
||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_WHISTLE) }
|
||||
},
|
||||
new HitCircle
|
||||
{
|
||||
HitWindows = new HitWindows(),
|
||||
StartTime = t += spacing,
|
||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, HitSampleInfo.BANK_SOFT) },
|
||||
},
|
||||
new HitCircle
|
||||
{
|
||||
HitWindows = new HitWindows(),
|
||||
StartTime = t += spacing,
|
||||
},
|
||||
new Slider
|
||||
{
|
||||
HitWindows = new HitWindows(),
|
||||
StartTime = t += spacing,
|
||||
Path = new SliderPath(PathType.Linear, new[] { Vector2.Zero, Vector2.UnitY * 200 }),
|
||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_WHISTLE, HitSampleInfo.BANK_SOFT) },
|
||||
@ -131,7 +137,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
AddAssert("first object hit", () => getNextAliveObject()?.Entry?.Result?.HasResult == true);
|
||||
|
||||
checkValidObjectIndex(1);
|
||||
// next object is too far away, so we still use the already hit object.
|
||||
checkValidObjectIndex(0);
|
||||
|
||||
// still too far away.
|
||||
seekBeforeIndex(1, 400);
|
||||
checkValidObjectIndex(0);
|
||||
|
||||
// Still object 1 as it's not hit yet.
|
||||
seekBeforeIndex(1);
|
||||
@ -168,9 +179,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
checkValidObjectIndex(4);
|
||||
}
|
||||
|
||||
private void seekBeforeIndex(int index)
|
||||
private void seekBeforeIndex(int index, double amount = 100)
|
||||
{
|
||||
AddStep($"seek to just before object {index}", () => Player.GameplayClockContainer.Seek(beatmap.HitObjects[index].StartTime - 100));
|
||||
AddStep($"seek to {amount} ms before object {index}", () => Player.GameplayClockContainer.Seek(beatmap.HitObjects[index].StartTime - amount));
|
||||
waitForCatchUp();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user