Ejemplo n.º 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);
                }
            }
Ejemplo n.º 2
0
 public StatementsGenerator(MethodDefinition methodDef, Graph graph)
 {
     this.graph = graph;
     this.method = new CodeMethodMember(methodDef);
 }
Ejemplo n.º 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);
            }
Ejemplo n.º 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);
                }
            }
Ejemplo n.º 5
0
 private string ToStringDetails(Graph graph)
 {
     var sb = new StringBuilder();
     foreach (BasicBlock block in graph.Nodes) {
         sb.AppendLine(block.ToStringDetails());
     }
     return sb.ToString();
 }
Ejemplo n.º 6
0
 public Graph(Graph parent)
 {
     this.Parent = parent;
     this.Nodes = new List<Node>();
     this.Orphans = new List<Node>();
 }
Ejemplo n.º 7
0
 public IntervalGraph(Graph parent)
     : base(parent)
 {
 }