diff trunk/src/docgen/tests/graphs.d @ 454:dbdc9fa5d479

depgraph fixes, better design for multiple doctargets.
author Jari-Matti M?kel? <jmjm@iki.fi>
date Fri, 26 Oct 2007 01:04:09 +0200
parents 4e5b35df3060
children 33a4cb255fcc
line wrap: on
line diff
--- a/trunk/src/docgen/tests/graphs.d	Thu Oct 25 01:08:38 2007 +0300
+++ b/trunk/src/docgen/tests/graphs.d	Fri Oct 26 01:04:09 2007 +0200
@@ -15,7 +15,6 @@
   auto gen = new TestDocGenerator;
   gen.options.graph.highlightCyclicVertices = true;
   gen.options.graph.imageFormat = ImageFormat.SVG;
-  gen.options.graph.graphFormat = GraphFormat.Dot;
   //gen.options.graph.graphFormat = GraphFormat.ModuleNames;
   //gen.options.graph.graphFormat = GraphFormat.ModulePaths;
   gen.options.graph.depth = 5;
@@ -23,9 +22,12 @@
   auto gwf = new DefaultGraphWriterFactory(gen);
   auto file = new FileConduit("docgen/teststuff/" ~ fname, FileConduit.WriteCreate);
   auto file2 = new FileConduit("docgen/teststuff/" ~ fname ~ "-2", FileConduit.WriteCreate);
-  auto writer = gwf.createGraphWriter( ddf.createDocumentWriter( [ file2 ] ) );
+  auto writer = gwf.createGraphWriter(
+    ddf.createDocumentWriter( [ file2 ], DocFormat.LaTeX),
+    GraphFormat.Dot
+  );
   
-  writer.generateGraph(vertices, edges, file);
+  writer.generateDepGraph(vertices, edges, file);
   
   file.close();
   file2.close();
@@ -107,9 +109,8 @@
 void graph5() {
   auto gen = new TestDocGenerator;
   gen.options.graph.highlightCyclicVertices = true;
-  gen.options.graph.graphFormat = GraphFormat.Dot;
-  gen.options.graph.imageFormat = ImageFormat.SVG;
-  gen.options.docFormat = DocFormat.LaTeX;
+  gen.options.graph.imageFormat = ImageFormat.PDF;
+  gen.options.outputFormats = [ DocFormat.LaTeX ];
   auto fname = "dependencies.tex";
   auto imgFname = "depgraph.dot";
   
@@ -135,9 +136,12 @@
     modules
   );
 
-  auto writer = gwf.createGraphWriter( ddf.createDocumentWriter( [ file ] ) );
+  auto writer = gwf.createGraphWriter(
+    ddf.createDocumentWriter( [ file ], DocFormat.LaTeX ),
+    GraphFormat.Dot
+  );
   
-  writer.generateGraph(vertices.values, edges, imgFile);
+  writer.generateDepGraph(vertices.values, edges, imgFile);
   
   file.close();
   imgFile.close();