mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00: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.Objects.Types;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Storyboards;
|
using osu.Game.Storyboards;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -62,25 +63,30 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
{
|
{
|
||||||
new HitCircle
|
new HitCircle
|
||||||
{
|
{
|
||||||
|
HitWindows = new HitWindows(),
|
||||||
StartTime = t += spacing,
|
StartTime = t += spacing,
|
||||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL) }
|
||||||
},
|
},
|
||||||
new HitCircle
|
new HitCircle
|
||||||
{
|
{
|
||||||
|
HitWindows = new HitWindows(),
|
||||||
StartTime = t += spacing,
|
StartTime = t += spacing,
|
||||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_WHISTLE) }
|
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_WHISTLE) }
|
||||||
},
|
},
|
||||||
new HitCircle
|
new HitCircle
|
||||||
{
|
{
|
||||||
|
HitWindows = new HitWindows(),
|
||||||
StartTime = t += spacing,
|
StartTime = t += spacing,
|
||||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, HitSampleInfo.BANK_SOFT) },
|
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_NORMAL, HitSampleInfo.BANK_SOFT) },
|
||||||
},
|
},
|
||||||
new HitCircle
|
new HitCircle
|
||||||
{
|
{
|
||||||
|
HitWindows = new HitWindows(),
|
||||||
StartTime = t += spacing,
|
StartTime = t += spacing,
|
||||||
},
|
},
|
||||||
new Slider
|
new Slider
|
||||||
{
|
{
|
||||||
|
HitWindows = new HitWindows(),
|
||||||
StartTime = t += spacing,
|
StartTime = t += spacing,
|
||||||
Path = new SliderPath(PathType.Linear, new[] { Vector2.Zero, Vector2.UnitY * 200 }),
|
Path = new SliderPath(PathType.Linear, new[] { Vector2.Zero, Vector2.UnitY * 200 }),
|
||||||
Samples = new[] { new HitSampleInfo(HitSampleInfo.HIT_WHISTLE, HitSampleInfo.BANK_SOFT) },
|
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);
|
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.
|
// Still object 1 as it's not hit yet.
|
||||||
seekBeforeIndex(1);
|
seekBeforeIndex(1);
|
||||||
@ -168,9 +179,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
checkValidObjectIndex(4);
|
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();
|
waitForCatchUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user