1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

change method of finding incompatibleMod

This commit is contained in:
tsunyoku 2022-07-17 22:10:35 +01:00
parent dcce14ae8f
commit 0c50931d2f

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
@ -37,8 +36,8 @@ namespace osu.Game.Tests.Visual.Gameplay
foreach (var incompatibleModType in modIncompatibilities)
{
var incompatibleMod = (Mod)Activator.CreateInstance(incompatibleModType);
Assert.That(incompatibleMod?.IncompatibleMods.Contains(mod.GetType()) ?? false);
var incompatibleMod = modInstances.First(m => m.GetType().IsInstanceOfType(incompatibleModType));
Assert.That(incompatibleMod.IncompatibleMods.Contains(mod.GetType()));
}
}
});