diff options
author | Mike Gerwitz <gerwitm@lovullo.com> | 2016-07-05 16:14:15 -0400 |
---|---|---|
committer | Mike Gerwitz <gerwitm@lovullo.com> | 2016-07-06 00:16:12 -0400 |
commit | 641147cd8ff84755b640869e55c8be48cc566b31 (patch) | |
tree | b6ab16e5013b9bc308e8ef56b9455f5ccd992192 /test | |
parent | bcf1e0457fc3f8a41d9c8e7692228b33649d777a (diff) | |
download | tame-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.xsl | 25 |
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 )" /> |