public void Summing() { XorLinkedList list = new XorLinkedList(new MonitoredUnmanagedMemory()); list.Prepend(1); list.Prepend(2); list.Prepend(3); Assert.Equal(6, list.Sum()); }
public void GetAt() { XorLinkedList list = new XorLinkedList(new MonitoredUnmanagedMemory()); list.Prepend(1); list.Prepend(2); list.Prepend(3); Assert.Null(list.GetAt(-1)); Assert.Equal(3, list.GetAt(0)); Assert.Equal(2, list.GetAt(1)); Assert.Equal(1, list.GetAt(2)); Assert.Null(list.GetAt(3)); }