public void InvalidGetRange() { var master = new QuickList <int>(20); for (var i = 0; i < 256; i++) { master.Push(i); } ExceptionAssert.Throws <ArgumentOutOfRangeException>(() => { master.GetRange(50, 10); }); }
public void GetRangeBlockTest() { var master = new QuickList <int>(20); for (var i = 0; i < 256; i++) { master.Push(i); } var elements = master.GetRange(100, 200); Assert.AreEqual(101, elements.Length); for (var i = 100; i < 200; i++) { Assert.AreEqual(i, elements[i - 100]); } }
public void GetRangeEmptyListTest() { var master = new QuickList <int>(5); Assert.AreEqual(0, master.GetRange(-1, 100).Length); }