mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Add failing tests
This commit is contained in:
parent
b9832c1b2d
commit
7c29386717
@ -47,6 +47,29 @@ namespace osu.Game.Tests.Mods
|
||||
Assert.That(ModUtils.CheckCompatibleSet(new[] { mod1.Object, multiMod }), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCompatibleMods()
|
||||
{
|
||||
var mod1 = new Mock<Mod>();
|
||||
var mod2 = new Mock<Mod>();
|
||||
|
||||
// Test both orderings.
|
||||
Assert.That(ModUtils.CheckCompatibleSet(new[] { mod1.Object, mod2.Object }), Is.True);
|
||||
Assert.That(ModUtils.CheckCompatibleSet(new[] { mod2.Object, mod1.Object }), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestIncompatibleThroughBaseType()
|
||||
{
|
||||
var mod1 = new Mock<Mod>();
|
||||
var mod2 = new Mock<Mod>();
|
||||
mod2.Setup(m => m.IncompatibleMods).Returns(new[] { mod1.Object.GetType().BaseType });
|
||||
|
||||
// Test both orderings.
|
||||
Assert.That(ModUtils.CheckCompatibleSet(new[] { mod1.Object, mod2.Object }), Is.False);
|
||||
Assert.That(ModUtils.CheckCompatibleSet(new[] { mod2.Object, mod1.Object }), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAllowedThroughMostDerivedType()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user