graphviz_test.go 370 B

123456789101112131415
  1. package graphviz
  2. import (
  3. "testing"
  4. )
  5. func TestShow(test *testing.T) {
  6. g := NewDigraph("bgcolor", "pink")
  7. n_foo := g.AddNode("foo", "color", "red", "label", "FOO\nFOO")
  8. n_bar := g.AddNode("bar", "color", "green")
  9. _ = g.AddNode("baz", "color", "yellow")
  10. g.AddEdge(n_foo, n_bar, "color", "gray")
  11. _ = g.AddEdgeByName("foo", "baz", "color", "magenta")
  12. g.Dotty()
  13. }