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

Add failing test

This commit is contained in:
Dan Balasescu 2022-02-24 17:01:04 +09:00
parent 99045c6ac8
commit 328166f0d5

View File

@ -121,6 +121,17 @@ namespace osu.Game.Tests.Online
Assert.That((deserialised?.Mods[0])?.Settings["speed_change"], Is.EqualTo(2));
}
[Test]
public void TestAPIModDetachedFromSource()
{
var mod = new OsuModDoubleTime { SpeedChange = { Value = 1.01 } };
var apiMod = new APIMod(mod);
mod.SpeedChange.Value = 1.5;
Assert.That(apiMod.Settings["speed_change"], Is.EqualTo(1.01d));
}
private class TestRuleset : Ruleset
{
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[]