Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2016-11-17 08:56:40 -0500
committerMike Gerwitz <gerwitzm@lovullo.com>2016-11-17 23:55:23 -0500
commit1d3aaf3339f30e43ee764e8dd898b382dc9e3e76 (patch)
treea9e878d95820fbbf1999dcf5d1c8a7eb73bbb7e4 /test/symtable/symbols.xspec
parentf396858fb18b915a0f03e6d02c4aebb55b0000bc (diff)
downloadtame-1d3aaf3339f30e43ee764e8dd898b382dc9e3e76.tar.gz
tame-1d3aaf3339f30e43ee764e8dd898b382dc9e3e76.tar.bz2
tame-1d3aaf3339f30e43ee764e8dd898b382dc9e3e76.zip
Extracted param symbol generation
The `preproc:param-dim' template must remain for now, as it is used by others. * src/current/include/preproc/symtable.xsl (preproc:symtable)[lv:param]: Extracted template. * src/symtable/symbols.xsl (preproc:symtable)[lv:param]: Added template. * test/symtable/symbols.xsl (lv:param): Scenario added.
Diffstat (limited to 'test/symtable/symbols.xspec')
-rw-r--r--test/symtable/symbols.xspec71
1 files changed, 71 insertions, 0 deletions
diff --git a/test/symtable/symbols.xspec b/test/symtable/symbols.xspec
index d4dbdd8..d7135f7 100644
--- a/test/symtable/symbols.xspec
+++ b/test/symtable/symbols.xspec
@@ -29,6 +29,77 @@
stylesheet="../../src/symtable/symbols.xsl">
+ <scenario label="lv:param">
+ <context mode="preproc:symtable">
+ <lv:param name="foo_bar"
+ type="footype"
+ desc="Vector param"
+ set="vector" />
+
+ <lv:param name="tex_param"
+ type="tex"
+ desc="Matrix param with TeX"
+ set="matrix"
+ sym="\tex" />
+
+ <lv:param name="scalar_param"
+ type="bar"
+ desc="Scalar param (implicit)" />
+
+ <lv:param name="scalar_param_explicit"
+ type="bar"
+ set="scalar"
+ desc="Scalar param (explicit)" />
+
+ <lv:param name="unknown_dim"
+ type="wtf"
+ set="calabi-yau"
+ desc="Unknown dimension" />
+ </context>
+
+ <expect label="derives symbol data from param">
+ <preproc:sym type="param"
+ name="foo_bar"
+ dim="1"
+ desc="Vector param"
+ dtype="footype"
+ tex=""
+ keep="true" />
+
+ <preproc:sym type="param"
+ name="tex_param"
+ dim="2"
+ desc="Matrix param with TeX"
+ dtype="tex"
+ tex="\tex"
+ keep="true" />
+
+ <preproc:sym type="param"
+ name="scalar_param"
+ dim="0"
+ desc="Scalar param (implicit)"
+ dtype="bar"
+ tex=""
+ keep="true" />
+
+ <preproc:sym type="param"
+ name="scalar_param_explicit"
+ dim="0"
+ desc="Scalar param (explicit)"
+ dtype="bar"
+ tex=""
+ keep="true" />
+
+ <preproc:sym type="param"
+ name="unknown_dim"
+ dim="-1"
+ desc="Unknown dimension"
+ dtype="wtf"
+ tex=""
+ keep="true" />
+ </expect>
+ </scenario>
+
<scenario label="lv:template">
<context mode="preproc:symtable">
<lv:template name="_foo_"