Math tests: reduce reliance on formatting of results
authorMichael Kay <mike@saxonica.com>
Mon, 25 Jan 2016 10:28:14 +0000
changeset 1212 a38bdcb0a71e
parent 1211 226a4c4600fb
child 1213 b62e4ad649b8
Math tests: reduce reliance on formatting of results
tests/expr/math/math-3301.xsl
tests/expr/math/math-3302.xsl
tests/expr/math/math-3302a.xsl
tests/expr/math/math-3303.xsl
--- a/tests/expr/math/math-3301.xsl	Mon Jan 25 10:27:46 2016 +0000
+++ b/tests/expr/math/math-3301.xsl	Mon Jan 25 10:28:14 2016 +0000
@@ -4,12 +4,12 @@
 <!-- PURPOSE:  Test of round-half-to-even on integers. -->
 
 <xsl:template match="doc">
-<out>;
-<a b="{round-half-to-even(120)}" c="{round-half-to-even(0)}" d="{round-half-to-even(-3)}"/>;
-<a b="{round-half-to-even(120, 2)}" c="{round-half-to-even(0, 2)}" d="{round-half-to-even(-3, 2)}"/>;
-<a b="{round-half-to-even(120, -2)}" c="{round-half-to-even(0, -2)}" d="{round-half-to-even(-3, -2)}"/>;
-<a b="{round-half-to-even(180, -2)}" c="{round-half-to-even(150, -2)}" d="{round-half-to-even(250, -2)}"/>;
-<a b="{round-half-to-even(-180, -2)}" c="{round-half-to-even(-150, -2)}" d="{round-half-to-even(-250, -2)}"/>;
+<out>
+<a b="{round-half-to-even(120)}" c="{round-half-to-even(0)}" d="{round-half-to-even(-3)}"/>
+<a b="{round-half-to-even(120, 2)}" c="{round-half-to-even(0, 2)}" d="{round-half-to-even(-3, 2)}"/>
+<a b="{round-half-to-even(120, -2)}" c="{round-half-to-even(0, -2)}" d="{round-half-to-even(-3, -2)}"/>
+<a b="{round-half-to-even(180, -2)}" c="{round-half-to-even(150, -2)}" d="{round-half-to-even(250, -2)}"/>
+<a b="{round-half-to-even(-180, -2)}" c="{round-half-to-even(-150, -2)}" d="{round-half-to-even(-250, -2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3302.xsl	Mon Jan 25 10:27:46 2016 +0000
+++ b/tests/expr/math/math-3302.xsl	Mon Jan 25 10:28:14 2016 +0000
@@ -4,14 +4,14 @@
 <!-- PURPOSE:  Test of round-half-to-even on decimals. -->
 
 <xsl:template match="doc">
-<out>;
-<a b="{round-half-to-even(120.0)}" c="{round-half-to-even(0.0)}" d="{round-half-to-even(-3.0)}"/>;
-<a b="{round-half-to-even(120.0, 2)}" c="{round-half-to-even(0.0, 2)}" d="{round-half-to-even(-3.0, 2)}"/>;
-<a b="{round-half-to-even(120.0, -2)}" c="{round-half-to-even(0.0, -2)}" d="{round-half-to-even(-3.0, -2)}"/>;
-<a b="{round-half-to-even(180.0, -2)}" c="{round-half-to-even(150.0, -2)}" d="{round-half-to-even(250.0, -2)}"/>;
-<a b="{round-half-to-even(-120.0, -2)}" c="{round-half-to-even(-150.0, -2)}" d="{round-half-to-even(-250.0, -2)}"/>;
-<a b="{round-half-to-even(180.0180, 2)}" c="{round-half-to-even(150.0150, 2)}" d="{round-half-to-even(250.0250, 2)}"/>;
-<a b="{round-half-to-even(-120.0120, 2)}" c="{round-half-to-even(-150.0150, 2)}" d="{round-half-to-even(-250.0250, 2)}"/>;
+<out>
+<a b="{round-half-to-even(120.0)}" c="{round-half-to-even(0.0)}" d="{round-half-to-even(-3.0)}"/>
+<a b="{round-half-to-even(120.0, 2)}" c="{round-half-to-even(0.0, 2)}" d="{round-half-to-even(-3.0, 2)}"/>
+<a b="{round-half-to-even(120.0, -2)}" c="{round-half-to-even(0.0, -2)}" d="{round-half-to-even(-3.0, -2)}"/>
+<a b="{round-half-to-even(180.0, -2)}" c="{round-half-to-even(150.0, -2)}" d="{round-half-to-even(250.0, -2)}"/>
+<a b="{round-half-to-even(-120.0, -2)}" c="{round-half-to-even(-150.0, -2)}" d="{round-half-to-even(-250.0, -2)}"/>
+<a b="{round-half-to-even(180.0180, 2)}" c="{round-half-to-even(150.0150, 2)}" d="{round-half-to-even(250.0250, 2)}"/>
+<a b="{round-half-to-even(-120.0120, 2)}" c="{round-half-to-even(-150.0150, 2)}" d="{round-half-to-even(-250.0250, 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3302a.xsl	Mon Jan 25 10:27:46 2016 +0000
+++ b/tests/expr/math/math-3302a.xsl	Mon Jan 25 10:28:14 2016 +0000
@@ -7,14 +7,14 @@
 <xsl:param name="p" select="1"/>
     
 <xsl:template match="doc">
-<out>;
-    <a b="{round-half-to-even($p*120.0)}" c="{round-half-to-even($p*0.0)}" d="{round-half-to-even($p*-3.0)}"/>;
-    <a b="{round-half-to-even($p*120.0, 2)}" c="{round-half-to-even($p*0.0, 2)}" d="{round-half-to-even($p*-3.0, 2)}"/>;
-    <a b="{round-half-to-even($p*120.0, -2)}" c="{round-half-to-even($p*0.0, -2)}" d="{round-half-to-even(-3.0, -2)}"/>;
-    <a b="{round-half-to-even($p*180.0, -2)}" c="{round-half-to-even($p*150.0, -2)}" d="{round-half-to-even($p*250.0, -2)}"/>;
-    <a b="{round-half-to-even($p*-120.0, -2)}" c="{round-half-to-even($p*-150.0, -2)}" d="{round-half-to-even($p*-250.0, -2)}"/>;
-    <a b="{round-half-to-even($p*180.0180, 2)}" c="{round-half-to-even($p*150.0150, 2)}" d="{round-half-to-even($p*250.0250, 2)}"/>;
-    <a b="{round-half-to-even($p*-120.0120, 2)}" c="{round-half-to-even($p*-150.0150, 2)}" d="{round-half-to-even($p*-250.0250, 2)}"/>;
+<out>
+    <a b="{round-half-to-even($p*120.0)}" c="{round-half-to-even($p*0.0)}" d="{round-half-to-even($p*-3.0)}"/>
+    <a b="{round-half-to-even($p*120.0, 2)}" c="{round-half-to-even($p*0.0, 2)}" d="{round-half-to-even($p*-3.0, 2)}"/>
+    <a b="{round-half-to-even($p*120.0, -2)}" c="{round-half-to-even($p*0.0, -2)}" d="{round-half-to-even(-3.0, -2)}"/>
+    <a b="{round-half-to-even($p*180.0, -2)}" c="{round-half-to-even($p*150.0, -2)}" d="{round-half-to-even($p*250.0, -2)}"/>
+    <a b="{round-half-to-even($p*-120.0, -2)}" c="{round-half-to-even($p*-150.0, -2)}" d="{round-half-to-even($p*-250.0, -2)}"/>
+    <a b="{round-half-to-even($p*180.0180, 2)}" c="{round-half-to-even($p*150.0150, 2)}" d="{round-half-to-even($p*250.0250, 2)}"/>
+    <a b="{round-half-to-even($p*-120.0120, 2)}" c="{round-half-to-even($p*-150.0150, 2)}" d="{round-half-to-even($p*-250.0250, 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3303.xsl	Mon Jan 25 10:27:46 2016 +0000
+++ b/tests/expr/math/math-3303.xsl	Mon Jan 25 10:28:14 2016 +0000
@@ -4,14 +4,14 @@
 <!-- PURPOSE:  Test of round-half-to-even on doubles. -->
 
 <xsl:template match="doc">
-<out>;
-<a b="{round-half-to-even(120.0e0)}" c="{round-half-to-even(0.0e0)}" d="{round-half-to-even(-3.0e0)}"/>;
-<a b="{round-half-to-even(120.0e0, 2)}" c="{round-half-to-even(0.0e0, 2)}" d="{round-half-to-even(-3.0e0, 2)}"/>;
-<a b="{round-half-to-even(120.0e0, -2)}" c="{round-half-to-even(0.0e0, -2)}" d="{round-half-to-even(-3.0e0, -2)}"/>;
-<a b="{round-half-to-even(180.0e0, -2)}" c="{round-half-to-even(150.0e0, -2)}" d="{round-half-to-even(250.0e0, -2)}"/>;
-<a b="{round-half-to-even(-120.0e0, -2)}" c="{round-half-to-even(-150.0e0, -2)}" d="{round-half-to-even(-250.0e0, -2)}"/>;
-<a b="{round-half-to-even(180.0180e0, 2)}" c="{round-half-to-even(150.0150e0, 2)}" d="{round-half-to-even(250.0250e0, 2)}"/>;
-<a b="{round-half-to-even(-120.0120e0, 2)}" c="{round-half-to-even(-150.0150e0, 2)}" d="{round-half-to-even(-250.0250e0, 2)}"/>;
+<out>
+<a b="{round-half-to-even(120.0e0)}" c="{round-half-to-even(0.0e0)}" d="{round-half-to-even(-3.0e0)}"/>
+<a b="{round-half-to-even(120.0e0, 2)}" c="{round-half-to-even(0.0e0, 2)}" d="{round-half-to-even(-3.0e0, 2)}"/>
+<a b="{round-half-to-even(120.0e0, -2)}" c="{round-half-to-even(0.0e0, -2)}" d="{round-half-to-even(-3.0e0, -2)}"/>
+<a b="{round-half-to-even(180.0e0, -2)}" c="{round-half-to-even(150.0e0, -2)}" d="{round-half-to-even(250.0e0, -2)}"/>
+<a b="{round-half-to-even(-120.0e0, -2)}" c="{round-half-to-even(-150.0e0, -2)}" d="{round-half-to-even(-250.0e0, -2)}"/>
+<a b="{round-half-to-even(180.0180e0, 2)}" c="{round-half-to-even(150.0150e0, 2)}" d="{round-half-to-even(250.0250e0, 2)}"/>
+<a b="{round-half-to-even(-120.0120e0, 2)}" c="{round-half-to-even(-150.0150e0, 2)}" d="{round-half-to-even(-250.0250e0, 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file