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
|
|
|
|
{
|
2020-06-03 20:23:56 +00:00
|
|
|
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 &&
|
2022-08-15 08:06:24 +00:00
|
|
|
Precision.AlmostEquals(Player.GameplayClockContainer.Rate, mod.SpeedChange.Value)
|
2020-03-05 15:10:05 +00:00
|
|
|
});
|
2020-03-03 04:36:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|