1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 02:52:54 +08:00

Add safety test coverage for removal of breaks at end of beatmap

This commit is contained in:
Bartłomiej Dach 2024-06-27 07:45:14 +02:00
parent 7ef7e5f163
commit 981340debe
No known key found for this signature in database

View File

@ -395,6 +395,32 @@ namespace osu.Game.Tests.Editing
Assert.That(beatmap.Breaks, Is.Empty);
}
[Test]
public void TestManualBreaksAtEndOfBeatmapAreRemovedCorrectlyEvenWithConcurrentObjects()
{
var controlPoints = new ControlPointInfo();
controlPoints.Add(0, new TimingControlPoint { BeatLength = 500 });
var beatmap = new Beatmap
{
ControlPointInfo = controlPoints,
HitObjects =
{
new HoldNote { StartTime = 1000, EndTime = 20000 },
new HoldNote { StartTime = 2000, EndTime = 3000 },
},
Breaks =
{
new ManualBreakPeriod(10000, 15000),
}
};
var beatmapProcessor = new EditorBeatmapProcessor(beatmap, new OsuRuleset());
beatmapProcessor.PreProcess();
beatmapProcessor.PostProcess();
Assert.That(beatmap.Breaks, Is.Empty);
}
[Test]
public void TestBreaksAtStartOfBeatmapAreRemoved()
{