1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 18:32:54 +08:00
osu-lazer/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 12:36:55 +08: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 23:10:05 +08:00
using osu.Framework.Utils;
2020-03-03 12:36:55 +08:00
using osu.Game.Rulesets.Osu.Mods;
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public class TestSceneOsuModDoubleTime : OsuModTestScene
2020-03-03 12:36:55 +08:00
{
[TestCase(0.5)]
[TestCase(1.01)]
[TestCase(1.5)]
[TestCase(2)]
[TestCase(5)]
2020-03-05 23:10:05 +08:00
public void TestSpeedChangeCustomisation(double rate)
2020-03-03 12:36:55 +08:00
{
2020-03-05 23:10:05 +08:00
var mod = new OsuModDoubleTime { SpeedChange = { Value = rate } };
2020-03-03 12:36:55 +08:00
2020-03-05 23:10:05 +08:00
CreateModTest(new ModTestData
2020-03-03 12:36:55 +08:00
{
2020-03-05 23:10:05 +08:00
Mod = mod,
PassCondition = () => Player.ScoreProcessor.JudgedHits >= 2 &&
Precision.AlmostEquals(Player.GameplayClockContainer.GameplayClock.Rate, mod.SpeedChange.Value)
});
2020-03-03 12:36:55 +08:00
}
}
}