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);
        }
示例#2
0
        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);
        }
示例#3
0
        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));
        }