예제 #1
0
            public void Test(Graph graph, List<Graph> sequences)
            {
                Assert.AreEqual(this.levels.Count, sequences.Count);

                for (int i = 0; i < sequences.Count; i++) {
                    var expected = this.levels[i + 1];
                    var actual = sequences[i];

                    expected.Test(graph, actual);
                }
            }
예제 #2
0
 public StatementsGenerator(MethodDefinition methodDef, Graph graph)
 {
     this.graph = graph;
     this.method = new CodeMethodMember(methodDef);
 }
예제 #3
0
            public void Test(Graph graph, Interval interval)
            {
                var expected = new List<Node>();
                foreach (var nodeId in NodeIds) {
                    expected.Add(graph.Nodes[nodeId - 1]);
                }

                var actual = new List<Node>();
                interval.CollectNodes(actual);

                Assert.AreEqual(expected, actual);
            }
예제 #4
0
            public void Test(Graph graph, Graph intervalGraph)
            {
                Assert.AreEqual(this.intervals.Count, intervalGraph.Nodes.Count);

                for (int i = 0; i < intervalGraph.Nodes.Count; i++) {
                    var expected = this.intervals[i + 1];
                    var actual = (Interval)intervalGraph.Nodes[i];

                    expected.Test(graph, actual);
                }
            }
예제 #5
0
 private string ToStringDetails(Graph graph)
 {
     var sb = new StringBuilder();
     foreach (BasicBlock block in graph.Nodes) {
         sb.AppendLine(block.ToStringDetails());
     }
     return sb.ToString();
 }
예제 #6
0
파일: Graph.cs 프로젝트: JimmyJune/DotWeb
 public Graph(Graph parent)
 {
     this.Parent = parent;
     this.Nodes = new List<Node>();
     this.Orphans = new List<Node>();
 }
예제 #7
0
파일: Graph.cs 프로젝트: JimmyJune/DotWeb
 public IntervalGraph(Graph parent)
     : base(parent)
 {
 }