Browse Source

Update some tests in Generic Graph Interface.

master
Sergiu Ivanov 1 year ago
parent
commit
ded8b4c0e8
  1. 4
      graph.rkt

4
graph.rkt

@ -152,9 +152,9 @@
(check-equal? (edge-weight g 'a 'c) +inf.0)
(check-equal? (edge-weight g 'a 'c #:default 'none) 'none)
(check-equal? (graphviz (transpose g))
"digraph G {\n\tnode0 [label=\"c\"];\n\tnode1 [label=\"b\"];\n\tnode2 [label=\"a\"];\n\tsubgraph U {\n\t\tedge [dir=none];\n\t}\n\tsubgraph D {\n\t\tnode0 -> node1;\n\t}\n}\n")
"digraph G {\n\tnode0 [label=\"c\"];\n\tnode1 [label=\"a\"];\n\tnode2 [label=\"b\"];\n\tsubgraph U {\n\t\tedge [dir=none];\n\t}\n\tsubgraph D {\n\t\tnode0 -> node2;\n\t}\n}\n")
(check-equal? (graphviz (graph-copy g))
"digraph G {\n\tnode0 [label=\"c\"];\n\tnode1 [label=\"b\"];\n\tnode2 [label=\"a\"];\n\tsubgraph U {\n\t\tedge [dir=none];\n\t}\n\tsubgraph D {\n\t\tnode1 -> node0;\n\t}\n}\n")
"digraph G {\n\tnode0 [label=\"c\"];\n\tnode1 [label=\"a\"];\n\tnode2 [label=\"b\"];\n\tsubgraph U {\n\t\tedge [dir=none];\n\t}\n\tsubgraph D {\n\t\tnode2 -> node0;\n\t}\n}\n")
(graph-union! g (transpose g)))
(test-case "10 Graphviz"

Loading…
Cancel
Save