public void WriteGraphEnd_Test()
        {
            var stringBuilder = new StringBuilder();
            var writer        = new DotWriter(new StringWriter(stringBuilder));

            writer.WriteGraphEnd();

            stringBuilder.ToString().Should().BeIgnoringLineEndings("}\r\n");
        }
            public void Visit(string methodName, IControlFlowGraph cfg)
            {
                writer.WriteGraphStart(methodName);

                foreach (var block in cfg.Blocks)
                {
                    Visit(block);
                }

                writer.WriteGraphEnd();
            }
Beispiel #3
0
            public void Visit(string methodName, UCFG ucfg)
            {
                writer.WriteGraphStart(methodName);

                writer.WriteNode(EntryBlockId, EntryBlockId, ucfg.Parameters.ToArray());

                foreach (var entry in ucfg.Entries)
                {
                    writer.WriteEdge(EntryBlockId, entry, string.Empty);
                }

                foreach (var block in ucfg.BasicBlocks)
                {
                    Visit(block);
                }

                writer.WriteNode(ExitBlockId, ExitBlockId);

                writer.WriteGraphEnd();
            }