1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:13:34 +08:00

Add test covering non-audio file formats not being checked

This commit is contained in:
Bartłomiej Dach 2024-04-22 10:43:20 +02:00
parent 78f97d0ec7
commit b28bf4d2ec
No known key found for this signature in database

View File

@ -85,6 +85,27 @@ namespace osu.Game.Tests.Editing.Checks
}
}
[Test]
public void TestNotAnAudioFile()
{
beatmap = new Beatmap<HitObject>
{
BeatmapInfo = new BeatmapInfo
{
BeatmapSet = new BeatmapSetInfo
{
Files = { CheckTestHelpers.CreateMockFile("png") }
}
}
};
using (var resourceStream = TestResources.OpenResource("Textures/test-image.png"))
{
var issues = check.Run(getContext(resourceStream)).ToList();
Assert.That(issues, Has.Count.EqualTo(0));
}
}
[Test]
public void TestCorruptAudio()
{