From 0b38259979a95f3df2946f1032f220b1dc8eb9ff Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Fri, 1 Jan 2021 21:56:50 +0100 Subject: [PATCH] Fix the tests. --- graph.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graph.rkt b/graph.rkt index fb2fee5..25fd6ee 100644 --- a/graph.rkt +++ b/graph.rkt @@ -70,9 +70,10 @@ (test-case "1 Generic Graph Interface" (define g (directed-graph '((a b) (b c)))) - (check-true (has-edge? g 'a 'c)) + (check-false (has-edge? g 'a 'c)) (check-true (has-vertex? g 'a))) (test-case "10 Graphviz" (define g (directed-graph '((a b) (b c)))) - (graphviz g))) + (check-equal? (graphviz 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\tnode2 -> node1;\n\t}\n}\n")))