mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
graph: Add synthetic test.
* tests/graph.scm ("node-transitive-edges, no duplicates"): New test.
This commit is contained in:
parent
20464dde13
commit
88d5858f55
1 changed files with 11 additions and 0 deletions
|
@ -250,6 +250,17 @@ (define (edge->tuple source target)
|
|||
(bootstrap? package)))
|
||||
diff))))))))
|
||||
|
||||
(test-assert "node-transitive-edges, no duplicates"
|
||||
(run-with-store %store
|
||||
(let* ((p0 (dummy-package "p0"))
|
||||
(p1a (dummy-package "p1a" (inputs `(("p0" ,p0)))))
|
||||
(p1b (dummy-package "p1b" (inputs `(("p0" ,p0)))))
|
||||
(p2 (dummy-package "p2" (inputs `(("p1a" ,p1a) ("p1b" ,p1b))))))
|
||||
(mlet %store-monad ((edges (node-edges %package-node-type
|
||||
(list p2 p1a p1b p0))))
|
||||
(return (lset= eq? (node-transitive-edges (list p2) edges)
|
||||
(list p1a p1b p0)))))))
|
||||
|
||||
(test-end "graph")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue