Add failing test showing deserialise failing with some skins

This commit is contained in:
Dean Herbert 2024-08-23 20:44:35 +09:00
parent 1e39af8ac5
commit 3943fe96f4
No known key found for this signature in database
2 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,7 @@
using osu.Game.Audio;
using osu.Game.IO;
using osu.Game.IO.Archives;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.HUD.HitErrorMeters;
using osu.Game.Skinning;
@ -125,6 +126,18 @@ public void TestDeserialiseModifiedArgon()
}
}
[Test]
public void TestDeserialiseInvalidDrawables()
{
using (var stream = TestResources.OpenResource("Archives/argon-invalid-drawable.osk"))
using (var storage = new ZipArchiveReader(stream))
{
var skin = new TestSkin(new SkinInfo(), null, storage);
Assert.That(skin.LayoutInfos.Any(kvp => kvp.Value.AllDrawables.Any(d => d.Type == typeof(StarFountain))), Is.False);
}
}
[Test]
public void TestDeserialiseModifiedClassic()
{