1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

simplify helper methods

This commit is contained in:
Nitrous 2022-07-28 15:19:35 +08:00
parent db62d4be3a
commit 70ed347b06
No known key found for this signature in database
GPG Key ID: 85EC4A6AE8F69D64

View File

@ -38,12 +38,12 @@ namespace osu.Game.Tests.Visual.Gameplay
public void SetupSteps()
{
AddStep("reset clock", () => gameplayClockContainer.Reset(false));
AddStep("set hit objects", setHitObjects);
}
[Test]
public void TestDisplay()
{
AddStep("display max values", displayMaxValues);
AddStep("seek to intro", () => gameplayClockContainer.Seek(gameplay_start_time));
AddStep("start", gameplayClockContainer.Start);
AddStep("stop", gameplayClockContainer.Stop);
@ -59,17 +59,12 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("show graph", () => progress.ShowGraph.Value = true);
}
private void displayMaxValues()
private void setHitObjects()
{
var objects = new List<HitObject>();
for (double i = 0; i < 5000; i++)
objects.Add(new HitObject { StartTime = i });
setObjects(objects);
}
private void setObjects(List<HitObject> objects)
{
this.ChildrenOfType<SongProgress>().ForEach(progress => progress.Objects = objects);
}