mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
Adds negative tests for Begin/End, removes unnecessary block for `\\.\` paths. (The block for `\\.\` paths fulfills a need that predates our supported Windows OSes. You cannot inadvertently mess up "raw" drives. In addition we currently allow `\\?\` which is another form of device path access.) Commit migrated from https://github.com/dotnet/corefx/commit/5376c25bea9523265696ed5806f3dc8b51bbbf25
23 lines
666 B
C#
23 lines
666 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using Xunit;
|
|
|
|
namespace System.IO.Tests
|
|
{
|
|
public class FileStream_EndRead : FileSystemTest
|
|
{
|
|
[Fact]
|
|
public void EndReadThrowsForNullAsyncResult()
|
|
{
|
|
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite))
|
|
{
|
|
Assert.Throws<ArgumentNullException>("asyncResult", () => fs.EndRead(null));
|
|
}
|
|
}
|
|
}
|
|
}
|