2022-09-10 05:13:19 +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.
|
|
|
|
|
2022-09-16 19:45:18 +08:00
|
|
|
using System.Collections.Generic;
|
2022-09-10 05:13:19 +08:00
|
|
|
using NUnit.Framework;
|
2022-09-16 19:45:18 +08:00
|
|
|
using osu.Game.Rulesets.Mods;
|
2022-09-10 05:13:19 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Mods;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Tests.Mods
|
|
|
|
{
|
|
|
|
public class TestSceneOsuModFreezeFrame : OsuModTestScene
|
|
|
|
{
|
2022-09-16 19:45:18 +08:00
|
|
|
[TestCase(OsuModFreezeFrame.BeatDivisor.Quarter_Measure)]
|
|
|
|
[TestCase(OsuModFreezeFrame.BeatDivisor.Single_Measure)]
|
|
|
|
[TestCase(OsuModFreezeFrame.BeatDivisor.Quadruple_Measure)]
|
|
|
|
public void TestFreezeFrequency(OsuModFreezeFrame.BeatDivisor divisor)
|
2022-09-10 05:13:19 +08:00
|
|
|
{
|
|
|
|
CreateModTest(new ModTestData
|
|
|
|
{
|
2022-09-16 19:45:18 +08:00
|
|
|
Mod = new OsuModFreezeFrame { Divisor = { Value = divisor } },
|
|
|
|
PassCondition = checkSomeHit,
|
2022-09-10 05:13:19 +08:00
|
|
|
Autoplay = true
|
|
|
|
});
|
|
|
|
}
|
2022-09-16 19:45:18 +08:00
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestWithHidden()
|
|
|
|
{
|
|
|
|
var mods = new List<Mod> { new OsuModHidden(), new OsuModFreezeFrame { Divisor = { Value = OsuModFreezeFrame.BeatDivisor.Quadruple_Measure } } };
|
|
|
|
CreateModTest(new ModTestData
|
|
|
|
{
|
|
|
|
Mods = mods,
|
|
|
|
PassCondition = checkSomeHit,
|
|
|
|
Autoplay = true
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private bool checkSomeHit() => Player.ScoreProcessor.JudgedHits >= 8;
|
2022-09-10 05:13:19 +08:00
|
|
|
}
|
|
|
|
}
|