mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Add failing test coverage for video events affecting storyboard time bounds
This commit is contained in:
parent
5a9d4170e8
commit
2f9b50172e
@ -287,5 +287,26 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
Assert.That(manyTimes.EndTime, Is.EqualTo(9000 + loop_duration));
|
Assert.That(manyTimes.EndTime, Is.EqualTo(9000 + loop_duration));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestVideoAndBackgroundEventsDoNotAffectStoryboardBounds()
|
||||||
|
{
|
||||||
|
var decoder = new LegacyStoryboardDecoder();
|
||||||
|
|
||||||
|
using var resStream = TestResources.OpenResource("video-background-events-ignored.osb");
|
||||||
|
using var stream = new LineBufferedReader(resStream);
|
||||||
|
|
||||||
|
var storyboard = decoder.Decode(stream);
|
||||||
|
|
||||||
|
Assert.Multiple(() =>
|
||||||
|
{
|
||||||
|
Assert.That(storyboard.GetLayer(@"Video").Elements, Has.Count.EqualTo(1));
|
||||||
|
Assert.That(storyboard.GetLayer(@"Video").Elements.Single(), Is.InstanceOf<StoryboardVideo>());
|
||||||
|
Assert.That(storyboard.GetLayer(@"Video").Elements.Single().StartTime, Is.EqualTo(-5678));
|
||||||
|
|
||||||
|
Assert.That(storyboard.EarliestEventTime, Is.Null);
|
||||||
|
Assert.That(storyboard.LatestEventTime, Is.Null);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
osu file format v14
|
||||||
|
|
||||||
|
[Events]
|
||||||
|
0,-1234,"BG.jpg",0,0
|
||||||
|
Video,-5678,"Video.avi",0,0
|
Loading…
Reference in New Issue
Block a user