mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Add failing test for incorrect start time of storyboard elements
This commit is contained in:
parent
6296c971f8
commit
abf0242686
@ -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()
|
||||
{
|
||||
|
@ -0,0 +1,8 @@
|
||||
osu file format v14
|
||||
|
||||
[Events]
|
||||
//Storyboard Layer 0 (Background)
|
||||
Sprite,Background,TopCentre,"img.jpg",320,240
|
||||
L,1000,1
|
||||
F,0,0,,1 // fade inside a loop with non-zero alpha and an earlier start time should be the true start time..
|
||||
F,0,2000,,0 // ..not a zero alpha fade with a later start time
|
Loading…
Reference in New Issue
Block a user