Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@ -81,13 +81,8 @@ namespace MonoTests.System.Web.UI
byte [] data = Convert.FromBase64String (expected);
byte [] signed_data = Convert.FromBase64String (signed);
Assert.IsTrue (BitConverter.ToString (signed_data).StartsWith (BitConverter.ToString (data)), "4 / same data");
#if NET_4_0
// 32 bytes == 256 bits -> match HMACSHA256 as default
Assert.AreEqual (32, signed_data.Length - data.Length, "signature length");
#else
// 20 bytes == 160 bits -> match HMACSHA1 as default
Assert.AreEqual (20, signed_data.Length - data.Length, "signature length");
#endif
}
[Test]
@ -114,13 +109,8 @@ namespace MonoTests.System.Web.UI
byte [] data = Convert.FromBase64String (expected);
byte [] signed_data = Convert.FromBase64String (signed);
Assert.IsTrue (BitConverter.ToString (signed_data).StartsWith (BitConverter.ToString (data)), "5 / same data");
#if NET_4_0
// 32 bytes == 256 bits -> match HMACSHA256 as default
Assert.AreEqual (32, signed_data.Length - data.Length, "signature length");
#else
// 20 bytes == 160 bits -> match HMACSHA1 as default
Assert.AreEqual (20, signed_data.Length - data.Length, "signature length");
#endif
LosFormatter lf6 = new LosFormatter (true, "string"); // bug #649551
signed = NoKeyRoundTrip (lf6, "true, plain");
Assert.AreNotEqual (expected, signed, "6");
@ -171,7 +161,6 @@ namespace MonoTests.System.Web.UI
Assert.AreNotEqual (r4, r5, "r4-r5");
}
#if NET_4_0
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void Deserialize_Stream_NonSeekable ()
@ -181,19 +170,6 @@ namespace MonoTests.System.Web.UI
LosFormatter lf = new LosFormatter ();
lf.Serialize (ns, s1);
}
#else
[Test] // bug #411115
public void Deserialize_Stream_NonSeekable ()
{
string s1 = "Hello world";
NonSeekableStream ns = new NonSeekableStream ();
LosFormatter lf = new LosFormatter ();
lf.Serialize (ns, s1);
ns.Reset ();
string s2 = lf.Deserialize (ns) as string;
Assert.AreEqual (s1, s2);
}
#endif
[Test] // bug #324526
public void Serialize ()
{