mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:43:22 +08:00
Add coverage for empty metrics case
This commit is contained in:
parent
29b4d98aac
commit
dbf90551d6
@ -88,6 +88,18 @@ namespace osu.Game.Tests.Visual.Online
|
||||
() => successRate.ChildrenOfType<BarGraph>().All(graph => graph.MaxValue == 100));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestEmptyMetrics()
|
||||
{
|
||||
AddStep("set beatmap", () => successRate.Beatmap = new BeatmapInfo
|
||||
{
|
||||
Metrics = new BeatmapMetrics()
|
||||
});
|
||||
|
||||
AddAssert("graph max values correct",
|
||||
() => successRate.ChildrenOfType<BarGraph>().All(graph => graph.MaxValue == 0));
|
||||
}
|
||||
|
||||
private class GraphExposingSuccessRate : SuccessRate
|
||||
{
|
||||
public new FailRetryGraph Graph => base.Graph;
|
||||
|
Loading…
Reference in New Issue
Block a user