mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 07:42:54 +08:00
Add test steps demonstrating failure case
This commit is contained in:
parent
a258059d43
commit
3fac9baa9f
@ -175,6 +175,20 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
increaseModSpeed();
|
||||
AddAssert("adaptive speed still active", () => songSelect!.Mods.Value.First() is ModAdaptiveSpeed);
|
||||
|
||||
OsuModDoubleTime dtWithAdjustPitch = new OsuModDoubleTime
|
||||
{
|
||||
SpeedChange = { Value = 1.05 },
|
||||
AdjustPitch = { Value = true },
|
||||
};
|
||||
changeMods(dtWithAdjustPitch);
|
||||
|
||||
decreaseModSpeed();
|
||||
AddAssert("no mods selected", () => songSelect!.Mods.Value.Count == 0);
|
||||
|
||||
decreaseModSpeed();
|
||||
AddAssert("half time activated at 0.95x", () => songSelect!.Mods.Value.OfType<ModHalfTime>().Single().SpeedChange.Value, () => Is.EqualTo(0.95).Within(0.005));
|
||||
AddAssert("half time has adjust pitch active", () => songSelect!.Mods.Value.OfType<ModHalfTime>().Single().AdjustPitch.Value, () => Is.True);
|
||||
|
||||
void increaseModSpeed() => AddStep("increase mod speed", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
|
Loading…
Reference in New Issue
Block a user