Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -3385,6 +3385,30 @@ public class ArrayTest
}
}
[Test]
public void IEnumerator_Dispose ()
{
IEnumerable<int> e = new int[] { 1 };
var en = e.GetEnumerator ();
Assert.IsTrue (en.MoveNext (), "#1");
Assert.IsFalse (en.MoveNext (), "#2");
en.Dispose ();
Assert.IsFalse (en.MoveNext (), "#3");
}
[Test]
public void IEnumerator_ZeroSize ()
{
IEnumerable<int> e = Array.Empty<int> ();
var en = e.GetEnumerator ();
Assert.IsFalse (en.MoveNext (), "#1");
e = Array.Empty<int> ();
en = e.GetEnumerator ();
Assert.IsFalse (en.MoveNext (), "#2");
}
[Test]
public void ICollection_IsReadOnly() {
ICollection<string> arr = new string [10];
@@ -3669,6 +3693,20 @@ public class ArrayTest
Assert.AreEqual (3, c.Counter);
}
[Test]
public void EnumeratorsEquality ()
{
int [] normalBase = new int [0];
IEnumerable<int> specialBase = new int [0];
var firstSpecial = specialBase.GetEnumerator ();
var secondSpecial = specialBase.GetEnumerator ();
var firstNormal = normalBase.GetEnumerator ();
var secondNormal = normalBase.GetEnumerator ();
Assert.IsFalse (object.ReferenceEquals (firstNormal, secondNormal));
Assert.IsTrue (object.ReferenceEquals (firstSpecial, secondSpecial));
}
[Test]
public void JaggedArrayCtor ()

View File

@@ -1 +1 @@
2391dbb65071a4f0a313703b9e3aac16d322de59
8f9fe1c0099abe4f3aa9b529c6cba003b529b9e6

View File

@@ -8,7 +8,6 @@
using NUnit.Framework;
using System;
using MonoTests.Common;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Threading;
@@ -149,7 +148,7 @@ namespace MonoTests.System
Assert.AreEqual(1, Decimal.ToByte(1));
Assert.AreEqual(255, Decimal.ToByte(255));
AssertExtensions.Throws<OverflowException>(() => Decimal.ToByte(256), "Expected an overflow");
Assert.Throws<OverflowException>(() => Decimal.ToByte(256), "Expected an overflow");
}
private void VerifyAdd<T>(Decimal d1, Decimal d2, Decimal expected = Decimal.Zero) where T : Exception
@@ -698,7 +697,7 @@ namespace MonoTests.System
Assert.IsTrue(d.CompareTo(247m) > 0);
Assert.IsTrue(d.CompareTo(null) > 0);
AssertExtensions.Throws<ArgumentException>(() => d.CompareTo("248"), "Expected an argument exception");
Assert.Throws<ArgumentException>(() => d.CompareTo("248"), "Expected an argument exception");
}
[Test]
@@ -709,6 +708,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void TestToSingle()
{
// Single Decimal.ToSingle(Decimal)
@@ -726,6 +726,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void TestToDouble()
{
Double d = Decimal.ToDouble(new Decimal(0, 0, 1, false, 0));

View File

@@ -507,6 +507,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void TestConstructSingle ()
{
Decimal d;
@@ -629,6 +630,7 @@ namespace MonoTests.System
[Test]
[SetCulture("en-US")]
[Category ("InterpreterNotWorking")]
public void TestConstructDouble ()
{
Decimal d;
@@ -727,6 +729,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void TestConstructDoubleRound ()
{
decimal d;
@@ -979,6 +982,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void ToInt32 ()
{
Decimal d = 254.9m;
@@ -1041,6 +1045,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void ToSingle ()
{
Decimal d = 254.9m;
@@ -1054,6 +1059,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void ToDouble ()
{
Decimal d = 254.9m;

View File

@@ -851,6 +851,7 @@ namespace MonoTests.System
delegate object Boxer ();
[Test]
[Category ("InterpreterNotWorking")]
public void BoxingCovariance ()
{
var boxer = (Boxer) Delegate.CreateDelegate (
@@ -912,6 +913,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void NullFirstArgumentOnStaticMethod ()
{
CallTarget call = (CallTarget) Delegate.CreateDelegate (
@@ -925,6 +927,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
#if MONOTOUCH || FULL_AOT_RUNTIME
[Category ("NotWorking")] // #10539
#endif
@@ -1024,6 +1027,7 @@ namespace MonoTests.System
#if MONOTOUCH || FULL_AOT_RUNTIME
[Category ("NotWorking")] // #10539
#endif
[Category ("InterpreterNotWorking")]
public void ClosedOverNullReferenceStaticMethod ()
{
var del = (Func<long?,long?>) Delegate.CreateDelegate (
@@ -1101,6 +1105,7 @@ namespace MonoTests.System
event Action bar_handler;
[Test]
[Category ("InterpreterNotWorking")]
[ExpectedException (typeof (ArgumentException))] // #635349, #605936
public void NewDelegateClosedOverNullReferenceInstanceMethod ()
{
@@ -1144,6 +1149,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void DynamicInvokeOpenInstanceDelegate ()
{
var d1 = Delegate.CreateDelegate (typeof (Func<DelegateTest, int>), typeof(DelegateTest).GetMethod ("DynamicInvokeOpenInstanceDelegate_CB"));
@@ -1281,6 +1287,7 @@ namespace MonoTests.System
}
#if !MONOTOUCH && !FULL_AOT_RUNTIME
[Test]
[Category ("InterpreterNotWorking")]
public void CreateDelegateWithLdFtnAndAbstractMethod ()
{
AssemblyName assemblyName = new AssemblyName ();

View File

@@ -262,6 +262,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void GetObjectData ()
{
string msg = "MESSAGE";
@@ -379,6 +380,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void Source ()
{
Exception ex1 = new Exception ("MSG");

View File

@@ -56,6 +56,7 @@ namespace MonoTests.System {
}
[Test]
[Category ("InterpreterNotWorking")]
public void ReRegisterForFinalizeTest ()
{
var thread = new Thread (Run_ReRegisterForFinalizeTest);
@@ -73,4 +74,4 @@ namespace MonoTests.System {
Assert.IsTrue (t.Wait (5000));
}
}
}
}

View File

@@ -977,6 +977,15 @@ namespace MonoTests.System
}
#endif
[Test]
public void FindIsraelStandardTime ()
{
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
Assert.Ignore ("Only applies to Windows.");
TimeZoneInfo.FindSystemTimeZoneById ("Israel Standard Time");
}
[Test]
public void SubminuteDSTOffsets ()
{

View File

@@ -313,6 +313,7 @@ public class TimeZoneTest {
}
[Test]
[Category ("InterpreterNotWorking")]
public void GetUtcOffsetAtDSTBoundary ()
{
/*
@@ -386,32 +387,10 @@ public class TimeZoneTest {
// two types - if they break then TimeZoneInfo work work at all
// ref: http://bugzilla.xamarin.com/show_bug.cgi?id=1790
bool incomplete_data_on_simulator_only_bug;
[Test]
public void GetSystemTimeZones ()
{
// if test is executed a second time then it report less than 400 (about 127) items available
if (incomplete_data_on_simulator_only_bug)
Assert.Ignore ("known to fail on some iOS simulator versions - see source comments");
try {
Assert.That (TimeZoneInfo.GetSystemTimeZones ().Count, Is.GreaterThan (400), "GetSystemTimeZones");
} catch (NullReferenceException) {
// that's a weird one. It failed on iOS 5.1 *beta* simulator (on Lion) but it worked on *final*
// now it fails on Snow Leopard the same way (incomplete data) with iOS5 simulator (OS update ?)
// but it *never*ever* failed on devices
incomplete_data_on_simulator_only_bug = true;
#if MONOTOUCH
#if XAMCORE_2_0
if (ObjCRuntime.Runtime.Arch == ObjCRuntime.Arch.SIMULATOR)
#elif MONOTOUCH
if (MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.SIMULATOR)
#endif
Assert.Ignore ("known to fail on some iOS simulator versions - see source comments");
#endif // MONOTOUCH
}
Assert.That (TimeZoneInfo.GetSystemTimeZones ().Count, Is.GreaterThan (400), "GetSystemTimeZones");
}
#endif
}

View File

@@ -1 +1 @@
1c96d569e2802947a62c9fa5b6922c78b686180b
6608ef9cc4301918179262a621d3f033dcdead0b

View File

@@ -51,6 +51,7 @@ namespace MonoCasTests.System {
// when reflection is used (i.e. it gets testable).
[Test]
[Category ("InterpreterNotWorking")]
[ReflectionPermission (SecurityAction.Deny, MemberAccess = true)]
[ExpectedException (typeof (SecurityException))]
public void MakeTypedReference ()

View File

@@ -59,6 +59,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void MakeTypedReference ()
{
var o = new CClass () { a = new AStruct () { b = "5" }};

View File

@@ -52,6 +52,7 @@ namespace MonoTests.System
}
[Test]
[Category ("InterpreterNotWorking")]
public void TestEquals_Nullable ()
{
NullableStruct f1 = new NullableStruct { f = 5 };