1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Add failing test coverage of duplicates in judgement counter display

This commit is contained in:
Dean Herbert 2024-01-15 16:01:34 +09:00
parent 0f521d6daf
commit 2d5a39b234
No known key found for this signature in database

View File

@ -147,6 +147,16 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("Assert max judgement hidden", () => counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
}
[Test]
public void TestNoDuplicates()
{
AddStep("create counter", () => Child = counterDisplay = new TestJudgementCounterDisplay());
AddStep("Show all judgements", () => counterDisplay.Mode.Value = JudgementCounterDisplay.DisplayMode.All);
AddAssert("Check no duplicates",
() => counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().Count(),
() => Is.EqualTo(counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().Select(c => c.ResultName.Text).Distinct().Count()));
}
[Test]
public void TestCycleDisplayModes()
{