private static object[] GetCtorArgs(IPersistentVector v) { object[] args = new object[v.length()]; for (int i = 0; i < v.length(); i++) { args[i] = v.nth(i); } return(args); }
public void PopLosesTheValue() { MapEntry me = new MapEntry(1, "abc"); IPersistentVector v = (IPersistentVector)me.pop(); Expect(v.length()).To.Equal(1); Expect(v.nth(0)).To.Equal(1); }
private static object[] GetCtorArgs(IPersistentVector v) { object[] args = new object[v.length()]; for (int i = 0; i < v.length(); i++) args[i] = v.nth(i); return args; }
public void LengthWorks() { IPersistentVector v = LazilyPersistentVector.createOwning(1, 2, 3); Expect(v.length(), EqualTo(3)); }