Math tests: reduce reliance on formatting of results
authorMichael Kay <mike@saxonica.com>
Mon, 25 Jan 2016 10:27:46 +0000
changeset 1211 226a4c4600fb
parent 1210 8fe348cb3d9a
child 1212 a38bdcb0a71e
Math tests: reduce reliance on formatting of results
tests/expr/math/math-3303a.xsl
tests/expr/math/math-3304.xsl
tests/expr/math/math-3304a.xsl
tests/expr/math/math-3305.xsl
tests/expr/math/math-3306.xsl
tests/expr/math/math-3306a.xsl
tests/expr/math/math-3307.xsl
tests/expr/math/math-3307a.xsl
--- a/tests/expr/math/math-3303a.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3303a.xsl	Mon Jan 25 10:27:46 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.0e0)}" c="{round-half-to-even($p*0.0e0)}" d="{round-half-to-even($p*-3.0e0)}"/>;
-    <a b="{round-half-to-even($p*120.0e0, 2)}" c="{round-half-to-even($p*0.0e0, 2)}" d="{round-half-to-even($p*-3.0e0, 2)}"/>;
-    <a b="{round-half-to-even($p*120.0e0, -2)}" c="{round-half-to-even($p*0.0e0, -2)}" d="{round-half-to-even($p*-3.0e0, -2)}"/>;
-    <a b="{round-half-to-even($p*180.0e0, -2)}" c="{round-half-to-even($p*150.0e0, -2)}" d="{round-half-to-even($p*250.0e0, -2)}"/>;
-    <a b="{round-half-to-even($p*-120.0e0, -2)}" c="{round-half-to-even($p*-150.0e0, -2)}" d="{round-half-to-even($p*-250.0e0, -2)}"/>;
-    <a b="{round-half-to-even($p*180.0180e0, 2)}" c="{round-half-to-even($p*150.0150e0, 2)}" d="{round-half-to-even($p*250.0250e0, 2)}"/>;
-    <a b="{round-half-to-even($p*-120.0120e0, 2)}" c="{round-half-to-even($p*-150.0150e0, 2)}" d="{round-half-to-even($p*-250.0250e0, 2)}"/>;
+<out>
+    <a b="{round-half-to-even($p*120.0e0)}" c="{round-half-to-even($p*0.0e0)}" d="{round-half-to-even($p*-3.0e0)}"/>
+    <a b="{round-half-to-even($p*120.0e0, 2)}" c="{round-half-to-even($p*0.0e0, 2)}" d="{round-half-to-even($p*-3.0e0, 2)}"/>
+    <a b="{round-half-to-even($p*120.0e0, -2)}" c="{round-half-to-even($p*0.0e0, -2)}" d="{round-half-to-even($p*-3.0e0, -2)}"/>
+    <a b="{round-half-to-even($p*180.0e0, -2)}" c="{round-half-to-even($p*150.0e0, -2)}" d="{round-half-to-even($p*250.0e0, -2)}"/>
+    <a b="{round-half-to-even($p*-120.0e0, -2)}" c="{round-half-to-even($p*-150.0e0, -2)}" d="{round-half-to-even($p*-250.0e0, -2)}"/>
+    <a b="{round-half-to-even($p*180.0180e0, 2)}" c="{round-half-to-even($p*150.0150e0, 2)}" d="{round-half-to-even($p*250.0250e0, 2)}"/>
+    <a b="{round-half-to-even($p*-120.0120e0, 2)}" c="{round-half-to-even($p*-150.0150e0, 2)}" d="{round-half-to-even($p*-250.0250e0, 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3304.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3304.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -5,28 +5,28 @@
 <!-- PURPOSE:  Test of round-half-to-even on floats. -->
 
 <xsl:template match="doc">
-<out>;
+<out>
 <a b="{round-half-to-even(xs:float(120.0e0))}" 
     c="{round-half-to-even(xs:float(0.0e0))}" 
-    d="{round-half-to-even(xs:float(-3.0e0))}"/>;
+    d="{round-half-to-even(xs:float(-3.0e0))}"/>
 <a b="{round-half-to-even(xs:float(120.0e0), 2)}" 
     c="{round-half-to-even(xs:float(0.0e0), 2)}" 
-    d="{round-half-to-even(xs:float(-3.0e0), 2)}"/>;
+    d="{round-half-to-even(xs:float(-3.0e0), 2)}"/>
 <a b="{round-half-to-even(xs:float(120.0e0), -2)}" 
     c="{round-half-to-even(xs:float(0.0e0), -2)}" 
-    d="{round-half-to-even(xs:float(-3.0e0), -2)}"/>;
+    d="{round-half-to-even(xs:float(-3.0e0), -2)}"/>
 <a b="{round-half-to-even(xs:float(180.0e0), -2)}" 
     c="{round-half-to-even(xs:float(150.0e0), -2)}" 
-    d="{round-half-to-even(xs:float(250.0e0), -2)}"/>;
+    d="{round-half-to-even(xs:float(250.0e0), -2)}"/>
 <a b="{round-half-to-even(xs:float(-120.0e0), -2)}" 
     c="{round-half-to-even(xs:float(-150.0e0), -2)}" 
-    d="{round-half-to-even(xs:float(-250.0e0), -2)}"/>;
+    d="{round-half-to-even(xs:float(-250.0e0), -2)}"/>
 <a b="{round-half-to-even(xs:float(180.0180e0), 2)}" 
     c="{round-half-to-even(xs:float(150.0150e0), 2)}" 
-    d="{round-half-to-even(xs:float(250.0250e0), 2)}"/>;
+    d="{round-half-to-even(xs:float(250.0250e0), 2)}"/>
 <a b="{round-half-to-even(xs:float(-120.0120e0), 2)}" 
     c="{round-half-to-even(xs:float(-150.0150e0), 2)}" 
-    d="{round-half-to-even(xs:float(-250.0250e0), 2)}"/>;
+    d="{round-half-to-even(xs:float(-250.0250e0), 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3304a.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3304a.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -8,28 +8,28 @@
     <xsl:param name="p" select="1"/>
 
 <xsl:template match="doc">
-<out>;
+<out>
 <a b="{round-half-to-even($p*xs:float(120.0e0))}" 
     c="{round-half-to-even($p*xs:float(0.0e0))}" 
-    d="{round-half-to-even($p*xs:float(-3.0e0))}"/>;
+    d="{round-half-to-even($p*xs:float(-3.0e0))}"/>
 <a b="{round-half-to-even($p*xs:float(120.0e0), 2)}" 
     c="{round-half-to-even($p*xs:float(0.0e0), 2)}" 
-    d="{round-half-to-even($p*xs:float(-3.0e0), 2)}"/>;
+    d="{round-half-to-even($p*xs:float(-3.0e0), 2)}"/>
 <a b="{round-half-to-even($p*xs:float(120.0e0), -2)}" 
     c="{round-half-to-even($p*xs:float(0.0e0), -2)}" 
-    d="{round-half-to-even($p*xs:float(-3.0e0), -2)}"/>;
+    d="{round-half-to-even($p*xs:float(-3.0e0), -2)}"/>
 <a b="{round-half-to-even($p*xs:float(180.0e0), -2)}" 
     c="{round-half-to-even($p*xs:float(150.0e0), -2)}" 
-    d="{round-half-to-even($p*xs:float(250.0e0), -2)}"/>;
+    d="{round-half-to-even($p*xs:float(250.0e0), -2)}"/>
 <a b="{round-half-to-even($p*xs:float(-120.0e0), -2)}" 
     c="{round-half-to-even($p*xs:float(-150.0e0), -2)}" 
-    d="{round-half-to-even($p*xs:float(-250.0e0), -2)}"/>;
+    d="{round-half-to-even($p*xs:float(-250.0e0), -2)}"/>
 <a b="{round-half-to-even($p*xs:float(180.0180e0), 2)}" 
     c="{round-half-to-even($p*xs:float(150.0150e0), 2)}" 
-    d="{round-half-to-even($p*xs:float(250.0250e0), 2)}"/>;
+    d="{round-half-to-even($p*xs:float(250.0250e0), 2)}"/>
 <a b="{round-half-to-even($p*xs:float(-120.0120e0), 2)}" 
     c="{round-half-to-even($p*xs:float(-150.0150e0), 2)}" 
-    d="{round-half-to-even($p*xs:float(-250.0250e0), 2)}"/>;
+    d="{round-half-to-even($p*xs:float(-250.0250e0), 2)}"/>
 </out>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
--- a/tests/expr/math/math-3305.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3305.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -5,7 +5,7 @@
 <!-- PURPOSE:  Test of abs() on all numeric data types. -->
 
 <xsl:template match="doc">
-<out>;
+<out>
 <int a="{abs(3)}" b="{abs(-3)}" c="{abs(0)}"/>
 <decimal a="{abs(3.2)}" b="{abs(-3.2)}" c="{abs(0.0)}"/>
 <double a="{abs(3.2e0)}" b="{abs(-3.2e0)}" c="{abs(0.0e0)}" d="{abs(-0.0e0)}" e="{abs(number('NaN'))}"
--- a/tests/expr/math/math-3306.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3306.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
 <?spec fo#casting-to-numerics?>
 <!-- PURPOSE:  Test that casting to integer truncates towards zero. -->
 
 <xsl:template match="doc">
-<out>;
+<out>
 <decimal a="{xs:integer(3.8)}" b="{xs:integer(-3.8)}"/>
 <double a="{xs:integer(3.8e0)}" b="{xs:integer(-3.8e0)}"/>
 <float a="{xs:integer(xs:float(3.8e0))}" b="{xs:integer(xs:float(-3.8e0))}"/>
--- a/tests/expr/math/math-3306a.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3306a.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
 <?spec fo#casting-to-numerics?>
 <!-- PURPOSE:  Test that casting to integer truncates towards zero. -->
   <!-- Variant forcing run-time evaluation -->
   
   <xsl:param name="p" select="1"/>
 <xsl:template match="doc">
-<out>;
+<out>
 <decimal a="{xs:integer($p*3.8)}" b="{xs:integer($p*-3.8)}"/>
 <double a="{xs:integer($p*3.8e0)}" b="{xs:integer($p*-3.8e0)}"/>
 <float a="{xs:integer($p*xs:float(3.8e0))}" b="{xs:integer($p*xs:float(-3.8e0))}"/>
--- a/tests/expr/math/math-3307.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3307.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
 <?spec fo#func-numeric-divide?>
 <!-- PURPOSE:  Test that the result of dividing two integers is a decimal. -->
 
--- a/tests/expr/math/math-3307a.xsl	Wed Jan 20 15:23:04 2016 +0000
+++ b/tests/expr/math/math-3307a.xsl	Mon Jan 25 10:27:46 2016 +0000
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
 <?spec fo#func-numeric-divide?>
 <!-- PURPOSE:  Test that the result of dividing two integers is a decimal. -->
   <!-- Variant forcing run-time evaluation -->