summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-03 22:25:55 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:31 +0200
commite784f89f1b35e6d87c2027a881fa786b9e0238cf (patch)
treeb27953ef820cc76c879b4bc27a5e05063d4deb22
parent3899cd3c8fb3eccb73a43208e90d88cfcc64c41c (diff)
Test underscore token
* Move test math environment to integration folder * Add math_limits integration test
-rw-r--r--testdata/integration/user_defined_syntax/math.osml (renamed from testdata/osmlparser/math.osml)18
-rw-r--r--testdata/integration/user_defined_syntax/math_limits.in.osml5
-rw-r--r--testdata/integration/user_defined_syntax/math_limits.out.osxml28
3 files changed, 42 insertions, 9 deletions
diff --git a/testdata/osmlparser/math.osml b/testdata/integration/user_defined_syntax/math.osml
index acb494d..2f53366 100644
--- a/testdata/osmlparser/math.osml
+++ b/testdata/integration/user_defined_syntax/math.osml
@@ -52,16 +52,16 @@
}%
\struct#sum[isa=primitive]
\field
- \childRef[ref=range]
+ \childRef[ref=limits]
\struct#prod[isa=primitive]
\field
- \childRef[ref=range]
+ \childRef[ref=limits]
\struct#int[isa=primitive]
\field
- \childRef[ref=range]
+ \childRef[ref=limits]
\struct#iint[isa=primitive]
\field
- \childRef[ref=range]
+ \childRef[ref=limits]
\struct#frac[isa=primitive]
\field#denominator[subtree=true,optional=false]
\childRef[ref=primitive]
@@ -206,16 +206,16 @@
\primitive[type=int]
\struct#text[isa=primitive,transparent=true]
\primitive[type=string]
- \struct#range[transparent=true]
+ \struct#limits[transparent=true]
\field
- \childRef[ref=lower]
- \childRef[ref=upper]
- \struct#lower[cardinality={0,1}]
+ \childRef[ref=lowerLimits]
+ \childRef[ref=upperLimits]
+ \struct#lowerLimits[cardinality={0,1}]
\syntax
\short{_}
\field
\childRef[ref=primitive]
- \struct#upper[cardinality={0,1}]
+ \struct#upperLimits[cardinality={0,1}]
\syntax
\short{^}
\field
diff --git a/testdata/integration/user_defined_syntax/math_limits.in.osml b/testdata/integration/user_defined_syntax/math_limits.in.osml
new file mode 100644
index 0000000..dbb21aa
--- /dev/null
+++ b/testdata/integration/user_defined_syntax/math_limits.in.osml
@@ -0,0 +1,5 @@
+\document
+\import[ontology]{./math}
+\begin{math}
+ \sum_{i=3}^{5} i_{M}^{2}
+\end{math}
diff --git a/testdata/integration/user_defined_syntax/math_limits.out.osxml b/testdata/integration/user_defined_syntax/math_limits.out.osxml
new file mode 100644
index 0000000..d39c34a
--- /dev/null
+++ b/testdata/integration/user_defined_syntax/math_limits.out.osxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document xmlns:math="math">
+ <math:math>
+ <math:equation>
+ <math:field>
+ <math:sum>
+ <math:limits>
+ <math:lowerLimits>
+ <math:text>i</math:text>
+ <math:equals/>
+ <math:number>3</math:number>
+ </math:lowerLimits>
+ <math:upperLimits>
+ <math:number>5</math:number>
+ </math:upperLimits>
+ </math:limits>
+ </math:sum>
+ <math:text>i</math:text>
+ <math:index>
+ <math:text>M</math:text>
+ </math:index>
+ <math:power>
+ <math:number>2</math:number>
+ </math:power>
+ </math:field>
+ </math:equation>
+ </math:math>
+</document>