mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 21:27:54 +08:00
Improve test case.
This commit is contained in:
parent
98544a8077
commit
627114abec
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
@ -22,14 +23,16 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
Add(progress = new SongProgress
|
Add(progress = new SongProgress
|
||||||
{
|
{
|
||||||
|
AudioClock = new StopwatchClock(true),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("Toggle Bar", progress.ToggleBar);
|
AddStep("Toggle Bar", progress.ToggleBar);
|
||||||
AddWaitStep(5);
|
AddWaitStep(5);
|
||||||
//AddStep("Toggle Bar", progress.ToggleVisibility);
|
AddStep("Toggle Bar", progress.ToggleBar);
|
||||||
//AddStep("New Values", displayNewValues);
|
AddWaitStep(2);
|
||||||
|
AddRepeatStep("New Values", displayNewValues, 5);
|
||||||
|
|
||||||
displayNewValues();
|
displayNewValues();
|
||||||
}
|
}
|
||||||
@ -37,7 +40,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
private void displayNewValues()
|
private void displayNewValues()
|
||||||
{
|
{
|
||||||
List<HitObject> objects = new List<HitObject>();
|
List<HitObject> objects = new List<HitObject>();
|
||||||
for (double i = 0; i < 2000; i += RNG.NextDouble() * 10 + i / 1000)
|
for (double i = 0; i < 5000; i += RNG.NextDouble() * 10 + i / 1000)
|
||||||
objects.Add(new HitObject { StartTime = i });
|
objects.Add(new HitObject { StartTime = i });
|
||||||
|
|
||||||
progress.Objects = objects;
|
progress.Objects = objects;
|
||||||
|
Loading…
Reference in New Issue
Block a user