public static ProtoCore.AST.AssociativeAST.IdentifierNode BuildAssocIdentifier(ProtoLanguage.CompileStateTracker compileState, string name, ProtoCore.PrimitiveType type = ProtoCore.PrimitiveType.kTypeVar) { var ident = new ProtoCore.AST.AssociativeAST.IdentifierNode(); ident.Name = ident.Value = name; ident.datatype = TypeSystem.BuildPrimitiveTypeObject(type, false); return ident; }
public static ProtoCore.AST.AssociativeAST.IdentifierNode BuildAssocIdentifier(Core core, string name, ProtoCore.PrimitiveType type = ProtoCore.PrimitiveType.kTypeVar) { var ident = new ProtoCore.AST.AssociativeAST.IdentifierNode(); ident.Name = ident.Value = name; ident.datatype = core.TypeSystem.BuildTypeObject(type, false); return ident; }
public static ProtoCore.AST.AssociativeAST.IdentifierNode BuildAssocIdentifier(ProtoLanguage.CompileStateTracker compileState, string name, ProtoCore.PrimitiveType type = ProtoCore.PrimitiveType.kTypeVar) { var ident = new ProtoCore.AST.AssociativeAST.IdentifierNode(); ident.Name = ident.Value = name; ident.datatype = TypeSystem.BuildPrimitiveTypeObject(type, false); return(ident); }
public void TestProtoASTExecute_ArrayIndex_RHS_Assign04() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = 4; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(5), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // def foo(){ // return = -4; // } ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); ProtoCore.AST.AssociativeAST.BinaryExpressionNode returnNode = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode(ProtoCore.DSDefinitions.Keyword.Return), new ProtoCore.AST.AssociativeAST.IntNode(-4), ProtoCore.DSASM.Operator.assign); cbn.Body.Add(returnNode); // Build the function definition foo const string functionName = "foo"; ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode() { Name = functionName, FunctionBody = cbn }; // Function Return Type ProtoCore.Type returnType = new ProtoCore.Type(); returnType.Initialize(); returnType.UID = (int)ProtoCore.PrimitiveType.Var; returnType.Name = ProtoCore.DSDefinitions.Keyword.Var; funcDefNode.ReturnType = returnType; astList.Add(funcDefNode); // c = a[b + foo()]; ProtoCore.AST.AssociativeAST.FunctionCallNode functionCall = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); functionCall.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode(functionName); ProtoCore.AST.AssociativeAST.BinaryExpressionNode operation1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), functionCall, ProtoCore.DSASM.Operator.add); ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = operation1 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("c"), nodeALHS, ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); Obj o = mirror.GetValue("c"); Console.WriteLine(o.Payload); // expected: c = 2 Assert.AreEqual(2, Convert.ToInt32(o.Payload)); }
public void TestProtoASTExecute_ArrayIndex_RHS_Assign05() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = { { 0, 1 }, { 3, 4, 5 } }; int[] input1 = { 0, 1 }; int[] input2 = { 2, 3, 4 }; List<ProtoCore.AST.AssociativeAST.AssociativeNode> arrayList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); arrayList.Add(CreateExprListNodeFromArray(input1)); arrayList.Add(CreateExprListNodeFromArray(input2)); ProtoCore.AST.AssociativeAST.ExprListNode arrayExpr = new ProtoCore.AST.AssociativeAST.ExprListNode { Exprs = arrayList }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("a"), arrayExpr, ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeA); // b = 2; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(2), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // c = a[1][b]; ProtoCore.AST.AssociativeAST.IdentifierNode nodeARHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeARHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IntNode(1), Type = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IdentifierNode("b") } }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeARHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("c"), nodeARHS, ProtoCore.DSASM.Operator.assign); astList.Add(nodeARHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); Obj o = mirror.GetValue("c"); // expected : c = 4 Assert.AreEqual(4, Convert.ToInt32(o.Payload)); }
public void TestProtoASTExecute_ArrayIndex_LHS_Assign05() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = { { 0, 1 }, { 3, 4, 5 } }; int[] input1 = { 0, 1 }; int[] input2 = { 3, 4, 5 }; List<ProtoCore.AST.AssociativeAST.AssociativeNode> arrayList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); arrayList.Add(CreateExprListNodeFromArray(input1)); arrayList.Add(CreateExprListNodeFromArray(input2)); ProtoCore.AST.AssociativeAST.ExprListNode arrayExpr = new ProtoCore.AST.AssociativeAST.ExprListNode { Exprs = arrayList }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("a"), arrayExpr, ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeA); // b = 2; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(2), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // a[0][b] = b; ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IntNode(0), Type = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IdentifierNode("b") } }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( nodeALHS, new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); Obj o = mirror.GetValue("a"); Console.WriteLine(o.Payload); int[] output1 = { 0, 1, 2 }; int[] output2 = { 3, 4, 5 }; // Result should be = { { 0, 1, 2 }, { 3, 4, 5 } }; ProtoCore.DSASM.Mirror.DsasmArray result = o.Payload as ProtoCore.DSASM.Mirror.DsasmArray; Assert.IsNotNull( result ); // First row of array = { 0, 1, 2 } ProtoCore.DSASM.Mirror.DsasmArray array1 = result.members[0].Payload as ProtoCore.DSASM.Mirror.DsasmArray; Assert.IsNotNull( array1 ); for (int i = 0; i < output1.Length; i++) Assert.AreEqual(output1[i], Convert.ToInt32(array1.members[i].Payload)); // Second row of array = { 3, 4, 5 } ProtoCore.DSASM.Mirror.DsasmArray array2 = (ProtoCore.DSASM.Mirror.DsasmArray)result.members[1].Payload; Assert.IsNotNull( array2 ); for (int i = 0; i < output2.Length; i++) Assert.AreEqual(output2[i], Convert.ToInt32(array2.members[i].Payload)); }
public void TestProtoASTExecute_ArrayIndex_RHS_Assign03() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = -1; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(-1), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // c = a[b + 3]; ProtoCore.AST.AssociativeAST.BinaryExpressionNode operation1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.add); ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = operation1}; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("c"), nodeALHS, ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); Obj o = mirror.GetValue("c"); // Expected: c = 3 Assert.AreEqual(3, Convert.ToInt32(o.Payload)); }
public void TestCodeGenDS_FunctionDefNode1() { ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignment1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(10), ProtoCore.DSASM.Operator.assign); ProtoCore.AST.AssociativeAST.BinaryExpressionNode returnExpr = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(10), ProtoCore.DSASM.Operator.add); var returnIdent = new ProtoCore.AST.AssociativeAST.IdentifierNode("return"); ProtoCore.AST.AssociativeAST.BinaryExpressionNode returnNode = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode(returnIdent, returnExpr); cbn.Body.Add(assignment1); cbn.Body.Add(returnNode); /// ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode(); funcDefNode.Name = "foo"; funcDefNode.FunctionBody = cbn; /* def foo() * { * b = 10; * return = b + 10; * }*/ List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>();
public void TestProtoASTExecute_ArrayIndex_LHS_Assign03() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = 3; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // a[b - 3] = 0; ProtoCore.AST.AssociativeAST.BinaryExpressionNode operation1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.sub); ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode() { Expr = operation1 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( nodeALHS, new ProtoCore.AST.AssociativeAST.IdentifierNode("0"), ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); Obj o = mirror.GetValue("a"); Console.WriteLine(o.Payload); // expected: a = { 0, 2, 3, 4 }; int[] expected = { 0, 2, 3, 4 }; ProtoCore.DSASM.Mirror.DsasmArray result = (ProtoCore.DSASM.Mirror.DsasmArray)o.Payload; for (int i = 0; i < expected.Length; i++) Assert.AreEqual(expected[i], Convert.ToInt32(result.members[i].Payload)); }
public void TestProtoASTExecute_ArrayIndex_LHS_Assign04() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = 4; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(4), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // def foo(){ // return = -2; // } ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); ProtoCore.AST.AssociativeAST.BinaryExpressionNode returnNode = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode(ProtoCore.DSDefinitions.Keyword.Return), new ProtoCore.AST.AssociativeAST.IntNode(-2), ProtoCore.DSASM.Operator.assign); cbn.Body.Add(returnNode); // Build the function definition foo const string functionName = "foo"; ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode() { Name = functionName, FunctionBody = cbn }; // Function Return Type ProtoCore.Type returnType = new ProtoCore.Type(); returnType.Initialize(); returnType.UID = (int)ProtoCore.PrimitiveType.Var; returnType.Name = ProtoCore.DSDefinitions.Keyword.Var; funcDefNode.ReturnType = returnType; astList.Add(funcDefNode); // a[b + foo()] = -1; ProtoCore.AST.AssociativeAST.FunctionCallNode functionCall = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); functionCall.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode(functionName); ProtoCore.AST.AssociativeAST.BinaryExpressionNode operation1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), functionCall, ProtoCore.DSASM.Operator.add); ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode(); nodeALHS.ArrayDimensions.Expr = operation1; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( nodeALHS, new ProtoCore.AST.AssociativeAST.IntNode(-1), ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); thisTest.Verify("a", new [] { 1, 2, -1, 4}); }
public static ProtoCore.AST.AssociativeAST.FunctionDotCallNode GenerateCallDotNode(ProtoCore.AST.AssociativeAST.AssociativeNode lhs, ProtoCore.AST.AssociativeAST.FunctionCallNode rhsCall, ProtoLanguage.CompileStateTracker compileState = null) { // The function name to call string rhsName = rhsCall.Function.Name; int argNum = rhsCall.FormalArguments.Count; ProtoCore.AST.AssociativeAST.ExprListNode argList = new ProtoCore.AST.AssociativeAST.ExprListNode(); foreach (ProtoCore.AST.AssociativeAST.AssociativeNode arg in rhsCall.FormalArguments) { // The function arguments argList.list.Add(arg); } ProtoCore.AST.AssociativeAST.FunctionCallNode funCallNode = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); ProtoCore.AST.AssociativeAST.IdentifierNode funcName = new ProtoCore.AST.AssociativeAST.IdentifierNode { Value = ProtoCore.DSASM.Constants.kDotArgMethodName, Name = ProtoCore.DSASM.Constants.kDotArgMethodName }; funCallNode.Function = funcName; funCallNode.Name = ProtoCore.DSASM.Constants.kDotArgMethodName; NodeUtils.CopyNodeLocation(funCallNode, lhs); int rhsIdx = ProtoCore.DSASM.Constants.kInvalidIndex; string lhsName = null; if (lhs is ProtoCore.AST.AssociativeAST.IdentifierNode) { lhsName = (lhs as ProtoCore.AST.AssociativeAST.IdentifierNode).Name; if (lhsName == ProtoCore.DSDefinitions.Keyword.This) { lhs = new ProtoCore.AST.AssociativeAST.ThisPointerNode(); } } if (compileState != null) { if (argNum >= 0) { ProtoCore.DSASM.DynamicFunctionNode dynamicFunctionNode = new ProtoCore.DSASM.DynamicFunctionNode(rhsName, new List<ProtoCore.Type>()); compileState.DynamicFunctionTable.functionTable.Add(dynamicFunctionNode); rhsIdx = compileState.DynamicFunctionTable.functionTable.Count - 1; } else { DSASM.DyanmicVariableNode dynamicVariableNode = new DSASM.DyanmicVariableNode(rhsName); compileState.DynamicVariableTable.variableTable.Add(dynamicVariableNode); rhsIdx = compileState.DynamicVariableTable.variableTable.Count - 1; } } // The first param to the dot arg (the pointer or the class name) ProtoCore.AST.AssociativeAST.IntNode rhs = new ProtoCore.AST.AssociativeAST.IntNode() { value = rhsIdx.ToString() }; funCallNode.FormalArguments.Add(lhs); // The second param which is the dynamic table index of the function to call funCallNode.FormalArguments.Add(rhs); // The array dimensions ProtoCore.AST.AssociativeAST.ExprListNode arrayDimExperList = new ProtoCore.AST.AssociativeAST.ExprListNode(); int dimCount = 0; if (rhsCall.Function is ProtoCore.AST.AssociativeAST.IdentifierNode) { // Number of dimensions ProtoCore.AST.AssociativeAST.IdentifierNode fIdent = rhsCall.Function as ProtoCore.AST.AssociativeAST.IdentifierNode; if (fIdent.ArrayDimensions != null) { arrayDimExperList = ProtoCore.Utils.CoreUtils.BuildArrayExprList(fIdent.ArrayDimensions); dimCount = arrayDimExperList.list.Count; } else if (rhsCall.ArrayDimensions != null) { arrayDimExperList = ProtoCore.Utils.CoreUtils.BuildArrayExprList(rhsCall.ArrayDimensions); dimCount = arrayDimExperList.list.Count; } else { arrayDimExperList = new ProtoCore.AST.AssociativeAST.ExprListNode(); } } funCallNode.FormalArguments.Add(arrayDimExperList); // Number of dimensions ProtoCore.AST.AssociativeAST.IntNode dimNode = new ProtoCore.AST.AssociativeAST.IntNode() { value = dimCount.ToString() }; funCallNode.FormalArguments.Add(dimNode); if (argNum >= 0) { funCallNode.FormalArguments.Add(argList); funCallNode.FormalArguments.Add(new ProtoCore.AST.AssociativeAST.IntNode() { value = argNum.ToString() }); } ProtoCore.AST.AssociativeAST.FunctionDotCallNode funDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode(rhsCall); funDotCallNode.DotCall = funCallNode; funDotCallNode.FunctionCall.Function = rhsCall.Function; // Consider the case of "myClass.Foo(a, b)", we will have "DotCall" being // equal to "myClass" (in terms of its starting line/column), and "rhsCall" // matching with the location of "Foo(a, b)". For execution cursor to cover // this whole statement, the final "DotCall" function call node should // range from "lhs.col" to "rhs.col". // NodeUtils.SetNodeEndLocation(funDotCallNode.DotCall, rhsCall); NodeUtils.CopyNodeLocation(funDotCallNode, funDotCallNode.DotCall); return funDotCallNode; }
} } class B extends A { constructor B() { x = 2; } } ptrA = A.A(); ax = ptrA.x; ptrB = B.B(); bx = ptrB.x; "; ExecutionMirror mirror = thisTest.RunScriptSource(code); Assert.IsTrue((Int64)mirror.GetValue("ax").Payload == 1); Assert.IsTrue((Int64)mirror.GetValue("bx").Payload == 2); } [Test] public void TestClasses05() { String code = @" def sum : double (p : double) { return = p + 10.0; } class Obj { val : var; mx : var; my : var; mz : var; constructor Obj(xx : double, yy : double, zz : double) { mx = xx; my = yy; mz = zz; val = sum(zz); } } p = Obj.Obj(0.0, 1.0, 2.0); x = p.val; "; ExecutionMirror mirror = thisTest.RunScriptSource(code); Assert.IsTrue((double)mirror.GetValue("x").Payload == 12); } [Test] public void TestClasses06() { String code = @" class Point { mx : var; my : var; mz : var; constructor ByCoordinates(x : int, y : int, z : int) { mx = x; my = y; mz = z; } } class BSplineCurve { mpts : var[]; constructor ByPoints(ptsOnCurve : Point[]) { mpts = ptsOnCurve; } } pt1 = Point.ByCoordinates(1,2,3); pt2 = Point.ByCoordinates(4,5,6); pt3 = Point.ByCoordinates(7,8,9); pt4 = Point.ByCoordinates(10,11,12); pt5 = Point.ByCoordinates(15,16,17); pts = {pt1, pt2, pt3, pt4, pt5};
public void TestProtoASTExecute_ArrayIndex_LHS_Assign03() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = 3; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // a[b - 3] = 0; ProtoCore.AST.AssociativeAST.BinaryExpressionNode operation1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.sub); ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode() { Expr = operation1 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( nodeALHS, new ProtoCore.AST.AssociativeAST.IdentifierNode("0"), ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results thisTest.RunASTSource(astList); }
public void GraphILTest_FFIClassUsage_03() { /* def f() { * X = 10; * return = X; * } */ ProtoCore.AST.AssociativeAST.BinaryExpressionNode assign1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("X"), new ProtoCore.AST.AssociativeAST.IntNode(10), ProtoCore.DSASM.Operator.assign); ProtoCore.AST.AssociativeAST.IdentifierNode returnExpr = new ProtoCore.AST.AssociativeAST.IdentifierNode("X"); ProtoCore.AST.AssociativeAST.ReturnNode returnNode = new ProtoCore.AST.AssociativeAST.ReturnNode(); returnNode.ReturnExpr = returnExpr; ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); cbn.Body.Add(assign1); cbn.Body.Add(returnNode); ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode(); funcDefNode.FunctionBody = cbn; funcDefNode.Name = "f"; funcDefNode.ReturnType = new ProtoCore.Type() { Name = "int", UID = (int)ProtoCore.PrimitiveType.kTypeInt, //IsIndexable = false, rank = 0 }; /*Class C { }*/ ProtoCore.AST.AssociativeAST.VarDeclNode varDeclNode = new ProtoCore.AST.AssociativeAST.VarDeclNode(); varDeclNode.Name = "X"; ProtoCore.AST.AssociativeAST.IdentifierNode varDeclId = new ProtoCore.AST.AssociativeAST.IdentifierNode() { Value = "X", Name = "X", datatype = new ProtoCore.Type() { Name = "int", //IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeInt } }; varDeclNode.NameNode = varDeclId; varDeclNode.ArgumentType = new ProtoCore.Type() { Name = "int", //IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeVar }; ProtoCore.AST.AssociativeAST.ClassDeclNode classDeclNode = new ProtoCore.AST.AssociativeAST.ClassDeclNode(); classDeclNode.className = "C"; classDeclNode.funclist.Add(funcDefNode); classDeclNode.varlist.Add(varDeclNode); // p = new C.C(); t = p.f(); val = p.X; ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallP = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallP.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("C"); List<ProtoCore.AST.AssociativeAST.AssociativeNode> listArgs = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); funcCallP.FormalArguments = listArgs; ProtoCore.AST.AssociativeAST.FunctionDotCallNode funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("C", funcCallP); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignP = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("p"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); //p = C.C() ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallT = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallT.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("f"); funcCallT.FormalArguments = listArgs; funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("p", funcCallT); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignT = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("t"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); //t = p.f(); ProtoCore.AST.AssociativeAST.IdentifierListNode idListNode = new ProtoCore.AST.AssociativeAST.IdentifierListNode(); idListNode.LeftNode = new ProtoCore.AST.AssociativeAST.IdentifierNode("p"); idListNode.Optr = ProtoCore.DSASM.Operator.dot; idListNode.RightNode = new ProtoCore.AST.AssociativeAST.IdentifierNode("X"); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignVal = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("val"), idListNode, ProtoCore.DSASM.Operator.assign); List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); astList.Add(classDeclNode); astList.Add(assignP); astList.Add(assignT); astList.Add(assignVal); //============================================== // emit the DS code from the AST tree // // Class C { // X : int // def f() { // x = 2; // return = X; // } // } // p = new C(); // t = p.f(); // val = p.X; //============================================== GraphToDSCompiler.GraphCompiler gc = GraphToDSCompiler.GraphCompiler.CreateInstance(); string code = gc.Emit(astList); //============================================== // Verify the results - get the value of the x property //============================================== ExecutionMirror mirror = thisTest.RunScriptSource(code); Obj o = mirror.GetValue("val"); Assert.IsTrue((Int64)o.Payload == 10); }
public void GraphILTest_FFIClassUsage_04() { /*Class C { * def f: int (X: int, Y:int) { * Z = X + Y + X*Y; * return = Z; * } * } * p = C.C(); * t = p.f(4, 5); */ ProtoCore.AST.AssociativeAST.BinaryExpressionNode assign1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("Z"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("X"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("Y"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("X"), new ProtoCore.AST.AssociativeAST.IdentifierNode("Y"), ProtoCore.DSASM.Operator.mul), ProtoCore.DSASM.Operator.add), ProtoCore.DSASM.Operator.add), ProtoCore.DSASM.Operator.assign); ProtoCore.AST.AssociativeAST.IdentifierNode returnExpr = new ProtoCore.AST.AssociativeAST.IdentifierNode("Z"); ProtoCore.AST.AssociativeAST.ReturnNode returnNode = new ProtoCore.AST.AssociativeAST.ReturnNode(); returnNode.ReturnExpr = returnExpr; /**/ ProtoCore.AST.AssociativeAST.ArgumentSignatureNode argSignatureNode = new ProtoCore.AST.AssociativeAST.ArgumentSignatureNode(); ProtoCore.AST.AssociativeAST.VarDeclNode varDeclNode1 = new ProtoCore.AST.AssociativeAST.VarDeclNode(); ProtoCore.Type type = new ProtoCore.Type(); type.Initialize(); type.Name = "int"; varDeclNode1.ArgumentType = type; ProtoCore.AST.AssociativeAST.IdentifierNode nameNode = new ProtoCore.AST.AssociativeAST.IdentifierNode { Value = "X", Name = "X", datatype = new ProtoCore.Type() { Name = "int", //IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeInt } }; varDeclNode1.NameNode = nameNode; argSignatureNode.AddArgument(varDeclNode1); ProtoCore.AST.AssociativeAST.VarDeclNode varDeclNode2 = new ProtoCore.AST.AssociativeAST.VarDeclNode(); varDeclNode2.ArgumentType = type; ProtoCore.AST.AssociativeAST.IdentifierNode nameNode2 = new ProtoCore.AST.AssociativeAST.IdentifierNode() { Name = "Y", Value = "Y", datatype = new ProtoCore.Type() { Name = "int", //IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeInt } }; varDeclNode2.NameNode = nameNode2; argSignatureNode.AddArgument(varDeclNode2); ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); cbn.Body.Add(assign1); cbn.Body.Add(returnNode); ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode(); funcDefNode.FunctionBody = cbn; funcDefNode.Name = "f"; funcDefNode.Signature = argSignatureNode; funcDefNode.ReturnType = new ProtoCore.Type() { Name = "int", UID = (int)ProtoCore.PrimitiveType.kTypeInt, //IsIndexable = false, rank = 0 }; // C { } ProtoCore.AST.AssociativeAST.ClassDeclNode classDeclNode = new ProtoCore.AST.AssociativeAST.ClassDeclNode(); classDeclNode.className = "C"; classDeclNode.funclist.Add(funcDefNode); //p = C.C() ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallP = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallP.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("C"); List<ProtoCore.AST.AssociativeAST.AssociativeNode> listArgs = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); funcCallP.FormalArguments = listArgs; ProtoCore.AST.AssociativeAST.FunctionDotCallNode funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("C", funcCallP); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignP = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("p"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); // t = p.f(4, 5); ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallT = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallT.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("f"); List<ProtoCore.AST.AssociativeAST.AssociativeNode> listArgs2 = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); listArgs2.Add(new ProtoCore.AST.AssociativeAST.IntNode(4)); listArgs2.Add(new ProtoCore.AST.AssociativeAST.IntNode(5)); funcCallT.FormalArguments = listArgs2; funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("p", funcCallT); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignT = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("t"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); astList.Add(classDeclNode); astList.Add(assignP); astList.Add(assignT); GraphToDSCompiler.GraphCompiler gc = GraphToDSCompiler.GraphCompiler.CreateInstance(); string code = gc.Emit(astList); ExecutionMirror mirror = thisTest.RunScriptSource(code); Obj o = mirror.GetValue("t"); Assert.IsTrue((Int64)o.Payload == 29); } [Test, Ignore] public void GraphNotComputing_Islandnodes_1280() { //deffect IDE-1280 // 1. Create a code block node // 2. Create an identifier // 3. drag and drop a code block node and leave it empty ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void Island_FunctionNode_1282() { // Deffect -1282 // 1. create + node // 2. create a code block and identfier and connect them ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;+;double,double;Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void MultiLineCodeBlock_1285_2() { // 1. Create multiline code block with a=10;b=20; // 2. Create an identifier // 3. Connect the first one to the identifier change the connection to the second the preview doesn not work ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b=20;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_41c765cbe0704cb183ff3a1972315a65 = Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_41c765cbe0704cb183ff3a1972315a65</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b=20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_41c765cbe0704cb183ff3a1972315a65</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=10;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 20); } [Test, Ignore] public void OneInputOutputNodes_1279() { // Deffect -1279 // 1. create a code block and two identifier // 2. connect code block to two identifiers preview for second one does not load ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void RangeNode_InvalidInput_1422() { // Deffect_1422: Incorrect preview value for Range Node when there is no input for End slot. // Create Code Block node with value 1 and another with value of 10. // Drag and drop Range node. // Connect Code Block node with value 1 to start slot of Range node and with value 10 to Increment slot of Range node. // After above step you will get the preview value for Range node starting from 1..10. which is incorrect. Because for Range node, Start and End slots are mandatory and Increment slot is optional. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>10</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>10</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>10</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void Reconnect_CB_DifferentSlot_1294() { // Deffect -1294 // 1. Create multiline code block with a=10; b=20; // 2. Create an identifier // 3. Connect the first one to the identifier change the connection to the second the preview does not work ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7fb75d8fc7824939a3a5518250197444 = Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_7fb75d8fc7824939a3a5518250197444</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_7fb75d8fc7824939a3a5518250197444</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 20); } [Test, Ignore] public void replicationguides_1595() { // Create CBN {1,2} // Create CBN {10,20} // add using + node ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_cfa033b8081444a8be9d3e0e1f268e4a ={1,2};</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_c7c0374ac7fd423a84eef1e7431f357c ={10,20};</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var3;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_cfa033b8081444a8be9d3e0e1f268e4a ={1,2};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_cfa033b8081444a8be9d3e0e1f268e4a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_c7c0374ac7fd423a84eef1e7431f357c ={10,20};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_c7c0374ac7fd423a84eef1e7431f357c</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var3;1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var3;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> level21 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)level21[0].Payload == 11); Assert.IsTrue((Int64)level21[1].Payload == 21); List<Obj> level22 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)level22[0].Payload == 12); Assert.IsTrue((Int64)level22[1].Payload == 22); } [SetUp] public void Setup() { } [Test, Ignore] public void T001_MultipleAssignments() { GraphToDSCompiler.GraphCompiler gc = GraphToDSCompiler.GraphCompiler.CreateInstance(); gc.CreateIdentifierNode(1, "A"); gc.CreateIdentifierNode(2, "B"); gc.CreateIdentifierNode(3, "C"); gc.ConnectNodes(1, 0, 2, 0); gc.ConnectNodes(2, 0, 3, 0); object o1 = 10; gc.CreateLiteralNode(4, o1); gc.ConnectNodes(4, 0, 1, 0); string mmx = gc.PrintGraph(); mmx = mmx.Trim(); ExecutionMirror mirror = thisTest.RunScriptSource(mmx); Obj o = mirror.GetValue("A"); Assert.IsTrue((Int64)o.Payload == 10); } [Test, Ignore] public void T002_TestArrayIndexing() { //1. Create a CBN : a = {1,2} //2. Create another CBN : b = [0]; //3. Connect output of last CBN to input of an identifier 'c' => verify 'c' = 1 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a[0];</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>I268435459</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a[0];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T004_TestSimpleMathNode() { //NOTE to JUN : This test case is failing, though the script generated is as expected. Can you please check what is the // issue with the Mirror here ? // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it => verify the value is '1' ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var1</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var1</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var1</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T005_TestReplicationGuideInCBNUsingAddition() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {3,4}; // 3. Create a CBN : c = a<1> + b<2> // 4. Connect output of last CBN to identifier node 'd' => vrify value is { {4,5}, { 5,6} } ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { 3, 4 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>c = a<1> + b<2>;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>c = a<1> + b<2>;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>d</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>d</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("d"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 2 elements in the top level array Assert.IsTrue(elements.Count == 2); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 4); Assert.IsTrue((Int64)dim1[1].Payload == 5); // Get the array in the second index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 5); Assert.IsTrue((Int64)dim2[1].Payload == 6); } [Test, Ignore] public void T006_TestReplicationGuideInCBNWithUpdate() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {3,4}; // 3. Create a CBN : c = a<1> + b<2> // 4. Connect output of last CBN to identifier node 'd' // 5. Now update a = {2}; => vrify value is { { 5,6} } ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { 3, 4 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>c = a<1> + b<2>;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>c = a<1> + b<2>;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>d</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>d</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("d"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There is 1 element in the top level array Assert.IsTrue(elements.Count == 1); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 5); Assert.IsTrue((Int64)dim1[1].Payload == 6); } [Test, Ignore] public void T007_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEdit() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {-1,4}; // 3. Create a Math.Max node // 4. Connect output of a and b to the 2 inputs of the Max node and connect it's output to an identifier 'c' // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Verify the final output value : { {1,4}, {2,4} } ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435458</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>c</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var4;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 2 elements in the top level array Assert.IsTrue(elements.Count == 2); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 1); Assert.IsTrue((Int64)dim1[1].Payload == 4); // Get the array in the second index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 2); Assert.IsTrue((Int64)dim2[1].Payload == 4); } [Test, Ignore] public void T008_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditAndUndo() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {-1,4}; // 3. Create a Math.Max node // 4. Connect output of a and b to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Now press undo , and the final output value : {1, 4} //Faling due to defect : IDE-1351 Replication guide preview : The replication guide preview is not showing the expected result when Math.Max(a<1>, b<2>) is called ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>c</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)elements[0].Payload == 1); Assert.IsTrue((Int64)elements[1].Payload == 4); } [Test, Ignore] public void T009_TestMathNodeAndDeleteDriverNodeConnection() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Min node and connect output from driver nodes to it // 4. Delete the connection to the driver node '1' = > verify the output of math node is null ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Min;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Min;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Min;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Min;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T010_TestMathNodeAndDeleteDriverNode() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Divrem node and connect output from driver nodes to it // 4. Delete the the driver node '1' = > verify the output of math node is null ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.DivRem;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.DivRem;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.DivRem;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435458</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.DivRem;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T010_VariableDeclarationDependancy_1369() { //1. Create a code block node a= 10 //2. Assign it to Identifier named b //3. create one more code block and assign the value of identifier to it , eg: c= b ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>a = Var2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T011_TestMathNodeAndCreateNewConnection() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it // 4. Now create another driver node, and connect from it's output to the Math node's two inputs // => verify the output of math node is 1.5 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 1.5</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 1.5</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 1.5</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test, Ignore] public void T012_TestMathNodeAndModifyInputs() { // 1. Create a CBN '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it // 4. Now modify the inputs to '-1' and '1.5' and verify the output of the math node = 1.5 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>0</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = -1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1.5</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1.5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test, Ignore] public void T013_TestMathNodeWithRangeNodeUsingReplicationAndEdit() { // 1. Create 2 CBNs, '0' and '2' // 2. Create a driver node '1' // 3. Create a Range node with start = 0, end = 2, increment = 1; // 4. Create a Math.Factorial and pass thr output of range node to it // 5. Create an identifier node and connect output of Math.Factorial node to input of this driver node => var6 // 6. Now create a '+' operator node and connect output of var6, and output of the CBN '2' to it's inputs => var7 // 7. Now edit the input to the range node so that the start = -1 => verify var7 is updated to : {1,3,3,4} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Literal</Type> <Content>2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>0</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Literal</Type> <Content>2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Function</Type> <Content>;+;double,double;Var7;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>;+;double,double;Var7;</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Literal</Type> <Content>2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>2</LocalName> </Connection> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>;+;double,double;Var7;</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>-1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>-1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)elements[0].Payload == 1); Assert.IsTrue((Int64)elements[1].Payload == 3); Assert.IsTrue((Int64)elements[2].Payload == 3); Assert.IsTrue((Int64)elements[3].Payload == 4); } [Test, Ignore] public void T014_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithEdit() { // 1. Create a driver node, rename to 'a' and set its value to 1' // 2. Create a CBN : b = a + 1; // 3. Create an identifier , rename to 'c', and connect output from CBN to it;s input // 4. Create an operator node, and connect output from driver node 'a' and identifier node 'c' to it's inputs // 5. Create Math.Factorial node ( Var5 ) , and connect output from operator node to it's input // 6. Now edit value of 'a' = 2 => verify var5 is updated to : 120 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a + 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a + 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 120); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 5); mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3); } [Test, Ignore] public void T014_VariableDeclarationDependancy_2() { //1. Create two code block nodes assign it + operator //2. Assign it to an identifier Var3 //3. Create one more code block and assign the value of identifier to it , eg: c= Var3 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>10</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>10</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>10</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>b = Var3;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 11); } [Test, Ignore] public void T015_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithRemove() { // 1. Create a driver node, rename to 'a' and set its value to 1' // 2. Create a CBN : b = a + 1; // 3. Create an identifier , rename to 'c', and connect output from CBN to it;s input // 4. Create an operator node, and connect output from driver node 'a' and identifier node 'c' to it's inputs // 5. Create Math.Factorial node ( Var5 ) , and connect output from operator node to it's input // 6. Now remove the driver node 'a' => verify var5 is updated to : null // defect :IDE-1294 deleting a node that was referenced by another does not update the preview ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a + 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a + 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>c</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>Math.dll;Math.Factorial;int;Var5;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435457</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T015_VariableDeclarationDependancy_3() { //1. Create a driver node var1 //2. Create another code block node and assign the same to var2 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = Var1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); } [Test, Ignore] public void T016_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditUndoRedo() { // 1. Create a range node {0,1,2}; // 2. Create a driver node b = 2; // 3. createa CBN : c = b..b+3; // 4. Create a Math.Max node // 4. Connect output of range node and c to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Now press undo once and then press redo and the final output value : {{2,3,4,5}, {2,3,4,5}, {2,3,4,5}} //Faling due to defect : IDE-1388 Update issue with range expressions in CBN ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>Var5 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>b = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>b = 2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>c = b..b + 3;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>b = 2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>c = b..b + 3;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var7;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 4 elements in the top level array Assert.IsTrue(elements.Count == 3); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 2); Assert.IsTrue((Int64)dim1[1].Payload == 3); Assert.IsTrue((Int64)dim1[2].Payload == 4); Assert.IsTrue((Int64)dim1[3].Payload == 5); // Get the array in the lasy index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[2].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 2); Assert.IsTrue((Int64)dim2[1].Payload == 3); Assert.IsTrue((Int64)dim2[2].Payload == 4); Assert.IsTrue((Int64)dim2[3].Payload == 5); } [Test, Ignore] public void T016_VariableDeclarationDependancy_4() { //1. Create a code block node a= 10 //2. Create another code block and assign b=a ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 10); } [Test, Ignore] public void T017_TestDriverNode() { //1. Create a driver node //2. Change the value of variable to a and value to 2 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 2); } [Test, Ignore] public void T017_TestReplicationGuideFromRadialMenuUsingMathFunctionWithInvalidGuidesAndUndoRedo() { // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..4; // 3. Create a Math.Max node // 4. Connect output of 'a' and 'b' to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Then update it to '-1' => we get a warning that the guide is invalid, the the guide remains at '2' // 8. Then update the first replication guide to '2'. so that both guides ar now '2' // 9. Now press undo once and then redo => the final guides should both be '2', and the output : {3,4}; ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..4;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;2,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var3;2,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 3); Assert.IsTrue((Int64)dim1[1].Payload == 4); } [Test, Ignore] public void T018_TestDriverNode() { //1. Create a code block node and assign value 1 //2. Create a driver node //3. Change the value of driver node to variable a //4. Assign it to identifier - Var3 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = a</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T018_TestReplicationGuide_SingletonAndCollection_TestCaseDefect_IDE_1397() { // 1. Create a CBN : 0; // 2. Create a CBN : a = {0,1}; // 3. Create a '+' node // 4. Connect output of CBN '0' and 'a' to the 2 inputs of the '+' node // 5. Click on the top right hand corner of the '+' node and then click once on the 'Replication Guide' item on the radial menu // 6. Replication guides <1> are added to both inputs // => verify the final output should be {0} // Failing due to defect : IDE-1397 Replication guide : When replication guide is applied on a singleton and collection, the output is not as expected ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;+;double,double;Var1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>b = { 0, 1 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;+;double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>0</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;+;double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>b = { 0, 1 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;+;double,double;Var1;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 0); } [Test, Ignore] public void T019_TestDriverNodeDeletion() { //1. Create a driver node //2. Assign it to identifier - Var2 //3. Connect them //4. Delete the driver node ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435457</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T019_TestRangeExpressionValueWithEdits() { // 1. Create a Range Expression : 0..2..1; // 2. Then edit end to '0' // 3. Then edit increment to '-1' // 4. Then edit start to '2' // 5. Then edit end to '0' // Verify the final value = {2, 1, 0 } ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = 1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>Var4 = -1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var4</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Var2 = 2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 2); Assert.IsTrue((Int64)dim1[1].Payload == 1); Assert.IsTrue((Int64)dim1[2].Payload == 0); } [Test, Ignore] public void T020_DriverNodeArray_TestCaseDefect_IDE_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 //Steps : Create a driver node - Var 1 - {0,1} => verify the valye is null, as this is will throw a compiler error ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6b346f4b6d6248d88154a0740a4a5c79 = Var2</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T020_TestIdentifierValueWithEdits() { // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..7; // 3. Create a '+' node and connect 'a' and 'b' to it // 4. Then edit the CBN to finally have a = {1,2} and b = {2,1} and then add replication guides <1> and <2> respectively // Verify the final value = {{3,2},{4,3}} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..7;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..7;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;1,¡1,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;1,¡2,¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 2..1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 3); Assert.IsTrue((Int64)dim1[1].Payload == 2); // Get the array in the lasy index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 4); Assert.IsTrue((Int64)dim2[1].Payload == 3); } [Test, Ignore] public void T021_DeleteConnection() { //1. Create a code block and assign it to identifier node named var2 //2. Delete the connection between the codeblock and identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T021_TestFunctionNodeValueWithEdits_TestCaseDefect_DNL_1467667() { //Failing due to defect :DNL-1467667 Replication on heterogeneous array causes unintended type conversion // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..7; // 3. Create a 'Math.Max(n1,n2)' node (Var3 ) and connect 'a' and 'b' to it // 4. Then edit the CBN to finally have a = {0, 3, 2} and b = {-1,4.5} // 5. Now add another Math.Max : Var4(d1,d2) // Verify the final value = {0,4.5} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..7;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;int,int;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 3..7;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 0, 3, 8 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4.5 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 0, 3, 8 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>Math.dll;Math.Max;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = { - 1, 4.5 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 0); Assert.IsTrue((Int64)dim1[1].Payload == 5); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> dim2 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim2[0].Payload == 0); Assert.IsTrue((Int64)dim2[1].Payload == 4.5); } [Test, Ignore] public void T022_DeleteConnection_1395() { //1. Create two code block nodes and assign it + operator //2. Connect the + operator node to identifier named Var4 //3. Delete connection between the + and identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>2</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T023_DeleteConnection_Undo() { //1. Create a code block and assign it to identifier node named var2 //2. Delete the connection between the codeblock and identifier //3. Undo ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T024_DeleteConnection_CBN2() { // 1. Create a code block node with expression a=1 and conenct it to identifier // 2. Delete connection ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T025_MultipleOutput_DeleteConnection() { // 1. Create a code block node a=1 and connect it two identifiers // 2. Delete one connection and the preview does not udpate for identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T026_Unsuccessful_1402() { //1. create a code block node with value "@#" //2. create another code blcok node with value 1 and connect it to identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_c54206568ca342fdb0f1442fdfe9a3c6 =1;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_2a3ab1a72d1740209ba5d2a786b01ba1 = Var3</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_c54206568ca342fdb0f1442fdfe9a3c6 =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_c54206568ca342fdb0f1442fdfe9a3c6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_2a3ab1a72d1740209ba5d2a786b01ba1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T026_Unsuccessful_1402_2() { //1. create a code block node with value "@#" //2. create another code blcok node with value 1 and connect it to identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T026_Unsuccessful_1402_3() { //1. create a code block node with value "@#" //3. create an identifier var 3 - it shoule be null //2. create another code blcok node with value 1 and connect it to identifier ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Literal</Type> <Content>1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test, Ignore] public void T027_ChainedAssignment() { // 1. Create a code block node // 2. Create another code block with chanined assignment a=b=1 // 3. Edit first node to b ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>Your code goes here</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = b = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>b</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T028_DriverNodeExpression() { //1. Create a driver node - Var 1 - 0; ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 0</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>Var3 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>c = 0</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); } [Test, Ignore] public void T029_DriverArray() { //1. Create a driver node - Var 1 - {0,1} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = 0</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = {0,1}</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>Var1 = {0,1}</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == 0); Assert.IsTrue((Int64)var1[1].Payload == 1); } [Test, Ignore] public void T030_MultilineCodeblock() { // 1. Create a codeblock with multiple lines a =10 and b=20 // 2. Connect it to + operator and connect to it => verify its value = 30 // create anoher identifier and connect from first output of CBN to it => verify its value = 10 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var2;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>Custom nodes;+;double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_545821d361c3496b8dc9550552f06d55 = Var3</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 10; b = 20;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_545821d361c3496b8dc9550552f06d55</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 30); } [Test, Ignore] public void T030_TestValuesFromTwoOutputsOfCBN() { // IDE-1332 // 1. Create a CBN like this : "a = 1; b = 2;" // 2. Create 2 identifier nodes : Var2 and Var3 // 3. Connect the output of the first output slot of the CBN to identifier 'Var2' : verify Var2 = 1; // 4. Connect the output of the second output slot of the CBN to identifier 'Var3' : verify Var3 = 2; ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 2); } [Test, Ignore] public void T031_TestValuesFromTwoOutputsOfCBN_DoubleAndCollectionValues() { // IDE-1332 // 1. Create a CBN like this : "aa = 1.5; bb = 0..3;" // 2. Create 2 identifier nodes : a and b // 3. Connect the output of the first output slot of the CBN to identifier 'a' : verify a = 1.5; // 4. Connect the output of the second output slot of the CBN to identifier 'b' : verify b = {0,1,2,3}; ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>b</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>aa = 1.5; bb = 0..3;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Identifier</Type> <Content>a</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>aa = 1.5; bb = 0..3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>aa</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>b</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>aa = 1.5; bb = 0..3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>aa</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>bb</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); mirror = liveRunner.QueryNodeValue("b"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == 0); Assert.IsTrue((Int64)var1[1].Payload == 1); Assert.IsTrue((Int64)var1[2].Payload == 2); Assert.IsTrue((Int64)var1[3].Payload == 3); } [Test, Ignore] public void T032_TestValuesFrom4OutputsOfCBN_DoubleIntBoolCollectionValues() { // IDE-1332 // 1. Create a CBN : x = 0; // 2. Create another CBN like this : // " a = 1 + 2; // b = { - 1, 2.5, true }; // c = x; // d = { 0..1, 3..4 };" // 2. Create 4 identifier nodes and connect output from the 4 outputs nodes of the CBN to each of the identifiers and verify the outputs // Var3 = 3, Var4 = {-1,2.5,true}, Var5 = 0; Var6 = {{0,1},{3,4}} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>x = 0;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 1 + 2; b = { - 1, 2.5, true }; c = x; d = { 0..1, 3..4 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 1 + 2; b = { - 1, 2.5, true }; c = x; d = { 0..1, 3..4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 1 + 2; b = { - 1, 2.5, true }; c = x; d = { 0..1, 3..4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 1 + 2; b = { - 1, 2.5, true }; c = x; d = { 0..1, 3..4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>3</OtherIndex> <LocalName>Var6</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 1 + 2; b = { - 1, 2.5, true }; c = x; d = { 0..1, 3..4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>d</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == -1); Assert.IsTrue((Double)var1[1].Payload == 2.5); Assert.IsTrue((Boolean)var1[2].Payload == true); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var6"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 0); Assert.IsTrue((Int64)dim1[1].Payload == 1); List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 3); Assert.IsTrue((Int64)dim2[1].Payload == 4); } [Test, Ignore] public void T033_ImplicitConnection() { // 1. create a code block node a=1; // 2. create another code block node b=a // 3. connect the second cbn to identifier - verify value is 1 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>true</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>true</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_4611287a962d4ee99e7397e61ccd6a05 = Var3</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>true</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_4611287a962d4ee99e7397e61ccd6a05</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T034_RangeExpression_1444() { //1. Create three code block nodes a =1, b=1 and c=10 //2. Create range block node //3. Connect a to start , b to Increment and c to End ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_775950218efa4a63abdc52b2c811bda3 =1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_723d412ebb8d4a149cabfce1cafec095 =10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_626993228aac45b1a6ee3d2f6dd15b1f =1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_723d412ebb8d4a149cabfce1cafec095 =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_723d412ebb8d4a149cabfce1cafec095</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_775950218efa4a63abdc52b2c811bda3 =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_775950218efa4a63abdc52b2c811bda3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_626993228aac45b1a6ee3d2f6dd15b1f =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_626993228aac45b1a6ee3d2f6dd15b1f</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;Range;double,double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); Assert.IsTrue((Int64)var1[0].Payload == 1); Assert.IsTrue((Int64)var1[1].Payload == 2); Assert.IsTrue((Int64)var1[2].Payload == 3); Assert.IsTrue((Int64)var1[3].Payload == 4); Assert.IsTrue((Int64)var1[4].Payload == 5); Assert.IsTrue((Int64)var1[5].Payload == 6); Assert.IsTrue((Int64)var1[6].Payload == 7); Assert.IsTrue((Int64)var1[7].Payload == 8); Assert.IsTrue((Int64)var1[8].Payload == 9); Assert.IsTrue((Int64)var1[9].Payload == 10); } [Test, Ignore] public void T035_IDE_1322() { //1. Create CBN : 34 // 2. Create CBN : a = 33; b = 4; // 3. Create '+' nodea nd connect teh 2 CBN to it. //=> verify output of '+' node: 38 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>34</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 33; b = 4;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Literal</Type> <Content>34</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>34</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a = 33; b = 4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 38); } [Test, Ignore] public void T035_IDE_1322_2() { // 1. Create CBN : a = 1; 1+1; // 2. Create CBN : 1; // 3. Create '+' node and connect the 2nd output of 1st CBN and the second CBN to this '+' node //=> verify output of '+' node: 3 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b= 1+1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_ebc82ad516e74bda98ec76fc22b22387 =1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b= 1+1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_ebc82ad516e74bda98ec76fc22b22387 =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_ebc82ad516e74bda98ec76fc22b22387</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 3); } [Test, Ignore] public void T035_IDE_1322_3() { // 1. Create CBN : a = 1..5; 1..2..#2 // 2. Create CBN : 1..3 // 3. Create '+' node and connect the 2nd output of 1st CBN and the second CBN to this '+' node // 4. Now update the second output of the CBN to : 0..2..#3 // => verify updated output of '+' node: {1, 3, 5} ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_16e93157454549169aad76c0054a7104 =1..5; _temp_bfc14c7ea2f44242beccd36d7e95cec9 =1..2..#2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7915297080f746c88e41148fe2f59fc8 =1..3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_16e93157454549169aad76c0054a7104 =1..5; _temp_bfc14c7ea2f44242beccd36d7e95cec9 =1..2..#2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_bfc14c7ea2f44242beccd36d7e95cec9</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7915297080f746c88e41148fe2f59fc8 =1..3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_7915297080f746c88e41148fe2f59fc8</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_2193dfe5f23145748bf29a21c56c66a4 =1..5; _temp_78899b67fdb44c50929b7a7539a94aa4 =0..2..#3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_78899b67fdb44c50929b7a7539a94aa4</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[1].Payload == 3); Assert.IsTrue((Int64)var3[2].Payload == 5); } [Test, Ignore] public void T036_IDE_1314() { //1. Create CBN : a = 1; b= 2; //2. Create '+' node and connect 'a' and 'b' to it's 2 inputs. //=> verify output of '+' node: 3 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>;+;double,double;Var2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>;+;double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>;+;double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b = 2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 3); } [Test, Ignore] public void T037_IDE_1585() { // 1. Create CBN : a=1; // 2. Create CBN : a; // 3. Undo // 4. Redo //=> verify preview for CBN: a. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7d5156d007ed444599622f5b78c93d23 =a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435458</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7d5156d007ed444599622f5b78c93d23 =a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T038_IDE_1596() { // 1. Create CBN : a=1; // 2. Create CBN : a =2; // 3. Update second CBN to : b=2; //=> verify preview for first CBN: a=1. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content /> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a=2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>b = 2;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T039_IDE_1230() { // 1. Create CBN : a={1,2,3};a[0] =4; a[1]=5; // 2. Create 2 Identifier nodes and connect output of second and third line of CBN to input of each Identifier. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a= {1,2,3};</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2, 3 }; a[0] = 4; a[1] = 5; </Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2, 3 }; a[0] = 4; a[1] = 5; </Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a[0]</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = { 1, 2, 3 }; a[0] = 4; a[1] = 5; </Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a[0]</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a[1]</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 4); mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 5); } [Test, Ignore] public void T040_IDE_1325() { // 1. Create CBN : 4+4; 1..20..2; {1,3,5..} //2. Create 3 Identifier nodes and connect 3 outputs of CBN to each Identifier. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_67f79a67ccb64b1f8760b026121734e3 =4+4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_002481af113845c492dbcc172fcf174b =4 + 4; _temp_8265170dfe894a589d28cedb1efc6692 =1..20..2; _temp_8a105247ee644581b128af56cdde34cc ={1,3,7,9,10,-1};</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_002481af113845c492dbcc172fcf174b =4 + 4; _temp_8265170dfe894a589d28cedb1efc6692 =1..20..2; _temp_8a105247ee644581b128af56cdde34cc ={1,3,7,9,10,-1};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_002481af113845c492dbcc172fcf174b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_002481af113845c492dbcc172fcf174b =4 + 4; _temp_8265170dfe894a589d28cedb1efc6692 =1..20..2; _temp_8a105247ee644581b128af56cdde34cc ={1,3,7,9,10,-1};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_002481af113845c492dbcc172fcf174b</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8265170dfe894a589d28cedb1efc6692</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_002481af113845c492dbcc172fcf174b =4 + 4; _temp_8265170dfe894a589d28cedb1efc6692 =1..20..2; _temp_8a105247ee644581b128af56cdde34cc ={1,3,7,9,10,-1};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_002481af113845c492dbcc172fcf174b</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8265170dfe894a589d28cedb1efc6692</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8a105247ee644581b128af56cdde34cc</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 8); mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[9].Payload == 19); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var4 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var4[0].Payload == 1); Assert.IsTrue((Int64)var4[5].Payload == -1); } [Test, Ignore] public void T040_IDE_1325_2() { // 1. Create CBN : a = 1 // 2. Create a nother CBN : a // 3. Create another CBN : a + 1 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6355b0e3126a459ab5c334471dc933ea =a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_d22fb60f190d438d878b89bbe6ade1b2 =a +1;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6355b0e3126a459ab5c334471dc933ea =a;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_6355b0e3126a459ab5c334471dc933ea</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_d22fb60f190d438d878b89bbe6ade1b2 =a +1;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_d22fb60f190d438d878b89bbe6ade1b2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 2); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T041_IDE_1450() { // Create CBN : 1..5 // Create CBN : 1..5..#3 // Create CBN : 1/2 // Create CBN : 0.56 // Create CBN : -1 // connect these CBN s to 5 variables and verify the values ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_278372ff227e4e768b3cb278ef218d9c =1..5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6f00fac5668e4e22a6256e1fb69494fb =1..5..#3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_267484a8021747bb88f96cdaf7ec8860 =-1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_16b5cea988284869bc9d88a464c89cb5 =0.56;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_1f8fa038785f4e5e8290bc1b28bccbd2 =1/2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Identifier</Type> <Content>Var7</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>Identifier</Type> <Content>Var8</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435465</Id> <Type>Identifier</Type> <Content>Var9</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435466</Id> <Type>Identifier</Type> <Content>Var10</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_1f8fa038785f4e5e8290bc1b28bccbd2 =1/2;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_1f8fa038785f4e5e8290bc1b28bccbd2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Identifier</Type> <Content>Var7</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_16b5cea988284869bc9d88a464c89cb5 =0.56;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_16b5cea988284869bc9d88a464c89cb5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435464</Id> <Type>Identifier</Type> <Content>Var8</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_278372ff227e4e768b3cb278ef218d9c =1..5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_278372ff227e4e768b3cb278ef218d9c</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435465</Id> <Type>Identifier</Type> <Content>Var9</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6f00fac5668e4e22a6256e1fb69494fb =1..5..#3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_6f00fac5668e4e22a6256e1fb69494fb</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435466</Id> <Type>Identifier</Type> <Content>Var10</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var10</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_267484a8021747bb88f96cdaf7ec8860 =-1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_267484a8021747bb88f96cdaf7ec8860</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((Double)mirror.GetData().GetStackValue().opdata == 1 / 2); mirror = liveRunner.QueryNodeValue("Var7"); Assert.IsTrue((Double)mirror.GetData().GetStackValue().opdata_d == 0.56); mirror = liveRunner.QueryNodeValue("Var10"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == -1); mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var8[0].Payload == 1); Assert.IsTrue((Int64)var8[4].Payload == 5); mirror = liveRunner.QueryNodeValue("Var9"); List<Obj> var9 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var9[0].Payload == 1); Assert.IsTrue((Int64)var9[2].Payload == 5); } [Test, Ignore] public void T042_IDE_1447() { // Create CBN : a = 1..2; b = a+1; // Create CBN : 1 // Create + : a + 1 // Create + : b + 1; // Create + : a + b // verify the values ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2; b = a+1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e =1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2; b = a+1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>;+;double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2; b = a+1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9ee0f4815f4e46bf9581a4c7ae1faf8e</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>;+;double,double;Var5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>;+;double,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2; b = a+1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>;+;double,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..2; b = a+1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 2); Assert.IsTrue((Int64)var3[1].Payload == 3); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var4 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var4[0].Payload == 3); Assert.IsTrue((Int64)var4[1].Payload == 4); mirror = liveRunner.QueryNodeValue("Var5"); List<Obj> var5 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var5[0].Payload == 3); Assert.IsTrue((Int64)var5[1].Payload == 5); } [Test, Ignore] public void T043_IDE_1616() { // create a CBN : '0' // Create a Point.ByCoordinates and connect the '0' to it's 3 inputs // Click on the 'X' property of the Point and a new identifier Var3 is created with preview '0' // Now create another identifier Var4 and connect Var3 to it. It's preview should be '0' now. // Now create a CBN : a = Var3; => It's preview should also be 0 // Now update the the first CBN to 10. Verify Var3, Var4 and a are all '10' now ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b08ed803a3fc41d499183abb232667fe =0;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b08ed803a3fc41d499183abb232667fe =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b08ed803a3fc41d499183abb232667fe =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b08ed803a3fc41d499183abb232667fe =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b08ed803a3fc41d499183abb232667fe</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_181ca06eede34e0da196a7ac8f20fe87 = Var4</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_181ca06eede34e0da196a7ac8f20fe87</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>a = Var3;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>true</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>true</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_9e2e58b7bd6d4af8bbd5285948d4b518 =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_9e2e58b7bd6d4af8bbd5285948d4b518</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9e2e58b7bd6d4af8bbd5285948d4b518</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_9e2e58b7bd6d4af8bbd5285948d4b518</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); } [Test, Ignore] public void T044_PreviewAfterUndoRedo() { // Create CBN a=1 -> Undo ->Redo ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435457</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T045_preview_MultilineCBN_TestCaseDefect_1678() { //Failing defect : 1678 // 1. Create a mutliline CBN with value 1;2;a+b // 2. create a Node a=1 // 3. Create another node b=13. the preview for CBN 'a' is not displayed ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_46fdbbe294584dfb8465c84fcdadb768 =1; _temp_a7701c726cd14e67894e4b8f2523575a =2; _temp_d2cd3bfc36084850866e6a9cf1b50f49 =a+b;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_46fdbbe294584dfb8465c84fcdadb768 =1; _temp_a7701c726cd14e67894e4b8f2523575a =2; _temp_d2cd3bfc36084850866e6a9cf1b50f49 =a+b;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>b=1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_46fdbbe294584dfb8465c84fcdadb768 =1; _temp_a7701c726cd14e67894e4b8f2523575a =2; _temp_d2cd3bfc36084850866e6a9cf1b50f49 =a+b;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T046_IDE_1676() { // 1. Create a Math.Abs node with input '0' // 2. Create another Math.Abs node with input '1.5' // 3. Now delete the first Math.Abs and verify the preview for the second is still 1.5 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_a69250a1c35940a2aa6e890b4dceb09e =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>Math.dll;Math.Abs;int;Var2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_a69250a1c35940a2aa6e890b4dceb09e =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_a69250a1c35940a2aa6e890b4dceb09e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>Math.dll;Math.Abs;int;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Abs;int;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_3235dea761d84808bff08fcc064dd4cd =1.5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_3235dea761d84808bff08fcc064dd4cd =1.5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_3235dea761d84808bff08fcc064dd4cd</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>Math.dll;Math.Abs;int;Var3;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435458</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_a69250a1c35940a2aa6e890b4dceb09e =0;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test, Ignore] public void T047_IDE_1603_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // 1. Create 2 Point nodes and a line from it // 2. Verify the Length property from the radial menu : 10 // 3. Createa surface from it using ExtrudeAsSurface(line, 10, Vector.ByCoordinates(0,0,1)) : verify area = 100 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;;;;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_789f8bf74bbe4ce480ff1d6a934b128b =0;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_789f8bf74bbe4ce480ff1d6a934b128b =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;;;;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_789f8bf74bbe4ce480ff1d6a934b128b =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;;;;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_789f8bf74bbe4ce480ff1d6a934b128b =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_789f8bf74bbe4ce480ff1d6a934b128b</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;;;;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_90c25e5504f945e494500dcbd62d4fd2 =10; _temp_7363ab3808814192ad1c2000a7d006f9 =0;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_90c25e5504f945e494500dcbd62d4fd2 =10; _temp_7363ab3808814192ad1c2000a7d006f9 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_90c25e5504f945e494500dcbd62d4fd2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_90c25e5504f945e494500dcbd62d4fd2 =10; _temp_7363ab3808814192ad1c2000a7d006f9 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_90c25e5504f945e494500dcbd62d4fd2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_7363ab3808814192ad1c2000a7d006f9</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_90c25e5504f945e494500dcbd62d4fd2 =10; _temp_7363ab3808814192ad1c2000a7d006f9 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_90c25e5504f945e494500dcbd62d4fd2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_7363ab3808814192ad1c2000a7d006f9</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_7363ab3808814192ad1c2000a7d006f9</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;;;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;;;;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;;;;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Length;Var6</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;ExtrudeAsSurface;Curve,double,Vector;Var7;;;;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;;;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>CodeBlock</Type> <Content>_temp_20fd4f63664c4b19bb8d6e43f5fd92d8 =10;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435464</Id> <Type>CodeBlock</Type> <Content>_temp_20fd4f63664c4b19bb8d6e43f5fd92d8 =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_20fd4f63664c4b19bb8d6e43f5fd92d8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435463</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;ExtrudeAsSurface;Curve,double,Vector;Var7;;;;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435465</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Vector.ByCoordinateArrayN;double;Var9;;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>_temp_20b14e583a49400a93ea27d816b0ac1a ={0,0,1};</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>_temp_20b14e583a49400a93ea27d816b0ac1a ={0,0,1};</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_20b14e583a49400a93ea27d816b0ac1a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435465</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Vector.ByCoordinateArrayN;double;Var9;;</Content> <InputList> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435465</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Vector.ByCoordinateArrayN;double;Var9;;</Content> <InputList> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var9</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435463</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;ExtrudeAsSurface;Curve,double,Vector;Var7;;;;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435467</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Area;Var11</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var11</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;ExtrudeAsSurface;Curve,double,Vector;Var7;;;;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 10.0); mirror = liveRunner.QueryNodeValue("Var11"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 100.0); } [Test, Ignore] public void T048_IDE_1695_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Create two Point nodes. // Connect two point nodes to CBN with values like (0,0,0) and another point ode should have (10,0,0) // Create ByStartPointEndPoint node from Line class and connect above two points to it. // Access PointAtParameter from Line node. // create CBn with value 0.5 and connect it to input of ParameterAtPoint node. // Access property X from ParameterAtPoint node. // Verify that the preview for X node should be 5.0 GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_7154967ca42c4ecdb4ca99163978dd7e =10;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_7154967ca42c4ecdb4ca99163978dd7e =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_7154967ca42c4ecdb4ca99163978dd7e</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_e10f9f088d414156ab8e550189babfb8 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_e10f9f088d414156ab8e550189babfb8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;PointAtParameter;Curve,double;Var6;¡¡</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>CodeBlock</Type> <Content>_temp_80877013b1444b7c9850ee4d1f3b2918 =0.5;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>CodeBlock</Type> <Content>_temp_80877013b1444b7c9850ee4d1f3b2918 =0.5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_80877013b1444b7c9850ee4d1f3b2918</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;PointAtParameter;Curve,double;Var6;¡¡</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var8</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;PointAtParameter;Curve,double;Var6;¡¡</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 5.0); } [Test, Ignore] public void T049_IDE_1721() { // 1. Creata a CBN 1 // 2. Assign it to another CBN. preview is expected here // 3. Assign to another identifier and vrify it's value = 1 // 4. create another CBN : c = 2; b = 1; and verify value of 'b' = 1 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_be9197b3214548fe8d0a9bad86716f41 =1;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_8e7194f9d8274440b7264a372f80ace3 =a;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_be9197b3214548fe8d0a9bad86716f41 =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_be9197b3214548fe8d0a9bad86716f41</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a ;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8e7194f9d8274440b7264a372f80ace3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_91d9f528cc934e96a31014036f5926b4 = Var3</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a ;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8e7194f9d8274440b7264a372f80ace3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_91d9f528cc934e96a31014036f5926b4</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>c = 2; b =a;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>true</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a ;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8e7194f9d8274440b7264a372f80ace3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> <IsImplicit>true</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test, Ignore] public void T050_IDE_1614() { // Create CBN // a = 1..10..2; // b = a * 2; // b[1] = b[1] + 3; // Connect first two line to Identifier nodes. // Now add few more identifier nodes to Canvas and verify that value for "b" shouldn't change. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..4; b=a*2; b[1] = b[1] +3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_77f6486d4cbf49b089065c281e698496 = Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..4; b=a*2; b[1] = b[1] +3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_77f6486d4cbf49b089065c281e698496</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_63b4d68ccf974511a207ed82b348d02a = Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..4; b=a*2; b[1] = b[1] +3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_63b4d68ccf974511a207ed82b348d02a</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_c54bfed8abbb4cf2a733599033756859 = Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_4ef58423dc764c1e975a4da45d846bda = Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_6f7cedd5397244208d60690a9df218bd = Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 2); Assert.IsTrue((Int64)var3[1].Payload == 7); Assert.IsTrue((Int64)var3[2].Payload == 6); Assert.IsTrue((Int64)var3[3].Payload == 8); } [Ignore] public void T051_CoordinateSystemPropertytest() { // Create CBN for each line below. // scale = { 2, 3, 4 }; // rotation = { 180, 0, 0 }; // rsequence = { 3, 2, 1 }; // translationVector = { 5, 5, 0 }; // true; // Now drag and drop ByUniversalTransform (first node) from CoordianteSystem and coonec all above respective nodes to CoordianteSystem node. // Now access ScalFactors property from CoordinateSystem node and verify its preview. ( it should return {2,3,4}) ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Scale;CoordinateSystem, double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_a3e9bc42a4c54f73846f3eb4ac93c8bf =3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_a3e9bc42a4c54f73846f3eb4ac93c8bf =3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_a3e9bc42a4c54f73846f3eb4ac93c8bf</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Scale;CoordinateSystem, double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;ScaleFactors;Var5</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Scale;CoordinateSystem, double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435457</RemovedNodeIDs> <RemovedNodeIDs>268435458</RemovedNodeIDs> <RemovedNodeIDs>268435459</RemovedNodeIDs> <RemovedNodeIDs>268435460</RemovedNodeIDs> <RemovedNodeIDs>268435461</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>scale = { 2, 3, 4 }; rotation = { 180, 0, 0 }; rsequence = { 3, 2, 1 }; translationVector = { 5, 5, 0 }; //========================================================================== //Create CoordinateSystem using constructor: ByUniversalTransform myCS = CoordinateSystem.ByUniversalTransform(WCS, scale, rotation, rsequence, translationVector, true);</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>scale = { 2, 3, 4 }; rotation = { 180, 0, 0 }; rsequence = { 3, 2, 1 }; translationVector = { 5, 5, 0 }; myCS = CoordinateSystem.ByUniversalTransform(WCS, scale, rotation, rsequence, translationVector, true);</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>WCS = CoordinateSystem.Identity(); scale = { 2, 3, 4 }; rotation = { 180, 0, 0 }; rsequence = { 3, 2, 1 }; translationVector = { 5, 5, 0 }; myCS = CoordinateSystem.ByUniversalTransform(WCS, scale, rotation, rsequence, translationVector, true);</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var7</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435469</Id> <Type>CodeBlock</Type> <Content>_temp_959a572063174b849a901c043a92f298 =true;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435469</Id> <Type>CodeBlock</Type> <Content>_temp_959a572063174b849a901c043a92f298 =true;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>5</OtherIndex> <LocalName>_temp_959a572063174b849a901c043a92f298</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435462</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435464</Id> <Type>CodeBlock</Type> <Content>scale = { 2, 3, 4 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>scale</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>rsequence = { 3, 2, 1 };</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435465</Id> <Type>CodeBlock</Type> <Content>rotation = { 180, 0, 0 };</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435467</Id> <Type>CodeBlock</Type> <Content>translationVector = { 5, 5, 0 };</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var7</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435465</Id> <Type>CodeBlock</Type> <Content>rotation = { 180, 0, 0 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>rotation</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>rsequence = { 3, 2, 1 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>3</OtherIndex> <LocalName>rsequence</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435467</Id> <Type>CodeBlock</Type> <Content>translationVector = { 5, 5, 0 };</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>4</OtherIndex> <LocalName>translationVector</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>4</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435470</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;ScaleFactors;Var14</Content> <InputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435468</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;CoordinateSystem.ByUniversalTransform;CoordinateSystem,double,double,int,Vector,bool;Var12;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>4</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>5</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435470</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var14"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> level21 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)level21[0].Payload == 2); Assert.IsTrue((Int64)level21[1].Payload == 3); Assert.IsTrue((Int64)level21[2].Payload == 4); } [Test, Ignore] public void T051_IDE_1445() { // 1. Create a CBN : a = 1; // 2. Update the CBN : b = a + 1; ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1; b=a+1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 2); } [Test, Ignore] public void T052_IDE_1754_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Create Line of length 10 and then Reverse it. After reversing access its Start Point and on Start Point access its property X. // Verify that the value preview for X should be 10. Right now it is coming 0. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_40f19cda329046e584d70d541afae325 =10;</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_40f19cda329046e584d70d541afae325 =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_40f19cda329046e584d70d541afae325</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b8a37a72ee004fdf9bed63a3866e52bb =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b8a37a72ee004fdf9bed63a3866e52bb</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList /> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;¡¡¡</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Reverse;Curve;Var6;¡</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointEndPoint;Point,Point;Var5;¡¡</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;StartPoint;Var7</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Reverse;Curve;Var6;¡</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var6</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var8</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> <UndefinedVariables /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;StartPoint;Var7</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> <UndefinedVariables /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 10.0); } [Test, Ignore] public void T053_IDE_1737() { // Drag and drop Range and Identifier node. // Connect output of Range node to input of Identifier node. // Now create CBn with value 0;10;. // Now connect 0 to start and 10 to end slot of Range node. // After above step preview for Range node is coming but there is no preview for Identifier node. (If we create another Identifier node and then connecting it to Range node is displaying correct preview.) So this problem only happens if Identifier node connected before connecting input of Range node. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>User defined;Range.ByIncrementValue;double,double,double;Var1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_0a143187031341a88b1bb07cf7aad9d2 = Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>User defined;Range.ByIncrementValue;double,double,double;Var1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_0a143187031341a88b1bb07cf7aad9d2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b50adfd6c1964b9e888147c4bfd02939 =0; _temp_76d945a4215f45be83847b5969f0f994 =4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b50adfd6c1964b9e888147c4bfd02939 =0; _temp_76d945a4215f45be83847b5969f0f994 =4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b50adfd6c1964b9e888147c4bfd02939</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>User defined;Range.ByIncrementValue;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_b50adfd6c1964b9e888147c4bfd02939 =0; _temp_76d945a4215f45be83847b5969f0f994 =4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b50adfd6c1964b9e888147c4bfd02939</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_76d945a4215f45be83847b5969f0f994</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>User defined;Range.ByIncrementValue;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); List<Obj> var2 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var2[0].Payload == 0); Assert.IsTrue((Int64)var2[1].Payload == 1); Assert.IsTrue((Int64)var2[2].Payload == 2); Assert.IsTrue((Int64)var2[3].Payload == 3); Assert.IsTrue((Int64)var2[4].Payload == 4); } [Test, Ignore] public void T054_IDE_1770() { // create a CBN : count = 10 // create another cbn : 0..10..#count // create two more cbns : 0 and 0 // create another cbn : 10..0..#count; // => verify the values of the first and last cbns ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>count = 10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_1c66eb785c84475eac065c92fbc64821 =0..10..#count;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_6d6063987f2146c0b42ed88bc880eecc =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_4a1c2b685bbd4f2c84eaddc780f0aabd =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_f74fc460037e4eb69b4af81de754b25c =10..0..#count;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>CodeBlock</Type> <Content>_temp_5f2722ff771646819d52d4881abaf797 = Var7</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>CodeBlock</Type> <Content>_temp_a3dbbc3d45604fae91fd537b424fc0ae = Var8</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_1c66eb785c84475eac065c92fbc64821 =0..10..#count;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_1c66eb785c84475eac065c92fbc64821</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435463</Id> <Type>Identifier</Type> <Content>Var7</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_5f2722ff771646819d52d4881abaf797</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_f74fc460037e4eb69b4af81de754b25c =10..0..#count;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_f74fc460037e4eb69b4af81de754b25c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435464</Id> <Type>Identifier</Type> <Content>Var8</Content> <InputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_a3dbbc3d45604fae91fd537b424fc0ae</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> var7 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var7.Count == 10); Assert.IsTrue((Double)var7[0].Payload == 0); Assert.IsTrue((Double)var7[1].Payload == 1.1111111111111112); Assert.IsTrue((Double)var7[9].Payload == 10); mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var8.Count == 10); Assert.IsTrue((Double)var8[0].Payload == 10); Assert.IsTrue((Double)var8[1].Payload == 8.8888888888888875); Assert.IsTrue((Double)var8[9].Payload == 0); } [Test, Ignore] public void T055_IDE_1769() { // create a CBN : count = 10 // create another cbn : 1..count; 0; 0; // assing the 3 CBN outputs to 3 different identifiers and verify the values ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>count = 10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_5c827dc9620a469097cf606bb58f6e5a =1..count; _temp_b15272657bf442aeb48d8dd41b2b95ba =0; _temp_6eaeba43a10e473db628fa9be0578138 =0;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_4666fd1411734d12976fdc701e64164e = Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_b2faa62b9876454b8b6a8720fab2153d = Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_8260d54f7c854ba1b6139cea6bf02502 = Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_5c827dc9620a469097cf606bb58f6e5a =1..count; _temp_b15272657bf442aeb48d8dd41b2b95ba =0; _temp_6eaeba43a10e473db628fa9be0578138 =0;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_5c827dc9620a469097cf606bb58f6e5a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_4666fd1411734d12976fdc701e64164e</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_5c827dc9620a469097cf606bb58f6e5a =1..count; _temp_b15272657bf442aeb48d8dd41b2b95ba =0; _temp_6eaeba43a10e473db628fa9be0578138 =0;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_5c827dc9620a469097cf606bb58f6e5a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b15272657bf442aeb48d8dd41b2b95ba</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b2faa62b9876454b8b6a8720fab2153d</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_5c827dc9620a469097cf606bb58f6e5a =1..count; _temp_b15272657bf442aeb48d8dd41b2b95ba =0; _temp_6eaeba43a10e473db628fa9be0578138 =0;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>count</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_5c827dc9620a469097cf606bb58f6e5a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b15272657bf442aeb48d8dd41b2b95ba</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_6eaeba43a10e473db628fa9be0578138</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_8260d54f7c854ba1b6139cea6bf02502</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[9].Payload == 10); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 0); } [Test, Ignore] public void T056_IDE_1590() { // Create CBN:2 // Create CBN: a // Connect above tow CBN. // Create CBN: 3 // Create + node. // Connect a and 2 to + node. // Delete CBN :a // Connect first CBn to + node. // Verify that + node should display the preview with value 5. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_370735c91b9641e1ac64cc0c903fe8cc =1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_6eb6694988b347fd85fefab556840c46 =a;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_9c908b1759854464b3937faebcae640c =4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Function</Type> <Content>User defined;+;double,double;Var4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_370735c91b9641e1ac64cc0c903fe8cc =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_370735c91b9641e1ac64cc0c903fe8cc</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a ;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_6eb6694988b347fd85fefab556840c46</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>a ;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_6eb6694988b347fd85fefab556840c46</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>User defined;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_9c908b1759854464b3937faebcae640c =4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9c908b1759854464b3937faebcae640c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>User defined;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435458</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_370735c91b9641e1ac64cc0c903fe8cc =1;</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>User defined;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_370735c91b9641e1ac64cc0c903fe8cc =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_370735c91b9641e1ac64cc0c903fe8cc</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Function</Type> <Content>User defined;+;double,double;Var4;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 5); } [Test, Ignore] public void T057_IDE_1723() { // Create CBN:0 // Create CBN: 3 // Create ByCoordiante node. // Connect first CBN to all input of Point Node. // Access X property from point node. // Connect CBN: 3 to first input of Point node. // Verify that preview for property node X should display value 3. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_57f9e9e3222d497faf92075142ed6199 =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7f20a7c97d8c4edea1fa87a448c785f5 =3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_57f9e9e3222d497faf92075142ed6199 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_57f9e9e3222d497faf92075142ed6199 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_57f9e9e3222d497faf92075142ed6199 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_7f20a7c97d8c4edea1fa87a448c785f5 =3;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_7f20a7c97d8c4edea1fa87a448c785f5</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_57f9e9e3222d497faf92075142ed6199 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_57f9e9e3222d497faf92075142ed6199</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 3); } [Test, Ignore] public void T058_IDE_1731() { // Create CBN:a+b // Create Identifier node. // Create CBN: a= 2*5; // Create CBN : b=a*2; // Undate B = a*2 to b=a+2; // Update a = 2*5 to a=5*5; // Verify that preview for Identifier node should display value 52. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_60456200000145a5991b1fcf58f9cba0 =a+b;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_8b5472f509984bd6b871342822018d9f = Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_60456200000145a5991b1fcf58f9cba0 =a+b;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_60456200000145a5991b1fcf58f9cba0</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_8b5472f509984bd6b871342822018d9f</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>a=2*5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>b=a*2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>b = a +2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>a=2*5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_60456200000145a5991b1fcf58f9cba0 =a+b;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_60456200000145a5991b1fcf58f9cba0</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>a = 5 * 5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_60456200000145a5991b1fcf58f9cba0 =a+b;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_60456200000145a5991b1fcf58f9cba0</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>b = a +2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 52); } [Test, Ignore] public void T059_IDE_1608() { // Create CBN: // // Verify that preview for Identifier node should display value 52. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_572fc11bf38d41f9915ab2deec579d55 = Var2</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_02ffca606b5143e8b2b7d517e0959144 = Var3</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_aa3de36b0de44defb72723b784420bce = Var4</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>CodeBlock</Type> <Content>_temp_8e8ac42a8012480994a0aeafb46a3367 = Var5</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_664faf45b9374723b7d50be19301b180 = Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_572fc11bf38d41f9915ab2deec579d55</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_02ffca606b5143e8b2b7d517e0959144</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b[2]</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_aa3de36b0de44defb72723b784420bce</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b[2]</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>3</OtherIndex> <LocalName>_temp_8e8ac42a8012480994a0aeafb46a3367</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a=1..10; b=a; b[2] = 100; c=a; d=b[0..(Count(b)-1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b[2]</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>4</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>d</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>4</OtherIndex> <LocalName>_temp_664faf45b9374723b7d50be19301b180</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>a = 1..10; b = a; b[2] = 100; c = a; d = b[0..(Count(b) - 1)..2];</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>a</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>b[2]</LocalName> </Connection> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>c</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>4</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>d</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Identifier</Type> <Content>Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_572fc11bf38d41f9915ab2deec579d55</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Identifier</Type> <Content>Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_02ffca606b5143e8b2b7d517e0959144</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Identifier</Type> <Content>Var4</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_aa3de36b0de44defb72723b784420bce</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Identifier</Type> <Content>Var5</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>3</OtherIndex> <LocalName>_temp_8e8ac42a8012480994a0aeafb46a3367</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>4</OtherIndex> <LocalName>_temp_664faf45b9374723b7d50be19301b180</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[1].Payload == 2); Assert.IsTrue((Int64)var3[2].Payload == 100); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 100); } [Test, Ignore] public void T060_IDE_1630_TestCaseDefect_1856() { // Test case failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Steps are metioned in the defect. http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1630 GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_b3463eff666745508fd49d6df008720f =10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_b3463eff666745508fd49d6df008720f =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b3463eff666745508fd49d6df008720f</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_a46d1dc800214e9cad905ece129b7ee0 =0.25..1..#4;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_a46d1dc800214e9cad905ece129b7ee0 =0.25..1..#4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_a46d1dc800214e9cad905ece129b7ee0</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var7</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;DistanceTo;Point,Point;Var8;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var7</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435464</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;DistanceTo;Point,Point;Var8;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var8[0].Payload == 10); Assert.IsTrue((Int64)var8[1].Payload == 10); Assert.IsTrue((Int64)var8[2].Payload == 10); Assert.IsTrue((Int64)var8[3].Payload == 10); } [Test, Ignore] public void T061_IDE_1485() { // create a Point.ByCoordinates (0,0,0) // click on the translate property ( it's base geometry class property ) and translate by 5 // click on the 'x' property of the translated point => value should be 5 // delete the initial point and then undo => the value should still be 5 ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_25eb003dec4840ab8fd5eb2ecb6facaa =5;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_25eb003dec4840ab8fd5eb2ecb6facaa =5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_25eb003dec4840ab8fd5eb2ecb6facaa =5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_25eb003dec4840ab8fd5eb2ecb6facaa =5;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>3</OtherIndex> <LocalName>_temp_25eb003dec4840ab8fd5eb2ecb6facaa</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var5</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_e0355c36976d4a1c82ce71869dc7038f = Var6</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var5</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435462</Id> <Type>Identifier</Type> <Content>Var6</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_e0355c36976d4a1c82ce71869dc7038f</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435457</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>CodeBlock</Type> <Content>_temp_3b9c739eddfe4956a76f3f7d644b6d2e =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_3b9c739eddfe4956a76f3f7d644b6d2e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Translate;Geometry,double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>3</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 5); } [Test, Ignore] public void T062_IDE_1632_TestCaseDefect_1856() { // Test case failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Steps are mentioned in the defect. It is a long list of steps to it is better to refere defect for steps. GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;CoordinateSystem.WCS;Var1</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_e8d5b269dbce4d0fb4696d42ea756ed0 =100;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_e8d5b269dbce4d0fb4696d42ea756ed0 =100;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_e8d5b269dbce4d0fb4696d42ea756ed0</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_d78fe4828ef341ba9462fd70c58e84ac =0.25;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_d78fe4828ef341ba9462fd70c58e84ac =0.25;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_d78fe4828ef341ba9462fd70c58e84ac</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var7</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435464</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;DistanceTo;Point,Point;Var8;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435463</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var7</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var7</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var3</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435464</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;DistanceTo;Point,Point;Var8;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435460</Id> <Type>CodeBlock</Type> <Content>_temp_310adb3b5d7442adbedd5bbe5c5eef23 =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_310adb3b5d7442adbedd5bbe5c5eef23</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Circle.ByCenterPointRadius;Point,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435465</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Rotate;CoordinateSystem,double,Vector;Var9;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>_temp_9c782f4fddd44238ae308217ee100c2e =-30;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435466</Id> <Type>CodeBlock</Type> <Content>_temp_9c782f4fddd44238ae308217ee100c2e =-30;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_9c782f4fddd44238ae308217ee100c2e</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435465</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Rotate;CoordinateSystem,double,Vector;Var9;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435467</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;ZAxis;Var11</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var11</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435467</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;ZAxis;Var11</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var11</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var11</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435465</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Rotate;CoordinateSystem,double,Vector;Var9;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435468</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var12</Content> <InputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435465</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Rotate;CoordinateSystem,double,Vector;Var9;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435469</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;XAxis;Var13</Content> <InputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var13</LocalName> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435465</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;Rotate;CoordinateSystem,double,Vector;Var9;</Content> <InputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435466</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var9</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435470</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointDirectionLength;Point,Vector,double;Var14;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435468</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;Origin;Var12</Content> <InputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435470</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var12</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435470</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointDirectionLength;Point,Vector,double;Var14;</Content> <InputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435469</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;XAxis;Var13</Content> <InputList> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var13</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435470</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var13</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435470</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointDirectionLength;Point,Vector,double;Var14;</Content> <InputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435471</Id> <Type>CodeBlock</Type> <Content>_temp_2ea42e79a8e44e8590253dd1f415a1f1 =a;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435471</Id> <Type>CodeBlock</Type> <Content>_temp_9feff06991994204807a9c5d045ff82c =1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435471</Id> <Type>CodeBlock</Type> <Content>_temp_9feff06991994204807a9c5d045ff82c =1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435470</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_9feff06991994204807a9c5d045ff82c</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435470</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointDirectionLength;Point,Vector,double;Var14;</Content> <InputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> <Connection> <OtherNode>268435471</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435464</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;DistanceTo;Point,Point;Var8;</Content> <InputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var8</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435470</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>Var8</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435470</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Line.ByStartPointDirectionLength;Point,Vector,double;Var14;</Content> <InputList> <Connection> <OtherNode>268435468</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> <Connection> <OtherNode>268435469</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> <Connection> <OtherNode>268435464</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var14</LocalName> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435471</Id> <Type>CodeBlock</Type> <Content>_temp_9feff06991994204807a9c5d045ff82c =1;</Content> <InputList /> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes> <RemovedNodeIDs>268435471</RemovedNodeIDs> </RemovedNodes> <AddedNodes /> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435462</Id> <Type>CodeBlock</Type> <Content>_temp_06ab138cafb942a28ea656739f72a06f =0.25..1..#4;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435461</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_06ab138cafb942a28ea656739f72a06f</LocalName> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435461</Id> <Type>Method</Type> <Content>ProtoGeometry.dll;CoordinateSystemAtParameter;Curve,double;Var5;</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435462</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435463</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435465</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> <Connection> <OtherNode>268435467</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var5</LocalName> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var8[0].Payload == 10); Assert.IsTrue((Int64)var8[1].Payload == 10); Assert.IsTrue((Int64)var8[2].Payload == 10); Assert.IsTrue((Int64)var8[3].Payload == 10); //mirror = liveRunner.QueryNodeValue("Var4"); //Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 100); } [Test, Ignore] public void T063_IDE_1823() { // Steps are mentioned in the defect. ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>CodeBlock</Type> <Content>_temp_b6066dcda7b747698312d03295a678ab =0; _temp_a561c2f0882f44e58c8f62adae0ce30d =10;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_b6066dcda7b747698312d03295a678ab</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_a561c2f0882f44e58c8f62adae0ce30d</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435460</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var4</Content> <InputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435458</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var2;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435460</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var4</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var4</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </ModifiedNode> <ModifiedNode> <Id>268435459</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var3;</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435460</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var3</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); } [Test, Ignore] public void T064_IDE_1806() { /* 1. Create a Point.ByCoordinates node 2. Click on the 'X' property from it's radial menu 3. create a CBN : '0' and connect it to all 3 inputs of the Point.ByCoordinates node => no geometry/textual preview from neither the geometry node, nor the property node */ ILiveRunner liveRunner = new ProtoScript.Runners.Obsolete.LiveRunner(); string code = @"<?xml version=""1.0"" encoding=""utf-16""?> <SynchronizeDataCollection xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <SynchronizeDataCollection> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435458</Id> <Type>Property</Type> <Content>ProtoGeometry.dll;X;Var2</Content> <InputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var2</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes> <AddedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_14d20203392041ebb70c7f4a88291839 =0;</Content> <InputList /> <OutputList /> </AddedNode> </AddedNodes> <ModifiedNodes /> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_14d20203392041ebb70c7f4a88291839 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_14d20203392041ebb70c7f4a88291839 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> <SynchronizeData> <RemovedNodes /> <AddedNodes /> <ModifiedNodes> <ModifiedNode> <Id>268435459</Id> <Type>CodeBlock</Type> <Content>_temp_14d20203392041ebb70c7f4a88291839 =0;</Content> <InputList /> <OutputList> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>1</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435457</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>2</OtherIndex> <LocalName>_temp_14d20203392041ebb70c7f4a88291839</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> <ModifiedNode> <Id>268435457</Id> <Type>Function</Type> <Content>ProtoGeometry.dll;Point.ByCoordinates;double,double,double;Var1;</Content> <InputList> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>1</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> <Connection> <OtherNode>268435459</OtherNode> <LocalIndex>2</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </InputList> <OutputList> <Connection> <OtherNode>268435458</OtherNode> <LocalIndex>0</LocalIndex> <OtherIndex>0</OtherIndex> <LocalName>Var1</LocalName> <IsImplicit>false</IsImplicit> </Connection> </OutputList> </ModifiedNode> </ModifiedNodes> </SynchronizeData> </SynchronizeDataCollection> </SynchronizeDataCollection> "; List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(code); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 0); }
public void GraphILTest_FFIClassUsage_04() { /*Class C { * def f: int (X: int, Y:int) { * Z = X + Y + X*Y; * return = Z; * } * } * p = C.C(); * t = p.f(4, 5); */ ProtoCore.AST.AssociativeAST.BinaryExpressionNode assign1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("Z"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("X"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("Y"), new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("X"), new ProtoCore.AST.AssociativeAST.IdentifierNode("Y"), ProtoCore.DSASM.Operator.mul), ProtoCore.DSASM.Operator.add), ProtoCore.DSASM.Operator.add), ProtoCore.DSASM.Operator.assign); ProtoCore.AST.AssociativeAST.IdentifierNode returnExpr = new ProtoCore.AST.AssociativeAST.IdentifierNode("Z"); ProtoCore.AST.AssociativeAST.ReturnNode returnNode = new ProtoCore.AST.AssociativeAST.ReturnNode(); returnNode.ReturnExpr = returnExpr; /**/ ProtoCore.AST.AssociativeAST.ArgumentSignatureNode argSignatureNode = new ProtoCore.AST.AssociativeAST.ArgumentSignatureNode(); ProtoCore.AST.AssociativeAST.VarDeclNode varDeclNode1 = new ProtoCore.AST.AssociativeAST.VarDeclNode(); ProtoCore.Type type = new ProtoCore.Type(); type.Initialize(); type.Name = "int"; varDeclNode1.ArgumentType = type; ProtoCore.AST.AssociativeAST.IdentifierNode nameNode = new ProtoCore.AST.AssociativeAST.IdentifierNode { Value = "X", Name = "X", datatype = new ProtoCore.Type() { Name = "int", IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeInt } }; varDeclNode1.NameNode = nameNode; argSignatureNode.AddArgument(varDeclNode1); ProtoCore.AST.AssociativeAST.VarDeclNode varDeclNode2 = new ProtoCore.AST.AssociativeAST.VarDeclNode(); varDeclNode2.ArgumentType = type; ProtoCore.AST.AssociativeAST.IdentifierNode nameNode2 = new ProtoCore.AST.AssociativeAST.IdentifierNode() { Name = "Y", Value = "Y", datatype = new ProtoCore.Type() { Name = "int", IsIndexable = false, rank = 0, UID = (int)ProtoCore.PrimitiveType.kTypeInt } }; varDeclNode2.NameNode = nameNode2; argSignatureNode.AddArgument(varDeclNode2); ProtoCore.AST.AssociativeAST.CodeBlockNode cbn = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); cbn.Body.Add(assign1); cbn.Body.Add(returnNode); ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode(); funcDefNode.FunctionBody = cbn; funcDefNode.Name = "f"; funcDefNode.Singnature = argSignatureNode; funcDefNode.ReturnType = new ProtoCore.Type() { Name = "int", UID = (int)ProtoCore.PrimitiveType.kTypeInt, IsIndexable = false, rank = 0 }; // C { } ProtoCore.AST.AssociativeAST.ClassDeclNode classDeclNode = new ProtoCore.AST.AssociativeAST.ClassDeclNode(); classDeclNode.className = "C"; classDeclNode.funclist.Add(funcDefNode); //p = C.C() ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallP = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallP.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("C"); List<ProtoCore.AST.AssociativeAST.AssociativeNode> listArgs = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); funcCallP.FormalArguments = listArgs; ProtoCore.AST.AssociativeAST.FunctionDotCallNode funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("C", funcCallP); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignP = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("p"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); // t = p.f(4, 5); ProtoCore.AST.AssociativeAST.FunctionCallNode funcCallT = new ProtoCore.AST.AssociativeAST.FunctionCallNode(); funcCallT.Function = new ProtoCore.AST.AssociativeAST.IdentifierNode("f"); List<ProtoCore.AST.AssociativeAST.AssociativeNode> listArgs2 = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); listArgs2.Add(new ProtoCore.AST.AssociativeAST.IntNode("4")); listArgs2.Add(new ProtoCore.AST.AssociativeAST.IntNode("5")); funcCallT.FormalArguments = listArgs2; funcDotCallNode = new ProtoCore.AST.AssociativeAST.FunctionDotCallNode("p", funcCallT); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assignT = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("t"), funcDotCallNode, ProtoCore.DSASM.Operator.assign ); List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); astList.Add(classDeclNode); astList.Add(assignP); astList.Add(assignT); GraphToDSCompiler.GraphCompiler gc = GraphToDSCompiler.GraphCompiler.CreateInstance(); string code = gc.Emit(astList); ExecutionMirror mirror = thisTest.RunScriptSource(code); Obj o = mirror.GetValue("t"); Assert.IsTrue((Int64)o.Payload == 29); } [Test] public void GraphNotComputing_Islandnodes_1280() { //deffect IDE-1280 // 1. Create a code block node // 2. Create an identifier // 3. drag and drop a code block node and leave it empty ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "GraphNotComputing_1280.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void Island_FunctionNode_1282() { // Deffect -1282 // 1. create + node // 2. create a code block and identfier and connect them ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "unconnectedfunction.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void MultiLineCodeBlock_1285_2() { // 1. Create multiline code block with a=10;b=20; // 2. Create an identifier // 3. Connect the first one to the identifier change the connection to the second the preview doesn not work ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "MultiLineCodeBlock_2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 20); } [Test] public void OneInputOutputNodes_1279() { // Deffect -1279 // 1. create a code block and two identifier // 2. connect code block to two identifiers preview for second one does not load ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "manyoutputnodes.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().opdata == 1); } [Test] public void RangeNode_InvalidInput_1422() { // Deffect_1422: Incorrect preview value for Range Node when there is no input for End slot. // Create Code Block node with value 1 and another with value of 10. // Drag and drop Range node. // Connect Code Block node with value 1 to start slot of Range node and with value 10 to Increment slot of Range node. // After above step you will get the preview value for Range node starting from 1..10. which is incorrect. Because for Range node, Start and End slots are mandatory and Increment slot is optional. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "Defect_IDE_1422.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void Reconnect_CB_DifferentSlot_1294() { // Deffect -1294 // 1. Create multiline code block with a=10; b=20; // 2. Create an identifier // 3. Connect the first one to the identifier change the connection to the second the preview does not work ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "Reconnect_CB_DifferentSlot.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 20); } [Test] public void replicationguides_1595() { // Create CBN {1,2} // Create CBN {10,20} // add using + node ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "rep.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> level21 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)level21[0].Payload == 11); Assert.IsTrue((Int64)level21[1].Payload == 21); List<Obj> level22 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)level22[0].Payload == 12); Assert.IsTrue((Int64)level22[1].Payload == 22); } [SetUp] public void Setup() { } [Test] public void T001_MultipleAssignments() { GraphToDSCompiler.GraphCompiler gc = GraphToDSCompiler.GraphCompiler.CreateInstance(); gc.CreateIdentifierNode(1, "A"); gc.CreateIdentifierNode(2, "B"); gc.CreateIdentifierNode(3, "C"); gc.ConnectNodes(1, 0, 2, 0); gc.ConnectNodes(2, 0, 3, 0); object o1 = 10; gc.CreateLiteralNode(4, o1); gc.ConnectNodes(4, 0, 1, 0); string mmx = gc.PrintGraph(); mmx = mmx.Trim(); ExecutionMirror mirror = thisTest.RunScriptSource(mmx); Obj o = mirror.GetValue("A"); Assert.IsTrue((Int64)o.Payload == 10); } [Test] public void T002_TestArrayIndexing() { //1. Create a CBN : a = {1,2} //2. Create another CBN : b = [0]; //3. Connect output of last CBN to input of an identifier 'c' => verify 'c' = 1 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T002_TestArrayIndexing.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T004_TestSimpleMathNode() { //NOTE to JUN : This test case is failing, though the script generated is as expected. Can you please check what is the // issue with the Mirror here ? // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it => verify the value is '1' ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T004_TestSimpleMathNode.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T005_TestReplicationGuideInCBNUsingAddition() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {3,4}; // 3. Create a CBN : c = a<1> + b<2> // 4. Connect output of last CBN to identifier node 'd' => vrify value is { {4,5}, { 5,6} } ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T005_TestReplicationGuideInCBNUsingAddition.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("d"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 2 elements in the top level array Assert.IsTrue(elements.Count == 2); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 4); Assert.IsTrue((Int64)dim1[1].Payload == 5); // Get the array in the second index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 5); Assert.IsTrue((Int64)dim2[1].Payload == 6); } [Test] public void T006_TestReplicationGuideInCBNWithUpdate() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {3,4}; // 3. Create a CBN : c = a<1> + b<2> // 4. Connect output of last CBN to identifier node 'd' // 5. Now update a = {2}; => vrify value is { { 5,6} } ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T006_TestReplicationGuideInCBNWithUpdate.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("d"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There is 1 element in the top level array Assert.IsTrue(elements.Count == 1); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 5); Assert.IsTrue((Int64)dim1[1].Payload == 6); } [Test] public void T007_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEdit() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {-1,4}; // 3. Create a Math.Max node // 4. Connect output of a and b to the 2 inputs of the Max node and connect it's output to an identifier 'c' // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Verify the final output value : { {1,4}, {2,4} } ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T007_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEdit.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 2 elements in the top level array Assert.IsTrue(elements.Count == 2); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 1); Assert.IsTrue((Int64)dim1[1].Payload == 4); // Get the array in the second index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 2); Assert.IsTrue((Int64)dim2[1].Payload == 4); } [Test] public void T008_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditAndUndo() { // 1. Create a CBN : a = {1,2}; // 2. Create a CBN : b = {-1,4}; // 3. Create a Math.Max node // 4. Connect output of a and b to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Now press undo , and the final output value : {1, 4} //Faling due to defect : IDE-1351 Replication guide preview : The replication guide preview is not showing the expected result when Math.Max(a<1>, b<2>) is called ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T008_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditAndUndo.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)elements[0].Payload == 1); Assert.IsTrue((Int64)elements[1].Payload == 4); } [Test] public void T009_TestMathNodeAndDeleteDriverNodeConnection() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Min node and connect output from driver nodes to it // 4. Delete the connection to the driver node '1' = > verify the output of math node is null ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T009_TestMathNodeAndDeleteDriverNodeConnection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T010_TestMathNodeAndDeleteDriverNode() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Divrem node and connect output from driver nodes to it // 4. Delete the the driver node '1' = > verify the output of math node is null ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T010_TestMathNodeAndDeleteDriverNode.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T010_VariableDeclarationDependancy_1369() { //1. Create a code block node a= 10 //2. Assign it to Identifier named b //3. create one more code block and assign the value of identifier to it , eg: c= b ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testDependancy.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T011_TestMathNodeAndCreateNewConnection() { // 1. Create a driver node '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it // 4. Now create another driver node, and connect from it's output to the Math node's two inputs // => verify the output of math node is 1.5 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T011_TestMathNodeAndCreateNewConnection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test] public void T012_TestMathNodeAndModifyInputs() { // 1. Create a CBN '0' // 2. Create a driver node '1' // 3. Create a Math.Max node and connect output from driver nodes to it // 4. Now modify the inputs to '-1' and '1.5' and verify the output of the math node = 1.5 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T012_TestMathNodeAndModifyInputs.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test] public void T013_TestMathNodeWithRangeNodeUsingReplicationAndEdit() { // 1. Create 2 CBNs, '0' and '2' // 2. Create a driver node '1' // 3. Create a Range node with start = 0, end = 2, increment = 1; // 4. Create a Math.Factorial and pass thr output of range node to it // 5. Create an identifier node and connect output of Math.Factorial node to input of this driver node => var6 // 6. Now create a '+' operator node and connect output of var6, and output of the CBN '2' to it's inputs => var7 // 7. Now edit the input to the range node so that the start = -1 => verify var7 is updated to : {1,3,3,4} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T013_TestMathNodeWithRangeNodeUsingReplicationAndEdit.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)elements[0].Payload == 1); Assert.IsTrue((Int64)elements[1].Payload == 3); Assert.IsTrue((Int64)elements[2].Payload == 3); Assert.IsTrue((Int64)elements[3].Payload == 4); } [Test] public void T014_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithEdit() { // 1. Create a driver node, rename to 'a' and set its value to 1' // 2. Create a CBN : b = a + 1; // 3. Create an identifier , rename to 'c', and connect output from CBN to it;s input // 4. Create an operator node, and connect output from driver node 'a' and identifier node 'c' to it's inputs // 5. Create Math.Factorial node ( Var5 ) , and connect output from operator node to it's input // 6. Now edit value of 'a' = 2 => verify var5 is updated to : 120 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T014_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithEdit.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 120); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 5); mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3); } [Test] public void T014_VariableDeclarationDependancy_2() { //1. Create two code block nodes assign it + operator //2. Assign it to an identifier Var3 //3. Create one more code block and assign the value of identifier to it , eg: c= Var3 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testDependancy2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 11); } [Test] public void T015_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithRemove() { // 1. Create a driver node, rename to 'a' and set its value to 1' // 2. Create a CBN : b = a + 1; // 3. Create an identifier , rename to 'c', and connect output from CBN to it;s input // 4. Create an operator node, and connect output from driver node 'a' and identifier node 'c' to it's inputs // 5. Create Math.Factorial node ( Var5 ) , and connect output from operator node to it's input // 6. Now remove the driver node 'a' => verify var5 is updated to : null // defect :IDE-1294 deleting a node that was referenced by another does not update the preview ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T015_TestMathNodeWithOperatorAndDriverAndIdentifierAndCBNWithRemove.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T015_VariableDeclarationDependancy_3() { //1. Create a driver node var1 //2. Create another code block node and assign the same to var2 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testDependancy3.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); } [Test] public void T016_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditUndoRedo() { // 1. Create a range node {0,1,2}; // 2. Create a driver node b = 2; // 3. createa CBN : c = b..b+3; // 4. Create a Math.Max node // 4. Connect output of range node and c to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Now press undo once and then press redo and the final output value : {{2,3,4,5}, {2,3,4,5}, {2,3,4,5}} //Faling due to defect : IDE-1388 Update issue with range expressions in CBN ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T016_TestReplicationGuideFromRadialMenuUsingMathFunctionWithEditUndoRedo.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // There are 4 elements in the top level array Assert.IsTrue(elements.Count == 3); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 2); Assert.IsTrue((Int64)dim1[1].Payload == 3); Assert.IsTrue((Int64)dim1[2].Payload == 4); Assert.IsTrue((Int64)dim1[3].Payload == 5); // Get the array in the lasy index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[2].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 2); Assert.IsTrue((Int64)dim2[1].Payload == 3); Assert.IsTrue((Int64)dim2[2].Payload == 4); Assert.IsTrue((Int64)dim2[3].Payload == 5); } [Test] public void T016_VariableDeclarationDependancy_4() { //1. Create a code block node a= 10 //2. Create another code block and assign b=a ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testDependancy4.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 10); } [Test] public void T017_TestDriverNode() { //1. Create a driver node //2. Change the value of variable to a and value to 2 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNode.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 2); } [Test] public void T017_TestReplicationGuideFromRadialMenuUsingMathFunctionWithInvalidGuidesAndUndoRedo() { // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..4; // 3. Create a Math.Max node // 4. Connect output of 'a' and 'b' to the 2 inputs of the Max node // 5. Click on the top right hand corner of the Max node and then click once on the 'Replication Guide' item on the radial menu // 6. Now update the second replication guide to be '2' // 7. Then update it to '-1' => we get a warning that the guide is invalid, the the guide remains at '2' // 8. Then update the first replication guide to '2'. so that both guides ar now '2' // 9. Now press undo once and then redo => the final guides should both be '2', and the output : {3,4}; ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T017_TestReplicationGuideFromRadialMenuUsingMathFunctionWithInvalidGuidesAndUndoRedo.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 3); Assert.IsTrue((Int64)dim1[1].Payload == 4); } [Test] public void T018_TestDriverNode() { //1. Create a code block node and assign value 1 //2. Create a driver node //3. Change the value of driver node to variable a //4. Assign it to identifier - Var3 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNode_Crossreference.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T018_TestReplicationGuide_SingletonAndCollection_TestCaseDefect_IDE_1397() { // 1. Create a CBN : 0; // 2. Create a CBN : a = {0,1}; // 3. Create a '+' node // 4. Connect output of CBN '0' and 'a' to the 2 inputs of the '+' node // 5. Click on the top right hand corner of the '+' node and then click once on the 'Replication Guide' item on the radial menu // 6. Replication guides <1> are added to both inputs // => verify the final output should still be {0,1} // Failing due to defect : IDE-1397 Replication guide : When replication guide is applied on a singleton and collection, the output is not as expected ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T018_TestReplicationGuide_SingletonAndCollection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 0); Assert.IsTrue((Int64)dim1[1].Payload == 1); } [Test] public void T019_TestDriverNodeDeletion() { //1. Create a driver node //2. Assign it to identifier - Var2 //3. Connect them //4. Delete the driver node ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNode_Delete.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T019_TestRangeExpressionValueWithEdits() { // 1. Create a Range Expression : 0..2..1; // 2. Then edit end to '0' // 3. Then edit increment to '-1' // 4. Then edit start to '2' // 5. Then edit end to '0' // Verify the final value = {2, 1, 0 } ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T019_RangeExpressionValueWithEdits.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 2); Assert.IsTrue((Int64)dim1[1].Payload == 1); Assert.IsTrue((Int64)dim1[2].Payload == 0); } [Test] public void T020_DriverNodeArray_TestCaseDefect_IDE_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 //Steps : Create a driver node - Var 1 - {0,1} => verify the valye is null, as this is will throw a compiler error ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNode_Array.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T020_TestIdentifierValueWithEdits() { // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..7; // 3. Create a '+' node and connect 'a' and 'b' to it // 4. Then edit the CBN to finally have a = {1,2} and b = {2,1} and then add replication guides <1> and <2> respectively // Verify the final value = {{3,2},{4,3}} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T020_IdentifierValueWithEdits.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); // Get the array in the first index and verify its values List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 3); Assert.IsTrue((Int64)dim1[1].Payload == 2); // Get the array in the lasy index and verify its values List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 4); Assert.IsTrue((Int64)dim2[1].Payload == 3); } [Test] public void T021_DeleteConnection() { //1. Create a code block and assign it to identifier node named var2 //2. Delete the connection between the codeblock and identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T021_DeleteConnection_1276.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T021_TestFunctionNodeValueWithEdits_TestCaseDefect_DNL_1467667() { //Failing due to defect :DNL-1467667 Replication on heterogeneous array causes unintended type conversion // 1. Create a CBN : a = 1..2; // 2. Create a CBN : b = 3..7; // 3. Create a 'Math.Max(n1,n2)' node (Var3 ) and connect 'a' and 'b' to it // 4. Then edit the CBN to finally have a = {0, 3, 2} and b = {-1,4.5} // 5. Now add another Math.Max : Var4(d1,d2) // Verify the final value = {0,4.5} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T021_TestFunctionNodeValueWithEdits.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> dim1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim1[0].Payload == 0); Assert.IsTrue((Int64)dim1[1].Payload == 5); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> dim2 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)dim2[0].Payload == 0); Assert.IsTrue((Int64)dim2[1].Payload == 4.5); } [Test] public void T022_DeleteConnection_1395() { //1. Create two code block nodes and assign it + operator //2. Connect the + operator node to identifier named Var4 //3. Delete connection between the + and identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T022_DeleteConnection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T023_DeleteConnection_Undo() { //1. Create a code block and assign it to identifier node named var2 //2. Delete the connection between the codeblock and identifier //3. Undo ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T023_DeleteConnection_Undo.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T024_DeleteConnection_CBN2() { // 1. Create a code block node with expression a=1 and conenct it to identifier // 2. Delete connection ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T024_Deleteconnection_CBN2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T025_MultipleOutput_DeleteConnection() { // 1. Create a code block node a=1 and connect it two identifiers // 2. Delete one connection and the preview does not udpate for identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T25_MultipleOutput_DeleteConnection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T026_Unsuccessful_1402() { //1. create a code block node with value "@#" //2. create another code blcok node with value 1 and connect it to identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "unsuccessfulnode.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T026_Unsuccessful_1402_2() { //1. create a code block node with value "@#" //2. create another code blcok node with value 1 and connect it to identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "unsuccessfulnode2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T026_Unsuccessful_1402_3() { //1. create a code block node with value "@#" //3. create an identifier var 3 - it shoule be null //2. create another code blcok node with value 1 and connect it to identifier ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "unsuccessfulnode3.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror2.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null); } [Test] public void T027_ChainedAssignment() { // 1. Create a code block node // 2. Create another code block with chanined assignment a=b=1 // 3. Edit first node to b ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "chainedassignment.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T028_DriverNodeExpression() { //1. Create a driver node - Var 1 - 0; ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNodeExpression.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("c"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); } [Test] public void T029_DriverArray() { //1. Create a driver node - Var 1 - {0,1} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "DriverNode_Array2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == 0); Assert.IsTrue((Int64)var1[1].Payload == 1); } [Test] public void T030_MultilineCodeblock() { // 1. Create a codeblock with multiple lines a =10 and b=20 // 2. Connect it to + operator and connect to it => verify its value = 30 // create anoher identifier and connect from first output of CBN to it => verify its value = 10 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "MultiLineCodeBlock.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 30); } [Test] public void T030_TestValuesFromTwoOutputsOfCBN() { // IDE-1332 // 1. Create a CBN like this : "a = 1; b = 2;" // 2. Create 2 identifier nodes : Var2 and Var3 // 3. Connect the output of the first output slot of the CBN to identifier 'Var2' : verify Var2 = 1; // 4. Connect the output of the second output slot of the CBN to identifier 'Var3' : verify Var3 = 2; ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T030_TestValuesFromTwoOutputsOfCBN.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 2); } [Test] public void T031_TestValuesFromTwoOutputsOfCBN_DoubleAndCollectionValues() { // IDE-1332 // 1. Create a CBN like this : "aa = 1.5; bb = 0..3;" // 2. Create 2 identifier nodes : a and b // 3. Connect the output of the first output slot of the CBN to identifier 'a' : verify a = 1.5; // 4. Connect the output of the second output slot of the CBN to identifier 'b' : verify b = {0,1,2,3}; ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T031_TestValuesFromTwoOutputsOfCBN_DoubleAndCollectionValues.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata_d == 1.5); mirror = liveRunner.QueryNodeValue("b"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == 0); Assert.IsTrue((Int64)var1[1].Payload == 1); Assert.IsTrue((Int64)var1[2].Payload == 2); Assert.IsTrue((Int64)var1[3].Payload == 3); } [Test] public void T032_TestValuesFrom4OutputsOfCBN_DoubleIntBoolCollectionValues() { // IDE-1332 // 1. Create a CBN : x = 0; // 2. Create another CBN like this : // " a = 1 + 2; // b = { - 1, 2.5, true }; // c = x; // d = { 0..1, 3..4 };" // 2. Create 4 identifier nodes and connect output from the 4 outputs nodes of the CBN to each of the identifiers and verify the outputs // Var3 = 3, Var4 = {-1,2.5,true}, Var5 = 0; Var6 = {{0,1},{3,4}} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T032_TestValuesFrom4OutputsOfCBN_DoubleIntBoolCollectionValues.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var1[0].Payload == -1); Assert.IsTrue((Double)var1[1].Payload == 2.5); Assert.IsTrue((Boolean)var1[2].Payload == true); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var6"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> dim1 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)dim1[0].Payload == 0); Assert.IsTrue((Int64)dim1[1].Payload == 1); List<Obj> dim2 = GetArrayElements(mirror, elements[1].DsasmValue); Assert.IsTrue((Int64)dim2[0].Payload == 3); Assert.IsTrue((Int64)dim2[1].Payload == 4); } [Test] public void T033_ImplicitConnection() { // 1. create a code block node a=1; // 2. create another code block node b=a // 3. connect the second cbn to identifier - verify value is 1 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "ImplicitConnection.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T034_RangeExpression_1444() { //1. Create three code block nodes a =1, b=1 and c=10 //2. Create range block node //3. Connect a to start , b to Increment and c to End ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "RangeExpression_1444.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var1 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1); Assert.IsTrue((Int64)var1[0].Payload == 1); Assert.IsTrue((Int64)var1[1].Payload == 2); Assert.IsTrue((Int64)var1[2].Payload == 3); Assert.IsTrue((Int64)var1[3].Payload == 4); Assert.IsTrue((Int64)var1[4].Payload == 5); Assert.IsTrue((Int64)var1[5].Payload == 6); Assert.IsTrue((Int64)var1[6].Payload == 7); Assert.IsTrue((Int64)var1[7].Payload == 8); Assert.IsTrue((Int64)var1[8].Payload == 9); Assert.IsTrue((Int64)var1[9].Payload == 10); } [Test] public void T035_IDE_1322() { //1. Create CBN : 34 // 2. Create CBN : a = 33; b = 4; // 3. Create '+' nodea nd connect teh 2 CBN to it. //=> verify output of '+' node: 38 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T035_IDE_1322.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 38); } [Test] public void T035_IDE_1322_2() { // 1. Create CBN : a = 1; 1+1; // 2. Create CBN : 1; // 3. Create '+' node and connect the 2nd output of 1st CBN and the second CBN to this '+' node //=> verify output of '+' node: 3 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T035_IDE_1322_2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 3); } [Test] public void T035_IDE_1322_3() { // 1. Create CBN : a = 1..5; 1..2..#2 // 2. Create CBN : 1..3 // 3. Create '+' node and connect the 2nd output of 1st CBN and the second CBN to this '+' node // 4. Now update the second output of the CBN to : 0..2..#3 // => verify updated output of '+' node: {1, 3, 5} ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T035_IDE_1322_3.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[1].Payload == 3); Assert.IsTrue((Int64)var3[2].Payload == 5); } [Test] public void T036_IDE_1314() { //1. Create CBN : a = 1; b= 2; //2. Create '+' node and connect 'a' and 'b' to it's 2 inputs. //=> verify output of '+' node: 3 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T036_IDE_1314.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 3); } [Test] public void T037_IDE_1585() { // 1. Create CBN : a=1; // 2. Create CBN : a; // 3. Undo // 4. Redo //=> verify preview for CBN: a. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "Defect_IDE_1566.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T038_IDE_1596() { // 1. Create CBN : a=1; // 2. Create CBN : a =2; // 3. Update second CBN to : b=2; //=> verify preview for first CBN: a=1. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T038_IDE_1596.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T039_IDE_1230() { // 1. Create CBN : a={1,2,3};a[0] =4; a[1]=5; // 2. Create 2 Identifier nodes and connect output of second and third line of CBN to input of each Identifier. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T039_IDE_1230.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 4); mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 5); } [Test] public void T040_IDE_1325() { // 1. Create CBN : 4+4; 1..20..2; {1,3,5..} //2. Create 3 Identifier nodes and connect 3 outputs of CBN to each Identifier. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T040_IDE_1325.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 8); mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[9].Payload == 19); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var4 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var4[0].Payload == 1); Assert.IsTrue((Int64)var4[5].Payload == -1); } [Test] public void T040_IDE_1325_2() { // 1. Create CBN : a = 1 // 2. Create a nother CBN : a // 3. Create another CBN : a + 1 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T040_IDE_1325_2.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 2); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T041_IDE_1450() { // Create CBN : 1..5 // Create CBN : 1..5..#3 // Create CBN : 1/2 // Create CBN : 0.56 // Create CBN : -1 // connect these CBN s to 5 variables and verify the values ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T041_IDE_1450.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((Double)mirror.GetData().GetStackValue().opdata == 1 / 2); mirror = liveRunner.QueryNodeValue("Var7"); Assert.IsTrue((Double)mirror.GetData().GetStackValue().opdata_d == 0.56); mirror = liveRunner.QueryNodeValue("Var10"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == -1); mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var8[0].Payload == 1); Assert.IsTrue((Int64)var8[4].Payload == 5); mirror = liveRunner.QueryNodeValue("Var9"); List<Obj> var9 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var9[0].Payload == 1); Assert.IsTrue((Int64)var9[2].Payload == 5); } [Test] public void T042_IDE_1447() { // Create CBN : a = 1..2; b = a+1; // Create CBN : 1 // Create + : a + 1 // Create + : b + 1; // Create + : a + b // verify the values ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T042_IDE_1447.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 2); Assert.IsTrue((Int64)var3[1].Payload == 3); mirror = liveRunner.QueryNodeValue("Var4"); List<Obj> var4 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var4[0].Payload == 3); Assert.IsTrue((Int64)var4[1].Payload == 4); mirror = liveRunner.QueryNodeValue("Var5"); List<Obj> var5 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var5[0].Payload == 3); Assert.IsTrue((Int64)var5[1].Payload == 5); } [Test] public void T043_IDE_1616() { // create a CBN : '0' // Create a Point.ByCoordinates and connect the '0' to it's 3 inputs // Click on the 'X' property of the Point and a new identifier Var3 is created with preview '0' // Now create another identifier Var4 and connect Var3 to it. It's preview should be '0' now. // Now create a CBN : a = Var3; => It's preview should also be 0 // Now update the the first CBN to 10. Verify Var3, Var4 and a are all '10' now ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T043_IDE_1616.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); } [Test] public void T044_PreviewAfterUndoRedo() { // Create CBN a=1 -> Undo ->Redo ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "PreviewAfterUndoRedo.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T045_preview_MultilineCBN_TestCaseDefect_1678() { //Failing defect : 1678 // 1. Create a mutliline CBN with value 1;2;a+b // 2. create a Node a=1 // 3. Create another node b=13. the preview for CBN 'a' is not displayed ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "preview_MultilineCBN.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T046_IDE_1676() { // 1. Create a Math.Abs node with input '0' // 2. Create another Math.Abs node with input '1.5' // 3. Now delete the first Math.Abs and verify the preview for the second is still 1.5 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T046_IDE_1676.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 1.5); } [Test] public void T047_IDE_1603_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // 1. Create 2 Point nodes and a line from it // 2. Verify the Length property from the radial menu : 10 // 3. Createa surface from it using ExtrudeAsSurface(line, 10, Vector.ByCoordinates(0,0,1)) : verify area = 100 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T047_IDE_1603.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 10.0); mirror = liveRunner.QueryNodeValue("Var11"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 100.0); } [Test] public void T048_IDE_1695_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Create two Point nodes. // Connect two point nodes to CBN with values like (0,0,0) and another point ode should have (10,0,0) // Create ByStartPointEndPoint node from Line class and connect above two points to it. // Access PointAtParameter from Line node. // create CBn with value 0.5 and connect it to input of ParameterAtPoint node. // Access property X from ParameterAtPoint node. // Verify that the preview for X node should be 5.0 GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T048_IDE_1695.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 5.0); } [Test] public void T049_IDE_1721() { // 1. Creata a CBN 1 // 2. Assign it to another CBN. preview is expected here // 3. Assign to another identifier and vrify it's value = 1 // 4. create another CBN : c = 2; b = 1; and verify value of 'b' = 1 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "preview_CBN_variable.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 1); } [Test] public void T050_IDE_1614() { // Create CBN // a = 1..10..2; // b = a * 2; // b[1] = b[1] + 3; // Connect first two line to Identifier nodes. // Now add few more identifier nodes to Canvas and verify that value for "b" shouldn't change. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T050_IDE_1614.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3[0].Payload == 2); Assert.IsTrue((Int64)var3[1].Payload == 7); Assert.IsTrue((Int64)var3[2].Payload == 6); Assert.IsTrue((Int64)var3[3].Payload == 8); } [Ignore] public void T051_CoordinateSystemPropertytest() { // Create CBN for each line below. // scale = { 2, 3, 4 }; // rotation = { 180, 0, 0 }; // rsequence = { 3, 2, 1 }; // translationVector = { 5, 5, 0 }; // true; // Now drag and drop ByUniversalTransform (first node) from CoordianteSystem and coonec all above respective nodes to CoordianteSystem node. // Now access ScalFactors property from CoordinateSystem node and verify its preview. ( it should return {2,3,4}) ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T049_CoordinateSystemPropertytest.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var14"); List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue()); List<Obj> level21 = GetArrayElements(mirror, elements[0].DsasmValue); Assert.IsTrue((Int64)level21[0].Payload == 2); Assert.IsTrue((Int64)level21[1].Payload == 3); Assert.IsTrue((Int64)level21[2].Payload == 4); } [Test] public void T051_IDE_1445() { // 1. Create a CBN : a = 1; // 2. Update the CBN : b = a + 1; ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T051_IDE_1445.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("b"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 2); } [Test] public void T052_IDE_1754_TestCaseDefect_1856() { // Failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Create Line of length 10 and then Reverse it. After reversing access its Start Point and on Start Point access its property X. // Verify that the value preview for X should be 10. Right now it is coming 0. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T052_IDE_1754.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 10.0); } [Test] public void T053_IDE_1737() { // Drag and drop Range and Identifier node. // Connect output of Range node to input of Identifier node. // Now create CBn with value 0;10;. // Now connect 0 to start and 10 to end slot of Range node. // After above step preview for Range node is coming but there is no preview for Identifier node. (If we create another Identifier node and then connecting it to Range node is displaying correct preview.) So this problem only happens if Identifier node connected before connecting input of Range node. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T053_IDE_1737.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); List<Obj> var2 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var2[0].Payload == 0); Assert.IsTrue((Int64)var2[1].Payload == 1); Assert.IsTrue((Int64)var2[2].Payload == 2); Assert.IsTrue((Int64)var2[3].Payload == 3); Assert.IsTrue((Int64)var2[4].Payload == 4); } [Test] public void T054_IDE_1770() { // create a CBN : count = 10 // create another cbn : 0..10..#count // create two more cbns : 0 and 0 // create another cbn : 10..0..#count; // => verify the values of the first and last cbns ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T054_IDE_1770.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var7"); List<Obj> var7 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var7.Count == 10); Assert.IsTrue((Double)var7[0].Payload == 0); Assert.IsTrue((Double)var7[1].Payload == 1.1111111111111112); Assert.IsTrue((Double)var7[9].Payload == 10); mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var8.Count == 10); Assert.IsTrue((Double)var8[0].Payload == 10); Assert.IsTrue((Double)var8[1].Payload == 8.8888888888888875); Assert.IsTrue((Double)var8[9].Payload == 0); } [Test] public void T055_IDE_1769() { // create a CBN : count = 10 // create another cbn : 1..count; 0; 0; // assing the 3 CBN outputs to 3 different identifiers and verify the values ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T055_IDE_1769.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[9].Payload == 10); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 0); mirror = liveRunner.QueryNodeValue("Var5"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 0); } [Test] public void T056_IDE_1590() { // Create CBN:2 // Create CBN: a // Connect above tow CBN. // Create CBN: 3 // Create + node. // Connect a and 2 to + node. // Delete CBN :a // Connect first CBn to + node. // Verify that + node should display the preview with value 5. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T056_IDE_1590.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 5); } [Test] public void T057_IDE_1723() { // Create CBN:0 // Create CBN: 3 // Create ByCoordiante node. // Connect first CBN to all input of Point Node. // Access X property from point node. // Connect CBN: 3 to first input of Point node. // Verify that preview for property node X should display value 3. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T057_IDE_1723.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 3); } [Test] public void T058_IDE_1731() { // Create CBN:a+b // Create Identifier node. // Create CBN: a= 2*5; // Create CBN : b=a*2; // Undate B = a*2 to b=a+2; // Update a = 2*5 to a=5*5; // Verify that preview for Identifier node should display value 52. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T058_IDE_1731.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 52); } [Test] public void T059_IDE_1608() { // Create CBN: // // Verify that preview for Identifier node should display value 52. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T059_IDE_1608.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3"); List<Obj> var3 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var3[0].Payload == 1); Assert.IsTrue((Int64)var3[1].Payload == 2); Assert.IsTrue((Int64)var3[2].Payload == 100); mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 100); } [Test] public void T060_IDE_1630_TestCaseDefect_1856() { // Test case failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Steps are metioned in the defect. http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1630 GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T060_IDE_1630.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var8[0].Payload == 10); Assert.IsTrue((Int64)var8[1].Payload == 10); Assert.IsTrue((Int64)var8[2].Payload == 10); Assert.IsTrue((Int64)var8[3].Payload == 10); } [Test] public void T061_IDE_1485() { // create a Point.ByCoordinates (0,0,0) // click on the translate property ( it's base geometry class property ) and translate by 5 // click on the 'x' property of the translated point => value should be 5 // delete the initial point and then undo => the value should still be 5 ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T061_IDE_1485.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var6"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 5); } [Test] public void T062_IDE_1632_TestCaseDefect_1856() { // Test case failing due to defect : http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1856 // Steps are mentioned in the defect. It is a long list of steps to it is better to refere defect for steps. GraphToDSCompiler.GraphUtilities.PreloadAssembly("ProtoGeometry.dll"); GraphToDSCompiler.GraphUtilities.PreloadAssembly("Math.dll"); ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T062_IDE_1632.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var8"); List<Obj> var8 = GetArrayElements(mirror, mirror.GetData().GetStackValue()); //Assert.IsTrue((Int64)var3.Count == 10); Assert.IsTrue((Int64)var8[0].Payload == 10); Assert.IsTrue((Int64)var8[1].Payload == 10); Assert.IsTrue((Int64)var8[2].Payload == 10); Assert.IsTrue((Int64)var8[3].Payload == 10); //mirror = liveRunner.QueryNodeValue("Var4"); //Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata == 100); } [Test] public void T063_IDE_1823() { // Steps are mentioned in the defect. ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T063_IDE_1823.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var4"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 10); } [Test] public void T064_IDE_1806() { /* 1. Create a Point.ByCoordinates node 2. Click on the 'X' property from it's radial menu 3. create a CBN : '0' and connect it to all 3 inputs of the Point.ByCoordinates node => no geometry/textual preview from neither the geometry node, nor the property node */ ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T064_IDE_1806.xml"); foreach (SynchronizeData sd in ls) liveRunner.UpdateGraph(sd); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2"); Assert.IsTrue((Int64)mirror.GetData().GetStackValue().opdata == 0); }
public void TestProtoASTExecute_ArrayIndex_RHS_Assign02() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = {1, 2, 3, 4}; int[] input = { 1, 2, 3, 4 }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = CreateDeclareArrayNode("a", input); astList.Add(declareNodeA); // b = 3; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(3), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // c = a[b]; ProtoCore.AST.AssociativeAST.IdentifierNode nodeARHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeARHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IdentifierNode("b") }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeARHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("c"), nodeARHS, ProtoCore.DSASM.Operator.assign); astList.Add(nodeARHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); thisTest.Verify("c", 4); }
public void TestProtoASTExecute_ArrayIndex_LHS_Assign05() { List<ProtoCore.AST.AssociativeAST.AssociativeNode> astList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); // a = { { 0, 1 }, { 3, 4, 5 } }; int[] input1 = { 0, 1 }; int[] input2 = { 3, 4, 5 }; List<ProtoCore.AST.AssociativeAST.AssociativeNode> arrayList = new List<ProtoCore.AST.AssociativeAST.AssociativeNode>(); arrayList.Add(CreateExprListNodeFromArray(input1)); arrayList.Add(CreateExprListNodeFromArray(input2)); ProtoCore.AST.AssociativeAST.ExprListNode arrayExpr = new ProtoCore.AST.AssociativeAST.ExprListNode { Exprs = arrayList }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeA = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("a"), arrayExpr, ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeA); // b = 2; ProtoCore.AST.AssociativeAST.BinaryExpressionNode declareNodeB = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), new ProtoCore.AST.AssociativeAST.IntNode(2), ProtoCore.DSASM.Operator.assign); astList.Add(declareNodeB); // a[0][b] = b; ProtoCore.AST.AssociativeAST.IdentifierNode nodeALHS = new ProtoCore.AST.AssociativeAST.IdentifierNode("a"); nodeALHS.ArrayDimensions = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IntNode(0), Type = new ProtoCore.AST.AssociativeAST.ArrayNode { Expr = new ProtoCore.AST.AssociativeAST.IdentifierNode("b") } }; ProtoCore.AST.AssociativeAST.BinaryExpressionNode nodeALHSAssignment = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( nodeALHS, new ProtoCore.AST.AssociativeAST.IdentifierNode("b"), ProtoCore.DSASM.Operator.assign); astList.Add(nodeALHSAssignment); // Verify the results ExecutionMirror mirror = thisTest.RunASTSource(astList); thisTest.Verify("a", new [] { new [] { 0, 1, 2}, new [] { 3, 4, 5}}); }