本文整理汇总了C#中ProtoScript.Runners.LiveRunner.QueryNodeValue方法的典型用法代码示例。如果您正苦于以下问题:C# ProtoScript.Runners.LiveRunner.QueryNodeValue方法的具体用法?C# ProtoScript.Runners.LiveRunner.QueryNodeValue怎么用?C# ProtoScript.Runners.LiveRunner.QueryNodeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProtoScript.Runners.LiveRunner
的用法示例。
在下文中一共展示了ProtoScript.Runners.LiveRunner.QueryNodeValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateGraphWithNoOrder_1277
public void CreateGraphWithNoOrder_1277()
{
// Deffect -1277
// 1. create code block node
// 2. create math/+ node
// 3. create identifier
// 4. connection code block to math and then to identifer works fine
// 5. but connect math node to identifier and then code block to math does not update preview of math
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "CreateGraph.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var1");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3);
}
示例2: Array_update_item_1602
public void Array_update_item_1602()
{
// Create CBN a : 1..3
// Create CBN b : {1,2,3}
// modify b[0]=a
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "Array_update-item_1602.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("b");
List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue());
List<Obj> level2 = GetArrayElements(mirror, elements[0].DsasmValue);
Assert.IsTrue((Int64)elements[1].Payload == 2);
Assert.IsTrue((Int64)elements[2].Payload == 3);
Assert.IsTrue((Int64)level2[0].Payload == 1);
Assert.IsTrue((Int64)level2[1].Payload == 2);
Assert.IsTrue((Int64)level2[2].Payload == 3);
}
示例3: T092_IDE_1979
public void T092_IDE_1979()
{
// http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1979
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "deffect_1979.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue());
Assert.IsTrue((Int64)elements[0].Payload == 3);
}
示例4: Crossreference
public void Crossreference()
{
// 1. Create a code block node a=1
// 2. Create another one b=a and assign an indentifer
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "CrossReference.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("I268435459");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1);
}
示例5: GraphILTest_FFIClassUsage_04
//.........这里部分代码省略.........
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);
示例6: TestUndoDelete_1296
public void TestUndoDelete_1296()
{
//deffect IDE-1296
// 1. Create two driver nodes values 1 and 2
// 2. Connect each to identifier node
// 3. select all delete
// 4. Undo
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "UndoDelete_1296.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1);
ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("Var4");
Assert.IsTrue(mirror2.GetData().GetStackValue().opdata == 2);
}
示例7: TestSD_Replace
public void TestSD_Replace()
{
// create code block assign it to identifier
// create another code block and connect to identifer
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testSDReplace.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("I268435458");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 20);
}
示例8: TestSD_Modify
public void TestSD_Modify()
{
// modify code block -
// 1. create two code block nodes with values 10 and 20
// 2. add it using + operator
// 3. assign it to identifier
// 4. modify the code block value from 20 to 30
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testSDModify.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("I268435460");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 40);
}
示例9: TestSD_DeleteConnection
public void TestSD_DeleteConnection()
{
// create code block assign it to identifier
// delete connection
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testSDDeleteConnection.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("I268435458");
Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null);
}
示例10: T109_IDE_1931
public void T109_IDE_1931()
{
// Steps are mentioned in the defect http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1931
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T109_IDE_1931.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("q");
Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 0);
// Cannot count how many lines are there in the CBN which was the main focus of defect but adding this test case to catch regression in N2C.
}
示例11: T095_IDE_2096
public void T095_IDE_2096()
{
// CBN: a=1;b=2;c=3;
// CBN: d=2;e=a+b+c;
// Varify e should have the preivew value 6
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T095_IDE_2096.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("e");
Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 6);
}
示例12: T095_IDE_1990
public void T095_IDE_1990()
{
//http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1990
//Create a CBN a Create a CBN 1 connect the above delete the connection the preview for a still shown as 1
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "defect_1990.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null);
}
示例13: T095_IDE_1950
public void T095_IDE_1950()
{
//http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1950
//Create with CBN 1 ->CBN a->CBN B=a ,connect 1 to a here the preview for a is not created
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "deffect_1950.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 1);
ProtoCore.Mirror.RuntimeMirror mirror2 = liveRunner.QueryNodeValue("b");
Assert.IsTrue((double)mirror2.GetData().GetStackValue().opdata_d == 1);
}
示例14: T095_IDE_1854_2
public void T095_IDE_1854_2()
{
//http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1854
//1. create CBN[a = 1] 2. delete it3. create CBN[a = 10]4. verify a is 10
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "deffect_1854_2.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
Assert.IsTrue((double)mirror.GetData().GetStackValue().opdata_d == 10);
}
示例15: T094_IDE_1784
public void T094_IDE_1784()
{
//http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1784
// the case in deffect is negative test
// so to verify - 1.Create CBN ‘a’
//2.Create CBN {1,2}
//3.Connect them
//4. Change ‘a’ to ‘{a,1}’
//5. Change ‘{1,2}’ to ‘{1}’
// create CBN a
// change {1,2} to a={1,2}
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "deffect_1784.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
List<Obj> elements = GetArrayElements(mirror, mirror.GetData().GetStackValue());
Assert.IsTrue((Int64)elements[0].Payload == 1);
Assert.IsTrue((Int64)elements[1].Payload == 2);
}