Exemplo n.º 1
0
        public void ShouldAllowTakingAnEmptySliceOfAnEmptySourceVector()
        {
            //This is a test of the internal SliceVector constructor,
            //indirectly since we cannot construct it directly.

            Vector <int> empty = new ArrayVector <int>();

            empty.Slice(0, 0).ShouldBeEmpty();
        }
Exemplo n.º 2
0
        private static Vector <int> SliceDigits(int startIndexInclusive, int endIndexExclusive)
        {
            var digits = new ArrayVector <int>(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);

            return(digits.Slice(startIndexInclusive, endIndexExclusive));
        }