Exemplo n.º 1
0
        public void CreateTypeVariableReferenceFromRangeIteratorType_TypeVariableReferenceHasExpectedIteratorTrait()
        {
            var typeVariableSet = new TypeVariableSet();
            TypeVariableReference rangeIteratorType = typeVariableSet.CreateTypeVariableReferenceFromNIType(DataTypes.RangeIteratorType);

            TypeVariableReference iteratorTraitType;

            Assert.IsTrue(typeVariableSet.TryGetImplementedTrait(rangeIteratorType, "Iterator", out iteratorTraitType));
            Assert.IsTrue(typeVariableSet.GetTypeParameters(iteratorTraitType).First().RenderNIType().IsInt32());
        }