From a3b9e5b45cbaf0284860710238578d49f6484157 Mon Sep 17 00:00:00 2001 From: sakno Date: Tue, 23 Jan 2024 17:55:26 +0200 Subject: [PATCH] Fixed compiler error --- src/DotNext.Tests/IO/FileBufferingWriterTests.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/DotNext.Tests/IO/FileBufferingWriterTests.cs b/src/DotNext.Tests/IO/FileBufferingWriterTests.cs index b566fc5de..fdda44b6d 100644 --- a/src/DotNext.Tests/IO/FileBufferingWriterTests.cs +++ b/src/DotNext.Tests/IO/FileBufferingWriterTests.cs @@ -3,6 +3,8 @@ namespace DotNext.IO; +using Buffers; + public sealed class FileBufferingWriterTests : Test { [Theory] @@ -323,12 +325,12 @@ public static void CtorExceptions() public static async Task WriteDuringReadAsync() { using var writer = new FileBufferingWriter(); - writer.Write(new byte[] { 1, 2, 3 }); + writer.Write(stackalloc byte[] { 1, 2, 3 }); using var manager = writer.GetWrittenContent(); Equal(new byte[] { 1, 2, 3 }, manager.Memory.ToArray()); - Throws(writer.Clear); + Throws(writer.As>().Clear); Throws(() => writer.WriteByte(2)); - Throws(() => writer.GetWrittenContent()); + Throws(writer.GetWrittenContent); await ThrowsAsync(() => writer.WriteAsync(new byte[2], 0, 2)); await ThrowsAsync(writer.GetWrittenContentAsync().AsTask); }