From ce78bb549f2e5d9c09bf91402f55a7d26555f191 Mon Sep 17 00:00:00 2001 From: NiceAesth Date: Thu, 20 Jul 2023 00:32:54 +0300 Subject: [PATCH] Add test for multiple too early objects in break --- .../Editing/Checks/CheckBreaksTest.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/osu.Game.Tests/Editing/Checks/CheckBreaksTest.cs b/osu.Game.Tests/Editing/Checks/CheckBreaksTest.cs index 39e414827a..aaa536f9b9 100644 --- a/osu.Game.Tests/Editing/Checks/CheckBreaksTest.cs +++ b/osu.Game.Tests/Editing/Checks/CheckBreaksTest.cs @@ -88,6 +88,30 @@ namespace osu.Game.Tests.Editing.Checks Assert.That(issues.Single().Template is CheckBreaks.IssueTemplateLateEnd); } + [Test] + public void TestBreakMultipleObjectsEarly() + { + var beatmap = new Beatmap + { + HitObjects = + { + new HitCircle { StartTime = 0 }, + new HitCircle { StartTime = 1_297 }, + new HitCircle { StartTime = 1_298 } + }, + Breaks = new List + { + new BreakPeriod(200, 850) + } + }; + var context = new BeatmapVerifierContext(beatmap, new TestWorkingBeatmap(beatmap)); + + var issues = check.Run(context).ToList(); + + Assert.That(issues, Has.Count.EqualTo(1)); + Assert.That(issues.Single().Template is CheckBreaks.IssueTemplateLateEnd); + } + [Test] public void TestBreaksCorrect() {