formatting
authorGary King <gwking@metabang.com>
Sun, 7 Sep 2008 01:02:21 +0000 (21:02 -0400)
committerGary King <gwking@metabang.com>
Sun, 7 Sep 2008 01:02:21 +0000 (21:02 -0400)
darcs-hash:20080907010221-3cc5d-408e62c84a9b368089ec1d8556ca8e216b2a72f4.gz

unit-tests/test-graph.lisp

index 3e36301..6e95fe0 100644 (file)
 ;;; ---------------------------------------------------------------------------
 
 (deftestsuite test-basic-graph-properties (cl-graph-test)
-  ((graph-undirected (make-container 'graph-container :default-edge-type :undirected))
-   (graph-directed (make-container 'graph-container :default-edge-type :directed)))
+  ((graph-undirected (make-container 'graph-container
+                                    :default-edge-type :undirected))
+   (graph-directed (make-container 'graph-container
+                                  :default-edge-type :directed)))
   :setup ((loop for v in '(a b c d e) do
                 (add-vertex graph-undirected v)
                 (add-vertex graph-directed v))
                 (add-edge-between-vertexes graph-undirected v1 v2)
                 (add-edge-between-vertexes graph-directed v1 v2))))
 
+#+(or)
+(let ((g (make-container 'graph-container
+                        :default-edge-type :directed)))
+  (loop for v in '(a b c d e) do
+                (add-vertex g v))
+  (loop for (v1 . v2) in '((a . b) (a . c) (b . d) (c . e)) do
+       (add-edge-between-vertexes g v1 v2))
+  g)
+
 ;;; ---------------------------------------------------------------------------
 
 (addtest (test-basic-graph-properties)