diff --git a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs index 7ff6b9b085..15838f6902 100644 --- a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs +++ b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs @@ -279,13 +279,14 @@ namespace SixLabors.ImageSharp.Tests { var image = new Image(Configuration.Default, 10, 10); var frameCollection = image.Frames; + var rgba32Array = new Rgba32[0]; image.Dispose(); // this should invalidate underlying collection as well Assert.Throws(() => { var res = frameCollection.AddFrame((ImageFrame)null); }); - Assert.Throws(() => { var res = frameCollection.AddFrame((Rgba32[])null); }); + Assert.Throws(() => { var res = frameCollection.AddFrame(rgba32Array); }); Assert.Throws(() => { var res = frameCollection.AddFrame((ImageFrame)null); }); - Assert.Throws(() => { var res = frameCollection.AddFrame(stackalloc Rgba32[0]); }); + Assert.Throws(() => { var res = frameCollection.AddFrame(rgba32Array.AsSpan()); }); Assert.Throws(() => { var res = frameCollection.CloneFrame(default); }); Assert.Throws(() => { var res = frameCollection.Contains(default); }); Assert.Throws(() => { var res = frameCollection.CreateFrame(); });