Remove formatting dependencies from test results
authorMichael Kay <mike@saxonica.com>
Mon, 18 Jan 2016 18:31:31 +0000
changeset 1208 b16728df2ffd
parent 1207 6b8617992d0d
child 1209 756516dd1f4a
Remove formatting dependencies from test results
tests/expr/math/_math-test-set.xml
tests/expr/math/math-3301a.xsl
--- a/tests/expr/math/_math-test-set.xml	Fri Jan 15 00:03:38 2016 +0000
+++ b/tests/expr/math/_math-test-set.xml	Mon Jan 18 18:31:31 2016 +0000
@@ -2129,7 +2129,13 @@
          <stylesheet file="math-3301.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3301.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-200" and @c="-200" and @d="-200"]</assert>
+         </all-of>
       </result>
    </test-case>
    
@@ -2144,7 +2150,13 @@
          <stylesheet file="math-3301a.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3301.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-200" and @c="-200" and @d="-200"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2159,6 +2171,15 @@
          <stylesheet file="math-3302.xsl"/>
       </test>
       <result>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.02" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.02" and @d="-250.02"]</assert>
+         </all-of>
          <assert-xml file="math-3302.out"/>
       </result>
    </test-case>
@@ -2174,7 +2195,15 @@
          <stylesheet file="math-3302a.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3302.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.02" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.02" and @d="-250.02"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2189,7 +2218,15 @@
          <stylesheet file="math-3303.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3303.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="-0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.02" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.02" and @d="-250.02"]</assert>
+         </all-of>
       </result>
    </test-case>
    
@@ -2204,7 +2241,15 @@
          <stylesheet file="math-3303a.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3303.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="-0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.02" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.02" and @d="-250.02"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2219,7 +2264,15 @@
          <stylesheet file="math-3304.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3304.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="-0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.01" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.01" and @d="-250.02"]</assert>
+         </all-of>
       </result>
    </test-case>
    
@@ -2234,7 +2287,15 @@
          <stylesheet file="math-3304a.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3304.out"/>
+         <all-of>
+            <assert>/out/a[1][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[2][@b="120" and @c="0" and @d="-3"]</assert>
+            <assert>/out/a[3][@b="100" and @c="0" and @d="-0"]</assert>
+            <assert>/out/a[4][@b="200" and @c="200" and @d="200"]</assert>
+            <assert>/out/a[5][@b="-100" and @c="-200" and @d="-200"]</assert>
+            <assert>/out/a[6][@b="180.02" and @c="150.01" and @d="250.02"]</assert>
+            <assert>/out/a[7][@b="-120.01" and @c="-150.01" and @d="-250.02"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2249,7 +2310,12 @@
          <stylesheet file="math-3305.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3305.out"/>
+         <all-of>
+            <assert>/out/int[@a="3" and @b="3" and @c="0"]</assert>
+            <assert>/out/decimal[@a="3.2" and @b="3.2" and @c="0"]</assert>
+            <assert>/out/double[@a="3.2" and @b="3.2" and @c="0" and @d="0" and @e="NaN" and @f="INF" and @g="INF"]</assert>
+            <assert>/out/float[@a="3.2" and @b="3.2" and @c="0" and @d="0" and @e="NaN" and @f="INF" and @g="INF"]</assert>
+         </all-of>
       </result>
    </test-case>
    
@@ -2264,7 +2330,12 @@
          <stylesheet file="math-3305a.xsl"/>
       </test>
       <result>
-         <assert-xml file="math-3305.out"/>
+         <all-of>
+            <assert>/out/int[@a="3" and @b="3" and @c="0"]</assert>
+            <assert>/out/decimal[@a="3.2" and @b="3.2" and @c="0"]</assert>
+            <assert>/out/double[@a="3.2" and @b="3.2" and @c="0" and @d="0" and @e="NaN" and @f="INF" and @g="INF"]</assert>
+            <assert>/out/float[@a="3.2" and @b="3.2" and @c="0" and @d="0" and @e="NaN" and @f="INF" and @g="INF"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2279,8 +2350,11 @@
          <stylesheet file="math-3306.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema">;
-<decimal a="3" b="-3"/><double a="3" b="-3"/><float a="3" b="-3"/></out>]]></assert-xml>
+         <all-of>
+            <assert>/out/decimal[@a="3" and @b="-3"]</assert>
+            <assert>/out/double[@a="3" and @b="-3"]</assert>
+            <assert>/out/float[@a="3" and @b="-3"]</assert>
+         </all-of>
       </result>
    </test-case>
    
@@ -2295,8 +2369,11 @@
          <stylesheet file="math-3306a.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema">;
-<decimal a="3" b="-3"/><double a="3" b="-3"/><float a="3" b="-3"/></out>]]></assert-xml>
+         <all-of>
+            <assert>/out/decimal[@a="3" and @b="-3"]</assert>
+            <assert>/out/double[@a="3" and @b="-3"]</assert>
+            <assert>/out/float[@a="3" and @b="-3"]</assert>
+         </all-of>
       </result>
    </test-case>
 
@@ -2326,7 +2403,7 @@
          <stylesheet file="math-3307a.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema" result="true"/>]]></assert-xml>
+         <assert>/out/@result = "true"</assert>
       </result>
    </test-case>
 
@@ -2341,7 +2418,7 @@
          <stylesheet file="math-3308.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>NaN</out>]]></assert-xml>
+         <assert>/out = "NaN"</assert>
       </result>
    </test-case>
    
@@ -2356,7 +2433,7 @@
          <stylesheet file="math-3308a.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>NaN</out>]]></assert-xml>
+         <assert>/out = "NaN"</assert>
       </result>
    </test-case>
 
@@ -2371,7 +2448,7 @@
          <stylesheet file="math-3309.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>-2</out>]]></assert-xml>
+         <assert>/out = "-2"</assert>
       </result>
    </test-case>
    
@@ -2386,7 +2463,7 @@
          <stylesheet file="math-3309a.xsl"/>
       </test>
       <result>
-         <assert-xml><![CDATA[<out>-2</out>]]></assert-xml>
+         <assert>/out = "-2"</assert>
       </result>
    </test-case>
 
--- a/tests/expr/math/math-3301a.xsl	Fri Jan 15 00:03:38 2016 +0000
+++ b/tests/expr/math/math-3301a.xsl	Mon Jan 18 18:31:31 2016 +0000
@@ -7,12 +7,12 @@
     <xsl:param name="p" select="1"/>
 
 <xsl:template match="doc">
-<out>;
-    <a b="{round-half-to-even($p*120)}" c="{round-half-to-even($p*0)}" d="{round-half-to-even($p*-3)}"/>;
-    <a b="{round-half-to-even($p*120, 2)}" c="{round-half-to-even($p*0, 2)}" d="{round-half-to-even($p*-3, 2)}"/>;
-    <a b="{round-half-to-even($p*120, -2)}" c="{round-half-to-even($p*0, -2)}" d="{round-half-to-even($p*-3, -2)}"/>;
-    <a b="{round-half-to-even($p*180, -2)}" c="{round-half-to-even($p*150, -2)}" d="{round-half-to-even($p*250, -2)}"/>;
-    <a b="{round-half-to-even($p*-180, -2)}" c="{round-half-to-even($p*-150, -2)}" d="{round-half-to-even($p*-250, -2)}"/>;
+<out>
+    <a b="{round-half-to-even($p*120)}" c="{round-half-to-even($p*0)}" d="{round-half-to-even($p*-3)}"/>
+    <a b="{round-half-to-even($p*120, 2)}" c="{round-half-to-even($p*0, 2)}" d="{round-half-to-even($p*-3, 2)}"/>
+    <a b="{round-half-to-even($p*120, -2)}" c="{round-half-to-even($p*0, -2)}" d="{round-half-to-even($p*-3, -2)}"/>
+    <a b="{round-half-to-even($p*180, -2)}" c="{round-half-to-even($p*150, -2)}" d="{round-half-to-even($p*250, -2)}"/>
+    <a b="{round-half-to-even($p*-180, -2)}" c="{round-half-to-even($p*-150, -2)}" d="{round-half-to-even($p*-250, -2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file