Skip to content

Commit

Permalink
Make remains of TestSceneModSettings non-visual
Browse files Browse the repository at this point in the history
As they're not really testing anything visual.
  • Loading branch information
bdach committed May 10, 2022
1 parent 33634cb commit c4c7556
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 49 deletions.
36 changes: 36 additions & 0 deletions osu.Game.Tests/Mods/ModSettingsTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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.

using NUnit.Framework;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Mods;

namespace osu.Game.Tests.Mods
{
public class ModSettingsTest
{
[Test]
public void TestModSettingsUnboundWhenCopied()
{
var original = new OsuModDoubleTime();
var copy = (OsuModDoubleTime)original.DeepClone();

original.SpeedChange.Value = 2;

Assert.That(original.SpeedChange.Value, Is.EqualTo(2.0));
Assert.That(copy.SpeedChange.Value, Is.EqualTo(1.5));
}

[Test]
public void TestMultiModSettingsUnboundWhenCopied()
{
var original = new MultiMod(new OsuModDoubleTime());
var copy = (MultiMod)original.DeepClone();

((OsuModDoubleTime)original.Mods[0]).SpeedChange.Value = 2;

Assert.That(((OsuModDoubleTime)original.Mods[0]).SpeedChange.Value, Is.EqualTo(2.0));
Assert.That(((OsuModDoubleTime)copy.Mods[0]).SpeedChange.Value, Is.EqualTo(1.5));
}
}
}
49 changes: 0 additions & 49 deletions osu.Game.Tests/Visual/UserInterface/TestSceneModSettings.cs

This file was deleted.

0 comments on commit c4c7556

Please sign in to comment.