1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 17:13:07 +08:00
osu-lazer/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModDoubleTime.cs

36 lines
1.0 KiB
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;
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
2020-03-05 23:10:05 +08:00
public class TestSceneOsuModDoubleTime : ModTestScene
2020-03-03 12:36:55 +08:00
{
public TestSceneOsuModDoubleTime()
: base(new OsuRuleset())
{
}
[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
}
}
}