Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -274,9 +274,6 @@ namespace MonoTests.System.Security.Cryptography {
}
[Test]
#if ONLY_1_1
[ExpectedException (typeof (NotSupportedException))]
#endif
public void FlushFinalBlockReadStream ()
{
cs = new CryptoStream (readStream, encryptor, CryptoStreamMode.Read);
@ -299,11 +296,7 @@ namespace MonoTests.System.Security.Cryptography {
[Test]
// LAMESPEC or MS BUG [ExpectedException (typeof (ObjectDisposedException))]
#if NET_2_0
[ExpectedException (typeof (NotSupportedException))]
#else
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void FlushFinalBlock_Disposed ()
{
// do no corrupt writeStream in further tests
@ -316,9 +309,6 @@ namespace MonoTests.System.Security.Cryptography {
[Test]
// LAMESPEC or MS BUG [ExpectedException (typeof (ObjectDisposedException))]
#if ONLY_1_1
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void Read_Disposed ()
{
// do no corrupt readStream in further tests
@ -333,13 +323,8 @@ namespace MonoTests.System.Security.Cryptography {
#if !NET_2_1
[Test]
// MS BUG [ExpectedException (typeof (ObjectDisposedException))]
#if NET_2_0
[Category ("NotWorking")]
[ExpectedException (typeof (IndexOutOfRangeException))]
#else
[Category ("NotDotNet")] // Test cause System.ExecutionEngineException on MS runtime
[ExpectedException (typeof (ArgumentNullException))] // should fail like previous test case
#endif
public void Read_Disposed_Break ()
{
// do no corrupt readStream in further tests
@ -437,13 +422,8 @@ namespace MonoTests.System.Security.Cryptography {
#if !NET_2_1
[Test]
// MS BUG [ExpectedException (typeof (ObjectDisposedException))]
#if NET_2_0
[Category ("NotWorking")]
[ExpectedException (typeof (IndexOutOfRangeException))]
#else
[Category ("NotDotNet")] // Test cause System.ExecutionEngineException on MS runtime
[ExpectedException (typeof (ArgumentNullException))] // to match exception throw by Read in a similar case
#endif
public void Write_Disposed ()
{
// do no corrupt writeStream in further tests
@ -839,9 +819,7 @@ namespace MonoTests.System.Security.Cryptography {
Assert.AreEqual ("ximian", Encoding.Unicode.GetString (data, 0, len), "Unicode DES Roundtrip");
}
#if NET_2_0
[Category ("NotWorking")]
#endif
[Test]
public void DecryptPartial_TransformFinalBlock_2Pass ()
{
@ -868,9 +846,7 @@ namespace MonoTests.System.Security.Cryptography {
}
// based on http://www.c-sharpcorner.com/Code/2002/May/FileEncryption.asp
#if NET_2_0
[Category ("NotWorking")]
#endif
[Test]
public void WriteByteReadByte ()
{
@ -1262,9 +1238,7 @@ namespace MonoTests.System.Security.Cryptography {
byte[] digest = hash.Hash;
Assert.AreEqual ("71-04-12-D1-95-01-CF-F9-8D-8F-F8-0D-F9-AA-11-7D", BitConverter.ToString (digest), "Hash");
}
#if NET_2_0
[Category ("NotWorking")]
#endif
[Test]
public void CascadedCryptoStream_Read ()
{
@ -1385,10 +1359,8 @@ namespace MonoTests.System.Security.Cryptography {
WriteByte (PaddingMode.None, false);
WriteByte (PaddingMode.Zeros, false);
WriteByte (PaddingMode.PKCS7, true); // related to bug #81597
#if NET_2_0
WriteByte (PaddingMode.ANSIX923, true);
WriteByte (PaddingMode.ISO10126, true);
#endif
}
[Test]