Ejemplo n.º 1
0
        public void FunctionNodeWithNonReferenceInSignatureParameterAndNonReferenceVariableWired_ValidateVariableUsages_NoErrorCreated()
        {
            NIType         signatureType  = Signatures.RangeType;
            DfirRoot       dfirRoot       = DfirRoot.Create();
            FunctionalNode functionalNode = new FunctionalNode(dfirRoot.BlockDiagram, signatureType);

            ConnectConstantToInputTerminal(functionalNode.InputTerminals[0], NITypes.Int32, false);

            RunSemanticAnalysisUpToValidation(dfirRoot);

            Assert.IsFalse(functionalNode.GetDfirMessages().Any(message => message.Descriptor == Messages.TerminalDoesNotAcceptReference.Descriptor));
        }
Ejemplo n.º 2
0
        public void FunctionNodeWithMutableInOutSignatureParameterAndMutableVariableWired_ValidateVariableUsages_NoErrorCreated()
        {
            NIType         signatureType  = Signatures.MutablePassthroughType;
            DfirRoot       dfirRoot       = DfirRoot.Create();
            FunctionalNode functionalNode = new FunctionalNode(dfirRoot.BlockDiagram, signatureType);

            ConnectConstantToInputTerminal(functionalNode.InputTerminals[0], PFTypes.Int32, true);

            RunSemanticAnalysisUpToValidation(dfirRoot);

            Assert.IsFalse(functionalNode.GetDfirMessages().Any(message => message.Descriptor == Messages.TerminalDoesNotAcceptImmutableType.Descriptor));
        }