guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: graph: Add synthetic test.


From: Ludovic Courtès
Subject: 03/03: graph: Add synthetic test.
Date: Sun, 13 Dec 2015 21:32:52 +0000

civodul pushed a commit to branch master
in repository guix.

commit 88d5858f55ea824cd9f09d8d3481a9a85aea3fa8
Author: Ludovic Courtès <address@hidden>
Date:   Sun Dec 13 21:41:52 2015 +0100

    graph: Add synthetic test.
    
    * tests/graph.scm ("node-transitive-edges, no duplicates"): New test.
---
 tests/graph.scm |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tests/graph.scm b/tests/graph.scm
index ad8aea0..04c6e74 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -250,6 +250,17 @@ edges."
                                        (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")
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]