mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 06:12:55 +08:00
Re-order tests
This commit is contained in:
parent
1fdb8ca37a
commit
8b7cc2eaa2
@ -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 1");
|
||||
AddAssert("Tracking lost", assertMehJudge);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scenario:
|
||||
/// - Press a key on the slider head timed correctly
|
||||
@ -111,10 +84,37 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
performTest(frames);
|
||||
});
|
||||
|
||||
AddUntilStep(() => allJudgedFired, "Wait for test 2");
|
||||
AddUntilStep(() => allJudgedFired, "Wait for test 1");
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user