public void EmptyListForeach() { var master = new SortSet <int, int>(); foreach (var v in master) { Assert.Fail(); } master.ReverseForeach(); foreach (var v in master) { Assert.Fail(); } }
public void ReversEnumerator() { int num = 50000; var list = new SortSet <int, int>(); for (int i = 0; i < num; i++) { list.Add(i, i); } int n = 0; list.ReverseForeach(); foreach (var v in list) { Assert.AreEqual(num - ++n, v); } }