Skip to content

Commit

Permalink
Add test coverage ensuring unique acronyms
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jul 16, 2022
1 parent 5df9f06 commit acd5254
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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.

#nullable disable
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;

namespace osu.Game.Tests.Visual.Gameplay
{
[HeadlessTest]
public class TestSceneNoConflictingModAcronyms : TestSceneAllRulesetPlayers
{
protected override void AddCheckSteps()
{
AddStep("Check all mod acronyms are unique", () =>
{
var mods = Ruleset.Value.CreateInstance().AllMods;

IEnumerable<string> acronyms = mods.Select(m => m.Acronym);

Assert.That(acronyms, Is.Unique);
});
}
}
}

0 comments on commit acd5254

Please sign in to comment.