1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Add test coverage

This commit is contained in:
Salman Ahmed 2023-12-31 05:18:10 +03:00
parent 4dc11c4c48
commit cd9250d08c

View File

@ -310,6 +310,13 @@ namespace osu.Game.Tests.Mods
Assert.That(invalid?.Select(t => t.GetType()), Is.EquivalentTo(expectedInvalid));
}
[Test]
public void TestFormatScoreMultiplier()
{
Assert.AreEqual(ModUtils.FormatScoreMultiplier(0.9999).ToString(), "0.99x");
Assert.AreEqual(ModUtils.FormatScoreMultiplier(1.0001).ToString(), "1.01x");
}
public abstract class CustomMod1 : Mod, IModCompatibilitySpecification
{
}
@ -339,6 +346,16 @@ namespace osu.Game.Tests.Mods
public override bool ValidForMultiplayerAsFreeMod => false;
}
public class EditableMod : Mod
{
public override string Name => string.Empty;
public override LocalisableString Description => string.Empty;
public override string Acronym => string.Empty;
public override double ScoreMultiplier => Multiplier;
public double Multiplier = 1;
}
public interface IModCompatibilitySpecification
{
}