public void FastLinq_LastTen_Lazy()
 {
     IReadOnlyList <int> _ = FastLinq.Reverse(
         FastLinq.Take(
             FastLinq.Reverse(this.intArray),
             10));
 }
 public void FastLinq_SecondToLastItemCollection()
 {
     char _ = Enumerable.FirstOrDefault(
         FastLinq.Skip(
             FastLinq.Reverse(this.allLetters),
             1));
 }
 public void FastLinq_SecondToLastItemArray()
 {
     int _ = FastLinq.FirstOrDefault(
         FastLinq.Skip(
             FastLinq.Reverse(this.intArray),
             1));
 }
Beispiel #4
0
 public void Nominal()
 {
     EnsureResultOrExceptionSame(
         new int[] { 1, 2, 3 },
         arr => Enumerable.Reverse(arr),
         arr => FastLinq.Reverse(arr));
 }
Beispiel #5
0
 public void Empty()
 {
     EnsureResultOrExceptionSame(
         new int[] { },
         arr => Enumerable.Reverse(arr),
         arr => FastLinq.Reverse(arr));
 }
Beispiel #6
0
 public void Null()
 {
     EnsureResultOrExceptionSame(
         (int[])null,
         arr => Enumerable.Reverse(arr),
         arr => FastLinq.Reverse(arr));
 }
Beispiel #7
0
        public void Null()
        {
            IReadOnlyList <int> input = null;

            new Action(
                () => FastLinq.Reverse(input))
            .Should()
            .Throw <ArgumentNullException>();
        }
Beispiel #8
0
        public void Duplicates()
        {
            IReadOnlyList <int> input = new[] { 1, 1, 2 };

            ListCompareTestUtil.ValidateEqual(
                Enumerable.Reverse(input),
                FastLinq.Reverse(input),
                itemNotInTheCollection: 0,
                enforceWritable: false);
        }
Beispiel #9
0
        public void Empty()
        {
            IReadOnlyCollection <int> input = new int[] { };

            CollectionCompareTestUtil.ValidateEqual(
                Enumerable.Reverse(input),
                FastLinq.Reverse(input),
                itemNotInTheCollection: 0,
                enforceWritable: false);
        }
Beispiel #10
0
        public void Array_FastLinq()
        {
            var _ = FastLinq.Reverse(this.array);

            if (this.EnumerateAfterwards)
            {
                foreach (var __ in _)
                {
                    ;
                }
            }
        }
Beispiel #11
0
        public void List_FastLinq()
        {
            var _ = FastLinq.Reverse(this.list);

            if (this.EnumerateAfterwards)
            {
                foreach (var __ in _)
                {
                    ;
                }
            }
        }
Beispiel #12
0
        public void Collection_FastLinq()
        {
            var _ = FastLinq.Reverse(this.collection);

            if (this.EnumerateAfterwards)
            {
                foreach (var item in _)
                {
                    ;
                }
            }
        }
        public void FastLinq_LastTen_AndEnumerate()
        {
            IReadOnlyList <int> _ = FastLinq.Reverse(
                FastLinq.Take(
                    FastLinq.Reverse(this.intArray),
                    10));

            int i = 0;

            foreach (var item in _)
            {
                i++;
            }
        }
        public void Setup()
        {
            switch (this.ItemType)
            {
            case UnderlyingItemType.Array:
                this.underlying = Enumerable.Range(0, this.SizeOfInput).ToArray();
                break;

            case UnderlyingItemType.List:
                this.underlying = Enumerable.Range(0, this.SizeOfInput).ToList();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            this.ReverseList = FastLinq.Reverse(
                this.underlying);
        }
Beispiel #15
0
 public void FastLinq_Nominal_IgnoreResult()
 {
     FastLinq.Reverse(this.testData);
 }
Beispiel #16
0
 public void FastLinq_Nominal_Enumerate()
 {
     foreach (int i in FastLinq.Reverse(this.testData))
     {
     }
 }