]> granicus.if.org Git - graphviz/commitdiff
tests: test_edge_node_overlap_utilities: add support for edge direction
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 14 Sep 2022 07:29:11 +0000 (09:29 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Sep 2022 15:53:06 +0000 (17:53 +0200)
tests/test_edge_node_overlap_utilities.cpp
tests/test_edge_node_overlap_utilities.h

index b9bc46926f92574882c7933029cd16555eb15574..5b15dea97e5a67ada0773bf8b3f7fd256eb202e9 100644 (file)
@@ -305,12 +305,12 @@ static std::string generate_dot(const graph_options &graph_options) {
   return fmt::format("digraph g1 {{"
                      "  graph [rankdir={}]"
                      "  node [penwidth={} shape={} color={} fontname=Courier]"
-                     "  edge [penwidth={} color={}]"
+                     "  edge [penwidth={} color={} dir={}]"
                      "  a -> b"
                      "}}",
                      graph_options.rankdir, graph_options.node_penwidth,
                      graph_options.node_shape, color,
-                     graph_options.edge_penwidth, color);
+                     graph_options.edge_penwidth, color, graph_options.dir);
 }
 
 void test_edge_node_overlap(const graph_options &graph_options,
index 1caa0c353be4dff18210a2903132b1ca52eebe7e..d101c8c00fea165e870f60f9b6c5b2c7d094556e 100644 (file)
@@ -28,6 +28,7 @@ struct graph_options {
   std::string_view rankdir = "TB";
   std::string_view node_shape = "polygon";
   double node_penwidth = 1;
+  std::string_view dir = "forward";
   double edge_penwidth = 1;
 };