mirror of https://github.com/ppy/osu
Move simulated drain to separate test case
Having it on at all times was causing other tests to fail.
This commit is contained in:
parent
5d6f767dbd
commit
861080d3ae
|
@ -7,6 +7,7 @@
|
|||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
|
@ -160,10 +161,14 @@ private void applyPerfectHit()
|
|||
});
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
[Test]
|
||||
public void TestSimulateDrain()
|
||||
{
|
||||
base.Update();
|
||||
healthProcessor.Health.Value -= 0.0001f * Time.Elapsed;
|
||||
ScheduledDelegate del = null!;
|
||||
|
||||
AddStep("simulate drain", () => del = Scheduler.AddDelayed(() => healthProcessor.Health.Value -= 0.00025f * Time.Elapsed, 0, true));
|
||||
AddUntilStep("wait until zero", () => healthProcessor.Health.Value == 0);
|
||||
AddStep("cancel drain", () => del.Cancel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue