1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 03:02:54 +08:00
osu-lazer/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModFreezeFrame.cs

41 lines
1.4 KiB
C#
Raw Normal View History

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.
using System.Collections.Generic;
2022-09-10 05:13:19 +08:00
using NUnit.Framework;
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
{
[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
{
Mod = new OsuModFreezeFrame { Divisor = { Value = divisor } },
PassCondition = checkSomeHit,
2022-09-10 05:13:19 +08:00
Autoplay = true
});
}
[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
}
}