Ejemplo n.º 1
0
        private string Dump(ProcedureStructure str)
        {
            StringWriter sw = new StringWriter();

            str.Write(sw);
            return(sw.ToString());
        }
Ejemplo n.º 2
0
        public void LoopFinder_WhileGoto_TagNodes()
        {
            RunTest(new MockWhileGoto());
            StringWriter sw = new StringWriter();

            proc.Write(sw);
            Console.WriteLine(sw.ToString());
            Assert.AreEqual("LoopHead", proc.Ordering[6].Block.Name);
            Interval i = proc.DerivedGraphs[0].Intervals[1];

            Assert.AreEqual("LoopHead", i.Header.Name);

            LoopFinder lf        = new LoopFinder(proc.Ordering[6], proc.Ordering[2], proc.Ordering);
            var        loopNodes = lf.FindNodesInLoop(i.FindIntervalNodes(0));

            Assert.AreEqual(3, loopNodes.Count);
        }
Ejemplo n.º 3
0
 private string Dump(ProcedureStructure str)
 {
     StringWriter sw = new StringWriter();
     str.Write(sw);
     return sw.ToString();
 }