Exemple #1
0
 public void TrySCGColl(SCG.ICollection<double> coll) {
     // All members of SCG.ICollection<T>
     Assert.AreEqual(0, coll.Count);
     double[] arr = { };
     coll.CopyTo(arr, 0);
     Assert.IsFalse(coll.IsReadOnly);
     coll.Add(2.3);
     coll.Add(3.2);
     Assert.AreEqual(2, coll.Count);
     Assert.IsTrue(coll.Contains(2.3));
     Assert.IsFalse(coll.Contains(3.1));
     Assert.IsFalse(coll.Remove(3.1));
     Assert.IsTrue(coll.Remove(3.2));
     Assert.IsFalse(coll.Contains(3.1));
     Assert.AreEqual(1, coll.Count);
     coll.Clear();
     Assert.AreEqual(0, coll.Count);
     Assert.IsFalse(coll.Remove(3.1));
 }