using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
+using Microsoft.Win32.SafeHandles;
namespace MonoTests.System.IO
{
DeleteFile (path);
}
}
+
+ [Test]
+ public void Ctor_InvalidSafeHandle ()
+ {
+ var sf = new SafeFileHandle (IntPtr.Zero, true);
+ try {
+ new FileStream (sf, FileAccess.ReadWrite);
+ Assert.Fail ("#1");
+ } catch (ArgumentException) {
+ }
+ }
#endif
}
}