You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
@@ -26,6 +26,9 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.Drawing;
|
||||
#endif
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.ComponentModel {
|
||||
@@ -58,5 +61,21 @@ namespace MonoTests.System.ComponentModel {
|
||||
|
||||
Assert.AreEqual (1, dvat.GetHashCode (), "GetHashCode");
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[DefaultValue (typeof (Color), "Black")]
|
||||
public Color Bar { get; set; }
|
||||
|
||||
// https://github.com/mono/mono/issues/12362
|
||||
[Test]
|
||||
public void Bug_12362 ()
|
||||
{
|
||||
var prop = typeof (DefaultValueAttributeTest).GetProperty ("Bar");
|
||||
var attr = (DefaultValueAttribute)prop.GetCustomAttributes (true) [0];
|
||||
var value = attr.Value;
|
||||
Assert.IsNotNull (value);
|
||||
Assert.AreEqual (typeof (Color), value.GetType ());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.IO.Compression
|
||||
{
|
||||
[TestFixture]
|
||||
@@ -467,7 +469,7 @@ namespace MonoTests.System.IO.Compression
|
||||
public void Bug44994_InflateByteByByte()
|
||||
{
|
||||
int byteCount = 0;
|
||||
using (var fileStream = File.OpenRead(Path.Combine("Test", "compressed.bin")))
|
||||
using (var fileStream = File.OpenRead(TestResourceHelper.GetFullPathOfResource ("Test/compressed.bin")))
|
||||
{
|
||||
using (var deflateStream = new DeflateStream(fileStream, CompressionMode.Decompress, false))
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace MonoTests.System.Net {
|
||||
[ExpectedException (typeof (ArgumentNullException))]
|
||||
public void Basic1 ()
|
||||
{
|
||||
#if MONOTOUCH_WATCH || __WATCHOS__
|
||||
#if MONOTOUCH_WATCH
|
||||
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
|
||||
#endif
|
||||
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity (null, null);
|
||||
@@ -46,7 +46,7 @@ namespace MonoTests.System.Net {
|
||||
[Test]
|
||||
public void Basic2 ()
|
||||
{
|
||||
#if MONOTOUCH_WATCH || __WATCHOS__
|
||||
#if MONOTOUCH_WATCH
|
||||
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
|
||||
#endif
|
||||
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("", null);
|
||||
@@ -59,7 +59,7 @@ namespace MonoTests.System.Net {
|
||||
[Test]
|
||||
public void Basic3 ()
|
||||
{
|
||||
#if MONOTOUCH_WATCH || __WATCHOS__
|
||||
#if MONOTOUCH_WATCH
|
||||
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
|
||||
#endif
|
||||
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", null);
|
||||
@@ -72,7 +72,7 @@ namespace MonoTests.System.Net {
|
||||
[Test]
|
||||
public void Basic4 ()
|
||||
{
|
||||
#if MONOTOUCH_WATCH || __WATCHOS__
|
||||
#if MONOTOUCH_WATCH
|
||||
Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
|
||||
#endif
|
||||
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", "pass");
|
||||
|
||||
@@ -1 +1 @@
|
||||
0e5e4fa3cc55421e0c4f859790f4f9db6af83d40
|
||||
e002ba0f9d7349156f9fd25c0c9c7fc124a3b47a
|
||||
@@ -320,9 +320,6 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
Assert.AreEqual ("System.Security.Cryptography.X509Certificates.X509Certificate", x.ToString (false), "ToString(false)");
|
||||
Assert.IsTrue (x.Equals (x), "Equals(X509Certificate)");
|
||||
Assert.IsTrue (x.Equals ((object) x), "Equals(object)");
|
||||
x.Reset ();
|
||||
x.Import (cert1);
|
||||
Assert.AreEqual ("02720006E8", x.GetSerialNumberString (), "GetSerialNumberString");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -456,7 +453,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
|
||||
#if !MOBILE
|
||||
[Test]
|
||||
[ExpectedException (typeof (NullReferenceException))]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void GetObjectData_Null ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate ();
|
||||
@@ -465,6 +462,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void GetObjectData ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate (cert1);
|
||||
@@ -472,27 +470,22 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
Assert.IsNotNull (s, "ISerializable");
|
||||
SerializationInfo info = new SerializationInfo (typeof (X509Certificate), new FormatterConverter ());
|
||||
s.GetObjectData (info, new StreamingContext (StreamingContextStates.All));
|
||||
Assert.AreEqual (1, info.MemberCount, "MemberCount");
|
||||
byte[] raw = (byte[]) info.GetValue ("RawData", typeof (byte[]));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (NullReferenceException))]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void Ctor_Serialization_Null ()
|
||||
{
|
||||
new X509Certificate (null, new StreamingContext (StreamingContextStates.All));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void Ctor_Serialization ()
|
||||
{
|
||||
SerializationInfo info = new SerializationInfo (typeof (X509Certificate), new FormatterConverter ());
|
||||
info.AddValue ("RawData", cert1);
|
||||
X509Certificate x = new X509Certificate (info, new StreamingContext (StreamingContextStates.All));
|
||||
Assert.AreEqual (cert1, x.GetRawCertData (), "GetRawCertData");
|
||||
// decoding is done too
|
||||
Assert.AreEqual ("02720006E8", x.GetSerialNumberString (), "SerialNumber");
|
||||
new X509Certificate (info, new StreamingContext (StreamingContextStates.All));
|
||||
}
|
||||
|
||||
|
||||
@@ -741,15 +734,6 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
{
|
||||
new X509Certificate (farscape_pkcs7);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (CryptographicException))]
|
||||
[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
|
||||
public void Pkcs7_Import ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate ();
|
||||
x.Import (farscape_pkcs7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
154d250723232cec39579047ce3ebd3ed2839f24
|
||||
2ece09a6bcbc8bd2bc7fba916be03eb093a31b70
|
||||
@@ -8,6 +8,8 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System
|
||||
{
|
||||
// help bring Moonlight tests back to mono/mcs nunit
|
||||
@@ -108,7 +110,7 @@ namespace MonoTests.System
|
||||
[Ignore ("Tests needs to be updated for 2.0")]
|
||||
public void AbsoluteUriFromFile ()
|
||||
{
|
||||
FromResource ("test-uri-props.txt", null);
|
||||
FromResource ("Test/System/test-uri-props.txt", null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -118,21 +120,19 @@ namespace MonoTests.System
|
||||
{
|
||||
if (Path.DirectorySeparatorChar == '\\')
|
||||
return;
|
||||
FromResource ("test-uri-props-manual.txt", null);
|
||||
FromResource ("Test/System/test-uri-props-manual.txt", null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore ("Tests needs to be updated for 2.0")]
|
||||
public void RelativeUriFromFile ()
|
||||
{
|
||||
FromResource ("test-uri-relative-props.txt", new Uri ("http://www.go-mono.com"));
|
||||
FromResource ("Test/System/test-uri-relative-props.txt", new Uri ("http://www.go-mono.com"));
|
||||
}
|
||||
|
||||
private void FromResource (string res, Uri baseUri)
|
||||
{
|
||||
Assembly a = Assembly.GetExecutingAssembly ();
|
||||
Stream s = a.GetManifestResourceStream (res);
|
||||
StreamReader sr = new StreamReader (s, Encoding.UTF8);
|
||||
StreamReader sr = new StreamReader (TestResourceHelper.GetFullPathOfResource (res), Encoding.UTF8);
|
||||
while (sr.Peek () > 0) {
|
||||
sr.ReadLine (); // skip
|
||||
string uriString = sr.ReadLine ();
|
||||
|
||||
BIN
mcs/class/System/Test/compressed.bin
Normal file
BIN
mcs/class/System/Test/compressed.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user