X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem%2FArrayTest.cs;fp=mcs%2Fclass%2Fcorlib%2FTest%2FSystem%2FArrayTest.cs;h=36db33d6352b9ac3efc47122a7897ed4289ea21d;hp=0a04041aea34c055fdd0dd984c56be97ee6eedb8;hb=410bb8a57e23a901ea47d8a74f88a20972de423d;hpb=74a87af7f580c59f524f79508e4ad32ccff0870a diff --git a/mcs/class/corlib/Test/System/ArrayTest.cs b/mcs/class/corlib/Test/System/ArrayTest.cs index 0a04041aea3..36db33d6352 100644 --- a/mcs/class/corlib/Test/System/ArrayTest.cs +++ b/mcs/class/corlib/Test/System/ArrayTest.cs @@ -3693,6 +3693,20 @@ public class ArrayTest Assert.AreEqual (3, c.Counter); } + [Test] + public void EnumeratorsEquality () + { + int [] normalBase = new int [0]; + IEnumerable 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 ()