Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'test/graph.xspec')
-rw-r--r--test/graph.xspec27
1 files changed, 21 insertions, 6 deletions
diff --git a/test/graph.xspec b/test/graph.xspec
index 2b44b44..d7fdb9a 100644
--- a/test/graph.xspec
+++ b/test/graph.xspec
@@ -174,7 +174,7 @@
</scenario>
- <scenario label="given single graph with duplicate vectors">
+ <scenario label="given single graph with duplicate vertices">
<call function="graph:union">
<param name="graphs"
select="$foo:graph-with-dupes" />
@@ -248,10 +248,6 @@
<scenario label="in a separate package">
- <variable name="foo:expected-lookup" as="element()">
- <foo:lookup-ok />
- </variable>
-
<scenario label="where dependencies exist">
<call function="graph:dep-lookup">
<param name="lookup"
@@ -266,9 +262,28 @@
</call>
<expect label="returns external dependenices"
- test="exists( $x:result/foo:lookup-ok )" />
+ test="deep-equal( $x:result/*, $foo:expected-lookup )" />
</scenario>
</scenario>
</scenario>
</scenario>
+
+
+ <scenario label="graph:make-from-deps">
+ <call function="graph:make-from-deps">
+ <param name="lookup"
+ select="foo:lookup-sym( $foo:expected-lookup )" />
+
+ <param name="symbols"
+ select="$foo:sym-list" />
+ </call>
+
+ <expect label="produces a graph"
+ test="$x:result instance of element( preproc:sym-deps )" />
+
+ <expect label="looks up each symbol"
+ test="every $vertex in $x:result/preproc:sym-dep
+ satisfies
+ deep-equal( $vertex/*, $foo:expected-lookup )" />
+ </scenario>
</description>