public void PopOnSingletonListYieldsEmptyList() { PersistentList p = new PersistentList("abc"); IPersistentStack s = p.pop(); Expect(s.count(), EqualTo(0)); }
public void PopLosesfirstElement() { PersistentList p = (PersistentList)PersistentList.create(new object[] { "abc", 1, "def" }); PersistentList p2 = (PersistentList)p.pop(); Expect(p2.count(), EqualTo(2)); Expect(p2.peek(), EqualTo(1)); }
public void DoublePopOnSingletonListYieldsException() { PersistentList p = new PersistentList("abc"); IPersistentStack s = p.pop().pop(); }