コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the IEnumerable_Test.
        /// </summary>
        /// <param name="collection">The collection to run the tests on.</param>
        /// <param name="items">The items currently in the collection.</param>
        /// <param name="modifyCollection">Modifies the collection to invalidate the enumerator.</param>
        public IEnumerable_Test(IEnumerable collection, Object[] items, ModifyUnderlyingCollection modifyCollection)
        {
            _collection = collection;
            _modifyCollection = modifyCollection;
            _isGenericCompatibility = false;
            _isResetNotSupported = false;
            _verificationLevel = VerificationLevel.Extensive;
            _collectionOrder = CollectionOrder.Sequential;

            if (items == null)
                _items = new Object[0];
            else
                _items = items;

            _comparer = System.Collections.Generic.EqualityComparer<Object>.Default;
        }
コード例 #2
0
ファイル: IEnumerableTest.cs プロジェクト: yicong/corefx
        /// <summary>
        /// Initializes a new instance of the IEnumerable_Test.
        /// </summary>
        /// <param name="collection">The collection to run the tests on.</param>
        /// <param name="items">The items currently in the collection.</param>
        /// <param name="modifyCollection">Modifies the collection to invalidate the enumerator.</param>
        public IEnumerable_Test(IEnumerable collection, Object[] items, ModifyUnderlyingCollection modifyCollection)
        {
            _collection             = collection;
            _modifyCollection       = modifyCollection;
            _isGenericCompatibility = false;
            _isResetNotSupported    = false;
            _verificationLevel      = VerificationLevel.Extensive;
            _collectionOrder        = CollectionOrder.Sequential;

            if (items == null)
            {
                _items = new Object[0];
            }
            else
            {
                _items = items;
            }

            _comparer = System.Collections.Generic.EqualityComparer <Object> .Default;
        }