mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
Use regular test steps rather than one-time set up and scheduling
This commit is contained in:
parent
d9605e8070
commit
3575d9847c
@ -12,12 +12,12 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
{
|
{
|
||||||
public class TestSceneStarRatingDisplay : OsuTestScene
|
public class TestSceneStarRatingDisplay : OsuTestScene
|
||||||
{
|
{
|
||||||
[SetUp]
|
[Test]
|
||||||
public void SetUp() => Schedule(() =>
|
public void TestDisplay()
|
||||||
{
|
{
|
||||||
StarRatingDisplay changingStarRating;
|
StarRatingDisplay changingStarRating = null;
|
||||||
|
|
||||||
Child = new FillFlowContainer
|
AddStep("load displays", () => Child = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -32,12 +32,12 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
new StarRatingDisplay(new StarDifficulty(10.11, 0)),
|
new StarRatingDisplay(new StarDifficulty(10.11, 0)),
|
||||||
changingStarRating = new StarRatingDisplay(),
|
changingStarRating = new StarRatingDisplay(),
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
Scheduler.AddDelayed(() =>
|
AddRepeatStep("change bottom rating", () =>
|
||||||
{
|
{
|
||||||
changingStarRating.Current.Value = new StarDifficulty(RNG.NextDouble(0, 10), RNG.Next());
|
changingStarRating.Current.Value = new StarDifficulty(RNG.NextDouble(0, 10), RNG.Next());
|
||||||
}, 500, true);
|
}, 10);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user