diff options
Diffstat (limited to 'tests/unit/util')
-rw-r--r-- | tests/unit/util/graph.scm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/unit/util/graph.scm b/tests/unit/util/graph.scm new file mode 100644 index 00000000..43690fb5 --- /dev/null +++ b/tests/unit/util/graph.scm @@ -0,0 +1,22 @@ +(define-module (test hnh-util-graph) + :use-module (srfi srfi-64) + :use-module (srfi srfi-88) + :use-module ((hnh util) :select (->)) + :use-module (hnh util graph) + ) + +(define g (make-graph string->symbol + string=?)) + +(test-assert "New graphs are empty" (graph-empty? g)) + +(let ((g2 (-> g + (add-node "a" '()) + (add-node "b" '(a))))) + (test-assert "Changing graph doesn't change source graph" + (graph-empty? g)) + + (test-equal '("a" "b") + (resolve-dependency-graph g2))) + +'((hnh util graph)) |