mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
re-order tests again
This commit is contained in:
parent
837b4f4f6c
commit
d413d1ef1b
@ -61,33 +61,6 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
private const double time_during_slide_3 = 3500;
|
||||
private const double time_during_slide_4 = 4000;
|
||||
|
||||
/// <summary>
|
||||
/// Scenario:
|
||||
/// - Press a key before a slider starts
|
||||
/// - Press the other key on the slider head timed correctly while holding the original key
|
||||
/// - Release the latter pressed key
|
||||
/// Expected Result:
|
||||
/// A passing test case will have the cursor lose tracking on replay frame 3.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLeftBeforeSliderThenRight()
|
||||
{
|
||||
AddStep("Invalid key transfer test", () =>
|
||||
{
|
||||
var frames = new List<ReplayFrame>
|
||||
{
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton }, Time = time_before_slider },
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start },
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton }, Time = time_during_slide_1 },
|
||||
};
|
||||
|
||||
performTest(frames);
|
||||
});
|
||||
|
||||
AddUntilStep(() => allJudgedFired, "Wait for test 2");
|
||||
AddAssert("Tracking lost", assertMehJudge);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scenario:
|
||||
/// - Press a key on the slider head timed correctly
|
||||
@ -115,6 +88,33 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
AddAssert("Tracking retained", assertGreatJudge);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scenario:
|
||||
/// - Press a key before a slider starts
|
||||
/// - Press the other key on the slider head timed correctly while holding the original key
|
||||
/// - Release the latter pressed key
|
||||
/// Expected Result:
|
||||
/// A passing test case will have the cursor lose tracking on replay frame 3.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLeftBeforeSliderThenRight()
|
||||
{
|
||||
AddStep("Invalid key transfer test", () =>
|
||||
{
|
||||
var frames = new List<ReplayFrame>
|
||||
{
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton }, Time = time_before_slider },
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start },
|
||||
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton }, Time = time_during_slide_1 },
|
||||
};
|
||||
|
||||
performTest(frames);
|
||||
});
|
||||
|
||||
AddUntilStep(() => allJudgedFired, "Wait for test 2");
|
||||
AddAssert("Tracking lost", assertMehJudge);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scenario:
|
||||
/// - Press a key on the slider head timed correctly
|
||||
@ -410,7 +410,6 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
LoadComponentAsync(player, p =>
|
||||
{
|
||||
Child = p;
|
||||
|
||||
p.ScoreProcessor.NewJudgement += result => judgementResults.Add(result);
|
||||
p.ScoreProcessor.AllJudged += () => { allJudgedFired = true; };
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user