Imported Upstream version 4.6.2.6

Former-commit-id: acf0aed9cbf359eec20dc40fbeb30554b4ed84a3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-02 14:46:16 +00:00
parent 36b9cc09f0
commit ee1447783b
35 changed files with 151 additions and 44 deletions

View File

@ -247,6 +247,25 @@ namespace MonoTests.System.Net.Sockets {
SocketAsyncEventArgsPoker saea = new SocketAsyncEventArgsPoker ();
saea.OnCompleted_ (null);
}
[Test]
public void TransparentDispose ()
{
var buffer = new byte[5];
var elements = new SendPacketsElement[2];
var utoken = new object();
var saea = new SocketAsyncEventArgs();
saea.SetBuffer(buffer, 0, 3);
saea.SendPacketsElements = elements;
saea.UserToken = utoken;
saea.Dispose();
Assert.AreEqual (buffer, saea.Buffer);
Assert.AreEqual (elements, saea.SendPacketsElements);
Assert.AreEqual (utoken, saea.UserToken);
}
}
}