本文整理汇总了C#中ProtoScript.Runners.LiveRunner类的典型用法代码示例。如果您正苦于以下问题:C# ProtoScript.Runners.LiveRunner类的具体用法?C# ProtoScript.Runners.LiveRunner怎么用?C# ProtoScript.Runners.LiveRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProtoScript.Runners.LiveRunner类属于命名空间,在下文中一共展示了ProtoScript.Runners.LiveRunner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:14,代码来源:MicroFeatureTests.cs
示例2: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:18,代码来源:MicroFeatureTests.cs
示例3: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:24,代码来源:MicroFeatureTests.cs
示例4: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:26,代码来源:MicroFeatureTests.cs
示例5: GraphILTest_FFIClassUsage_04
//.........这里部分代码省略.........
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
开发者ID:Benglin,项目名称:designscript,代码行数:67,代码来源:MicroFeatureTests.cs
示例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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:19,代码来源:MicroFeatureTests.cs
示例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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:14,代码来源:MicroFeatureTests.cs
示例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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:17,代码来源:MicroFeatureTests.cs
示例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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:14,代码来源:MicroFeatureTests.cs
示例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.
}
开发者ID:Benglin,项目名称:designscript,代码行数:15,代码来源:MicroFeatureTests.cs
示例11: T105_IDE_2043
public void T105_IDE_2043()
{
// Steps are mentioned in the defect http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-2043
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T105_IDE_2043.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
// Verification pending, just adding to catch regression while running snap shot data.
}
开发者ID:Benglin,项目名称:designscript,代码行数:12,代码来源:MicroFeatureTests.cs
示例12: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:15,代码来源:MicroFeatureTests.cs
示例13: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:14,代码来源:MicroFeatureTests.cs
示例14: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:16,代码来源:MicroFeatureTests.cs
示例15: 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);
}
开发者ID:Benglin,项目名称:designscript,代码行数:14,代码来源:MicroFeatureTests.cs
示例16: TestNonExistentnodes
public void TestNonExistentnodes()
{
// non existent node -
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "null.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("var1");
Assert.IsTrue(mirror.GetData().GetStackValue().optype == ProtoCore.DSASM.AddressType.Null);
}
开发者ID:Benglin,项目名称:designscript,代码行数:13,代码来源:MicroFeatureTests.cs
示例17: TestReconnect_1278
public void TestReconnect_1278()
{
//1. Create two code block
//2. Connect one to the identifer
//3. Reconnect the other code block to the identifer
//4. undo , unless i click on the canvas its not updated
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testSDReconnect_Undo.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var2");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 1);
}
开发者ID:Benglin,项目名称:designscript,代码行数:16,代码来源:MicroFeatureTests.cs
示例18: T113_IDE_2181
public void T113_IDE_2181()
{
// Steps are mentioned in the defect http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-2181
/*
* 1. Start DSS and create a CBN :
a1 = Point.ByCoordinates(0, 0, 0);
a2 = Point.ByCoordinates(1, 1, 1);
l1 = Line.ByCoordinates(a1, a2);
2. Now create an identifier node assign the last line to it -> there is an error saying there is not match for Line.ByCoordinates.
3. Then I go and update the CBN to :
a1 = Point.ByCoordinates(0, 0, 0);
a2 = Point.ByCoordinates(1, 1, 1);
l1 = Line.ByStartPointEndPoint(a1, a2);
3. Create a node from the Line.Length and verify it's value
**/
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T113_IDE_2181.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("Var3");
Assert.IsTrue(Math.Round(mirror.GetData().GetStackValue().opdata_d, 3) == 1.732);
}
开发者ID:Benglin,项目名称:designscript,代码行数:27,代码来源:MicroFeatureTests.cs
示例19: TestSD_function
public void TestSD_function()
{
// creation-function node- create two code block nodes and assign it to + operator
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "testSDFunction.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("a");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 3);
}
开发者ID:Benglin,项目名称:designscript,代码行数:12,代码来源:MicroFeatureTests.cs
示例20: T114_IDE_1551
public void T114_IDE_1551()
{
// Steps are mentioned in the defect http://adsk-oss.myjetbrains.com/youtrack/issue/IDE-1551
// Create various CBNs :
// 1. CBN : // This is a comment
// 2. CBN : // This is a comment 1
// // This is comment 2
// a = 1;
// 3. CBN : /* This is commennt 1
// * this is a comment 2
// */
// b = a;
// 4. CBN : // this is comment
// c = b;
// // this is comment
// d = c + 1;
// // this is comment
// 5. Verify d = 2
ProtoScript.Runners.ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner();
List<SynchronizeData> ls = GraphToDSCompiler.GraphUtilities.GetSDList(testPath + "T114_IDE_1551.xml");
foreach (SynchronizeData sd in ls)
liveRunner.UpdateGraph(sd);
ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.QueryNodeValue("d");
Assert.IsTrue(mirror.GetData().GetStackValue().opdata == 2);
}
开发者ID:Benglin,项目名称:designscript,代码行数:27,代码来源:MicroFeatureTests.cs
注:本文中的ProtoScript.Runners.LiveRunner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论