1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Improve test scene

This commit is contained in:
smoogipoo 2020-06-16 17:49:37 +09:00
parent a2ddb4edb4
commit 808e216059
2 changed files with 14 additions and 3 deletions

View File

@ -1,8 +1,10 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using NUnit.Framework; using NUnit.Framework;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Scoring; using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Statistics; using osu.Game.Screens.Ranking.Statistics;
@ -13,7 +15,16 @@ namespace osu.Game.Tests.Visual.Ranking
[Test] [Test]
public void TestScore() public void TestScore()
{ {
loadPanel(new TestScoreInfo(new OsuRuleset().RulesetInfo)); var score = new TestScoreInfo(new OsuRuleset().RulesetInfo)
{
ExtraStatistics =
{
["timing_distribution"] = TestSceneTimingDistributionGraph.CreateNormalDistribution(),
["hit_offsets"] = new List<HitOffset>()
}
};
loadPanel(score);
} }
private void loadPanel(ScoreInfo score) => AddStep("load panel", () => private void loadPanel(ScoreInfo score) => AddStep("load panel", () =>

View File

@ -22,7 +22,7 @@ namespace osu.Game.Tests.Visual.Ranking
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("#333") Colour = Color4Extensions.FromHex("#333")
}, },
new TimingDistributionGraph(createNormalDistribution()) new TimingDistributionGraph(CreateNormalDistribution())
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.Ranking
}; };
} }
private TimingDistribution createNormalDistribution() public static TimingDistribution CreateNormalDistribution()
{ {
var distribution = new TimingDistribution(51, 5); var distribution = new TimingDistribution(51, 5);