mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Add safety test coverage for removal of breaks at end of beatmap
This commit is contained in:
parent
7ef7e5f163
commit
981340debe
@ -395,6 +395,32 @@ namespace osu.Game.Tests.Editing
|
|||||||
Assert.That(beatmap.Breaks, Is.Empty);
|
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]
|
[Test]
|
||||||
public void TestBreaksAtStartOfBeatmapAreRemoved()
|
public void TestBreaksAtStartOfBeatmapAreRemoved()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user