mirror of
https://github.com/ppy/osu
synced 2025-03-11 05:49:12 +00:00
Add failing test case
This commit is contained in:
parent
a1a1885a97
commit
50d5b020b7
@ -7,8 +7,10 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.BeatmapSet;
|
||||
using osu.Game.Screens.Select.Details;
|
||||
@ -72,6 +74,20 @@ namespace osu.Game.Tests.Visual.Online
|
||||
};
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOnlyFailMetrics()
|
||||
{
|
||||
AddStep("set beatmap", () => successRate.Beatmap = new BeatmapInfo
|
||||
{
|
||||
Metrics = new BeatmapMetrics
|
||||
{
|
||||
Fails = Enumerable.Range(1, 100).ToArray(),
|
||||
}
|
||||
});
|
||||
AddAssert("graph max values correct",
|
||||
() => successRate.ChildrenOfType<BarGraph>().All(graph => graph.MaxValue == 100));
|
||||
}
|
||||
|
||||
private class GraphExposingSuccessRate : SuccessRate
|
||||
{
|
||||
public new FailRetryGraph Graph => base.Graph;
|
||||
|
Loading…
Reference in New Issue
Block a user