Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitm@lovullo.com>2016-07-05 16:14:15 -0400
committerMike Gerwitz <gerwitm@lovullo.com>2016-07-06 00:16:12 -0400
commit641147cd8ff84755b640869e55c8be48cc566b31 (patch)
treeb6ab16e5013b9bc308e8ef56b9455f5ccd992192 /test
parentbcf1e0457fc3f8a41d9c8e7692228b33649d777a (diff)
downloadtame-641147cd8ff84755b640869e55c8be48cc566b31.tar.gz
tame-641147cd8ff84755b640869e55c8be48cc566b31.tar.bz2
tame-641147cd8ff84755b640869e55c8be48cc566b31.zip
graph:union normalize/dedupe test
This was already happening, but formally test and document it, since it's a very useful property. * src/graph.xsl (graph:union): Document dedupe behavior * test/graph-test.xsl: Add test data * test/graph.xspec: Add dedupe test for graph:union
Diffstat (limited to 'test')
-rw-r--r--test/graph-test.xsl25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/graph-test.xsl b/test/graph-test.xsl
index 63cf618..e8f7b5b 100644
--- a/test/graph-test.xsl
+++ b/test/graph-test.xsl
@@ -169,6 +169,31 @@
</variable>
+<variable name="foo:graph-with-dupes" as="element( preproc:sym-deps )">
+ <preproc:sym-deps>
+ <preproc:sym-dep name="dup">
+ <preproc:sym-ref name="a" />
+ </preproc:sym-dep>
+
+ <preproc:sym-dep name="dup">
+ <preproc:sym-ref name="b" />
+ <preproc:sym-ref name="b" />
+ <preproc:sym-ref name="b" />
+ </preproc:sym-dep>
+ </preproc:sym-deps>
+</variable>
+
+
+<variable name="foo:graph-deduped" as="element( preproc:sym-deps )">
+ <preproc:sym-deps>
+ <preproc:sym-dep name="dup">
+ <preproc:sym-ref name="a" />
+ <preproc:sym-ref name="b" />
+ </preproc:sym-dep>
+ </preproc:sym-deps>
+</variable>
+
+
<function name="foo:lookup">
<param name="yield" as="element()" />
<param name="symbol" as="element( preproc:sym )" />