mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Add failing test coverage of duplicates in judgement counter display
This commit is contained in:
parent
0f521d6daf
commit
2d5a39b234
@ -147,6 +147,16 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddAssert("Assert max judgement hidden", () => counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
|
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]
|
[Test]
|
||||||
public void TestCycleDisplayModes()
|
public void TestCycleDisplayModes()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user