-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow the official PR to create the mod test scene.
But scoring is not implemented, so mark the test scene ignore. see: https://github.com/ppy/osu/pull/26036/files
- Loading branch information
1 parent
e3cf51c
commit 0084f0e
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
osu.Game.Rulesets.Karaoke.Tests/Mods/TestSceneKaraokeModSuddenDeath.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using NUnit.Framework; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Rulesets.Karaoke.Mods; | ||
using osu.Game.Rulesets.Karaoke.Objects; | ||
using osu.Game.Rulesets.Karaoke.Replays; | ||
using osu.Game.Rulesets.Karaoke.Tests.Helper; | ||
using osu.Game.Rulesets.Objects; | ||
using osu.Game.Rulesets.Replays; | ||
using osu.Game.Tests.Visual; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Tests.Mods; | ||
|
||
[Ignore("Scoring is not implemented.")] | ||
public partial class TestSceneKaraokeModSuddenDeath : ModFailConditionTestScene | ||
{ | ||
protected override Ruleset CreatePlayerRuleset() => new KaraokeRuleset(); | ||
|
||
private readonly Lyric referencedLyric = TestCaseNoteHelper.CreateLyricForNote(1, "カラオケ", 1000, 1000); | ||
|
||
public TestSceneKaraokeModSuddenDeath() | ||
: base(new KaraokeModSuddenDeath()) | ||
{ | ||
} | ||
|
||
[Test] | ||
public void TestGreatHit() => CreateModTest(new ModTestData | ||
{ | ||
Mod = new KaraokeModSuddenDeath(), | ||
PassCondition = () => ((ModFailConditionTestPlayer)Player).CheckFailed(false), | ||
Autoplay = false, | ||
Beatmap = new Beatmap | ||
{ | ||
HitObjects = new List<HitObject> | ||
{ | ||
referencedLyric, | ||
new Note | ||
{ | ||
ReferenceLyricId = referencedLyric.ID, | ||
Tone = new Tone(0), | ||
}, | ||
}, | ||
}, | ||
ReplayFrames = new List<ReplayFrame> | ||
{ | ||
new KaraokeReplayFrame(1000, 0), | ||
new KaraokeReplayFrame(2000, 0), | ||
}, | ||
}); | ||
|
||
[Test] | ||
public void TestBreakOnHoldNote() => CreateModTest(new ModTestData | ||
{ | ||
Mod = new KaraokeModSuddenDeath(), | ||
PassCondition = () => ((ModFailConditionTestPlayer)Player).CheckFailed(true) && Player.Results.Count == 2, | ||
Autoplay = false, | ||
Beatmap = new Beatmap | ||
{ | ||
HitObjects = new List<HitObject> | ||
{ | ||
referencedLyric, | ||
new Note | ||
{ | ||
ReferenceLyricId = referencedLyric.ID, | ||
Tone = new Tone(0), | ||
}, | ||
}, | ||
}, | ||
ReplayFrames = new List<ReplayFrame> | ||
{ | ||
new KaraokeReplayFrame(0, -1), | ||
}, | ||
}); | ||
} |