osu/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModDoubleTime.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
946 B
C#
Raw Normal View History

2020-03-03 04:36:55 +00:00
// 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;
2020-03-05 15:10:05 +00:00
using osu.Framework.Utils;
2020-03-03 04:36:55 +00:00
using osu.Game.Rulesets.Osu.Mods;
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public class TestSceneOsuModDoubleTime : OsuModTestScene
2020-03-03 04:36:55 +00:00
{
[TestCase(0.5)]
[TestCase(1.01)]
[TestCase(1.5)]
[TestCase(2)]
[TestCase(5)]
2020-03-05 15:10:05 +00:00
public void TestSpeedChangeCustomisation(double rate)
2020-03-03 04:36:55 +00:00
{
2020-03-05 15:10:05 +00:00
var mod = new OsuModDoubleTime { SpeedChange = { Value = rate } };
2020-03-03 04:36:55 +00:00
2020-03-05 15:10:05 +00:00
CreateModTest(new ModTestData
2020-03-03 04:36:55 +00:00
{
2020-03-05 15:10:05 +00:00
Mod = mod,
PassCondition = () => Player.ScoreProcessor.JudgedHits >= 2 &&
Precision.AlmostEquals(Player.GameplayClockContainer.GameplayClock.Rate, mod.SpeedChange.Value)
});
2020-03-03 04:36:55 +00:00
}
}
}