示例#1
0
        public void ReturnSelfFunction_PrimitiveType_ResultTypesAreCorrect()
        {
            var rpt      = new ReturnSelfGenericFunctionDefinition();
            var function = rpt.CreateConcreteOrNull(FunnyType.Bool, FunnyType.Bool);

            Assert.Multiple(() =>
            {
                Assert.AreEqual(FunnyType.Bool, function.ReturnType);
                CollectionAssert.AreEquivalent(new[] { FunnyType.Bool }, function.ArgTypes);
            });
        }
示例#2
0
        public void ReturnSelfFunction_ArrayType_ResultTypesAreCorrect()
        {
            var arrayOfBool = FunnyType.ArrayOf(FunnyType.Bool);
            var rpt         = new ReturnSelfGenericFunctionDefinition();
            var function    = rpt.CreateConcreteOrNull(arrayOfBool, arrayOfBool);

            Assert.IsNotNull(function);
            Assert.Multiple(() =>
            {
                Assert.AreEqual(arrayOfBool, function.ReturnType);
                CollectionAssert.AreEquivalent(new[] { arrayOfBool }, function.ArgTypes);
            });
        }