Add failing test for incorrect start time of storyboard elements

This commit is contained in:
Dean Herbert
2022-09-06 16:16:54 +09:00
parent 6296c971f8
commit abf0242686
2 changed files with 25 additions and 0 deletions

View File

@ -117,6 +117,23 @@ namespace osu.Game.Tests.Beatmaps.Formats
}
}
[Test]
public void TestEarliestStartTimeWithLoopAlphas()
{
var decoder = new LegacyStoryboardDecoder();
using (var resStream = TestResources.OpenResource("loop-containing-earlier-non-zero-fade.osb"))
using (var stream = new LineBufferedReader(resStream))
{
var storyboard = decoder.Decode(stream);
StoryboardLayer background = storyboard.Layers.Single(l => l.Depth == 3);
Assert.AreEqual(1, background.Elements.Count);
Assert.AreEqual(1000, background.Elements[0].StartTime);
Assert.AreEqual(1000, storyboard.EarliestEventTime);
}
}
[Test]
public void TestDecodeVariableWithSuffix()
{