public void GlobalSetup()
 {
     enumerableValue     = TestEnumerable.ValueType(Count);
     enumerableReference = TestEnumerable.ReferenceType(Count);
     listValue           = TestList.ValueType(Count);
     listReference       = TestList.ReferenceType(Count);
 }
        static bool AllIndexer(TestList.Enumerable source, Predicate <int> predicate)
        {
            var sourceCount = source.Count;

            for (var index = 0; index < sourceCount; index++)
            {
                if (!predicate(source[index]))
                {
                    return(false);
                }
            }
            return(true);
        }
        public void GlobalSetup()
        {
            array  = new int[] { 0 };
            memory = array.AsMemory();

            enumerableReference = TestEnumerable.ReferenceType(1);
            enumerableValue     = TestEnumerable.ValueType(1);

            collectionReference = TestCollection.ReferenceType(1);
            collectionValue     = TestCollection.ValueType(1);

            listReference = TestList.ReferenceType(1);
            listValue     = TestList.ValueType(1);
        }
Exemple #4
0
        protected void Initialize(int[] array)
        {
            this.array = array;
            memory     = array.AsMemory();

            enumerableReference = TestEnumerable.ReferenceType(array);
            enumerableValue     = TestEnumerable.ValueType(array);

            collectionReference = TestCollection.ReferenceType(array);
            collectionValue     = TestCollection.ValueType(array);

            listReference = TestList.ReferenceType(array);
            listValue     = TestList.ValueType(array);

            asyncEnumerableReference = TestAsyncEnumerable.ReferenceType(array);
            asyncEnumerableValue     = TestAsyncEnumerable.ValueType(array);
        }
        public void GlobalSetup()
        {
            linqRange      = System.Linq.Enumerable.Range(0, Count);
            hyperlinqRange = ValueEnumerable.Range(0, Count);

            array      = hyperlinqRange.ToArray();
            memory     = array.AsMemory();
            list       = new List <int>(hyperlinqRange);
            linkedList = new LinkedList <int>(hyperlinqRange);

            enumerableReference = TestEnumerable.ReferenceType(Count);
            enumerableValue     = TestEnumerable.ValueType(Count);

            collectionReference = TestCollection.ReferenceType(Count);
            collectionValue     = TestCollection.ValueType(Count);

            listReference = TestList.ReferenceType(Count);
            listValue     = TestList.ValueType(Count);

            asyncEnumerableReference = TestAsyncEnumerable.ReferenceType(Count);
            asyncEnumerableValue     = TestAsyncEnumerable.ValueType(Count);
        }