mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
shorten tests and rename
This commit is contained in:
parent
66b02c0283
commit
497d2cb677
@ -488,17 +488,16 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
{
|
||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||
|
||||
using (var normalResStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||
using (var normalStream = new StreamReader(normalResStream))
|
||||
using (var resStream = TestResources.OpenResource("invalid-events.osu"))
|
||||
using (var stream = new StreamReader(resStream))
|
||||
using (var goodResStream = TestResources.OpenResource("valid-events.osu"))
|
||||
using (var goodStream = new StreamReader(goodResStream))
|
||||
using (var badResStream = TestResources.OpenResource("invalid-events.osu"))
|
||||
using (var badStream = new StreamReader(badResStream))
|
||||
{
|
||||
var goodBeatmap = decoder.Decode(normalStream);
|
||||
var badBeatmap = decoder.Decode(stream);
|
||||
var goodBeatmap = decoder.Decode(goodStream);
|
||||
var badBeatmap = decoder.Decode(badStream);
|
||||
|
||||
Assert.AreEqual(goodBeatmap.Breaks[0].Duration, badBeatmap.Breaks[0].Duration);
|
||||
Assert.AreEqual(goodBeatmap.Metadata.BackgroundFile, badBeatmap.Metadata.BackgroundFile);
|
||||
Assert.AreEqual(goodBeatmap.HitObjects.Count, badBeatmap.HitObjects.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
12
osu.Game.Tests/Resources/valid-events.osu
Normal file
12
osu.Game.Tests/Resources/valid-events.osu
Normal file
@ -0,0 +1,12 @@
|
||||
osu file format v14
|
||||
|
||||
[Events]
|
||||
//Background and Video events
|
||||
0,0,"machinetop_background.jpg",0,0
|
||||
//Break Periods
|
||||
2,122474,140135
|
||||
//Storyboard Layer 0 (Background)
|
||||
//Storyboard Layer 1 (Fail)
|
||||
//Storyboard Layer 2 (Pass)
|
||||
//Storyboard Layer 3 (Foreground)
|
||||
//Storyboard Sound Samples
|
Loading…
Reference in New Issue
Block a user