tests/expr/math/_math-test-set.xml
changeset 1198 aacf3d6d8681
parent 1026 238fd578d417
child 1208 b16728df2ffd
equal deleted inserted replaced
1197:d300f98a5bb8 1198:aacf3d6d8681
  2130       </test>
  2130       </test>
  2131       <result>
  2131       <result>
  2132          <assert-xml file="math-3301.out"/>
  2132          <assert-xml file="math-3301.out"/>
  2133       </result>
  2133       </result>
  2134    </test-case>
  2134    </test-case>
       
  2135    
       
  2136    <test-case name="math-3301a">
       
  2137       <description>Test of round-half-to-even on integers: variant test forcing run-time evaluation</description>
       
  2138       <created by="Michael Kay" on="2016-01-11"/>
       
  2139       <environment ref="math-33"/>
       
  2140       <dependencies>
       
  2141          <spec value="XSLT20+"/>
       
  2142       </dependencies>
       
  2143       <test>
       
  2144          <stylesheet file="math-3301a.xsl"/>
       
  2145       </test>
       
  2146       <result>
       
  2147          <assert-xml file="math-3301.out"/>
       
  2148       </result>
       
  2149    </test-case>
  2135 
  2150 
  2136    <test-case name="math-3302">
  2151    <test-case name="math-3302">
  2137       <description>Test of round-half-to-even on decimals.</description>
  2152       <description>Test of round-half-to-even on decimals.</description>
  2138       <created by="Michael Kay" on="2012-11-07"/>
  2153       <created by="Michael Kay" on="2012-11-07"/>
  2139       <environment ref="math-33"/>
  2154       <environment ref="math-33"/>
  2145       </test>
  2160       </test>
  2146       <result>
  2161       <result>
  2147          <assert-xml file="math-3302.out"/>
  2162          <assert-xml file="math-3302.out"/>
  2148       </result>
  2163       </result>
  2149    </test-case>
  2164    </test-case>
       
  2165    
       
  2166    <test-case name="math-3302a">
       
  2167       <description>Test of round-half-to-even on decimals; variant forcing runtime evaluation</description>
       
  2168       <created by="Michael Kay" on="2016-01-11"/>
       
  2169       <environment ref="math-33"/>
       
  2170       <dependencies>
       
  2171          <spec value="XSLT20+"/>
       
  2172       </dependencies>
       
  2173       <test>
       
  2174          <stylesheet file="math-3302a.xsl"/>
       
  2175       </test>
       
  2176       <result>
       
  2177          <assert-xml file="math-3302.out"/>
       
  2178       </result>
       
  2179    </test-case>
  2150 
  2180 
  2151    <test-case name="math-3303">
  2181    <test-case name="math-3303">
  2152       <description>Test of round-half-to-even on doubles.</description>
  2182       <description>Test of round-half-to-even on doubles.</description>
  2153       <created by="Michael Kay" on="2012-11-07"/>
  2183       <created by="Michael Kay" on="2012-11-07"/>
  2154       <environment ref="math-33"/>
  2184       <environment ref="math-33"/>
  2160       </test>
  2190       </test>
  2161       <result>
  2191       <result>
  2162          <assert-xml file="math-3303.out"/>
  2192          <assert-xml file="math-3303.out"/>
  2163       </result>
  2193       </result>
  2164    </test-case>
  2194    </test-case>
       
  2195    
       
  2196    <test-case name="math-3303a">
       
  2197       <description>Test of round-half-to-even on doubles: variant forcing runtime evaluation</description>
       
  2198       <created by="Michael Kay" on="2016-01-11"/>
       
  2199       <environment ref="math-33"/>
       
  2200       <dependencies>
       
  2201          <spec value="XSLT20+"/>
       
  2202       </dependencies>
       
  2203       <test>
       
  2204          <stylesheet file="math-3303a.xsl"/>
       
  2205       </test>
       
  2206       <result>
       
  2207          <assert-xml file="math-3303.out"/>
       
  2208       </result>
       
  2209    </test-case>
  2165 
  2210 
  2166    <test-case name="math-3304">
  2211    <test-case name="math-3304">
  2167       <description>Test of round-half-to-even on floats.</description>
  2212       <description>Test of round-half-to-even on floats.</description>
  2168       <created by="Michael Kay" on="2012-11-07"/>
  2213       <created by="Michael Kay" on="2012-11-07"/>
  2169       <environment ref="math-33"/>
  2214       <environment ref="math-33"/>
  2175       </test>
  2220       </test>
  2176       <result>
  2221       <result>
  2177          <assert-xml file="math-3304.out"/>
  2222          <assert-xml file="math-3304.out"/>
  2178       </result>
  2223       </result>
  2179    </test-case>
  2224    </test-case>
       
  2225    
       
  2226    <test-case name="math-3304a">
       
  2227       <description>Test of round-half-to-even on floats. Variant forcing runtime evaluation</description>
       
  2228       <created by="Michael Kay" on="2016-01-11"/>
       
  2229       <environment ref="math-33"/>
       
  2230       <dependencies>
       
  2231          <spec value="XSLT20+"/>
       
  2232       </dependencies>
       
  2233       <test>
       
  2234          <stylesheet file="math-3304a.xsl"/>
       
  2235       </test>
       
  2236       <result>
       
  2237          <assert-xml file="math-3304.out"/>
       
  2238       </result>
       
  2239    </test-case>
  2180 
  2240 
  2181    <test-case name="math-3305">
  2241    <test-case name="math-3305">
  2182       <description>Test of abs() on all numeric data types.</description>
  2242       <description>Test of abs() on all numeric data types.</description>
  2183       <created by="Michael Kay" on="2012-11-07"/>
  2243       <created by="Michael Kay" on="2012-11-07"/>
  2184       <environment ref="math-33"/>
  2244       <environment ref="math-33"/>
  2190       </test>
  2250       </test>
  2191       <result>
  2251       <result>
  2192          <assert-xml file="math-3305.out"/>
  2252          <assert-xml file="math-3305.out"/>
  2193       </result>
  2253       </result>
  2194    </test-case>
  2254    </test-case>
       
  2255    
       
  2256    <test-case name="math-3305a">
       
  2257       <description>Test of abs() on all numeric data types. Variant forcing runtime evaluation</description>
       
  2258       <created by="Michael Kay" on="2016-01-11"/>
       
  2259       <environment ref="math-33"/>
       
  2260       <dependencies>
       
  2261          <spec value="XSLT20+"/>
       
  2262       </dependencies>
       
  2263       <test>
       
  2264          <stylesheet file="math-3305a.xsl"/>
       
  2265       </test>
       
  2266       <result>
       
  2267          <assert-xml file="math-3305.out"/>
       
  2268       </result>
       
  2269    </test-case>
  2195 
  2270 
  2196    <test-case name="math-3306">
  2271    <test-case name="math-3306">
  2197       <description>Test that casting to integer truncates towards zero.</description>
  2272       <description>Test that casting to integer truncates towards zero.</description>
  2198       <created by="Michael Kay" on="2012-11-07"/>
  2273       <created by="Michael Kay" on="2012-11-07"/>
  2199       <environment ref="math-33"/>
  2274       <environment ref="math-33"/>
  2206       <result>
  2281       <result>
  2207          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema">;
  2282          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema">;
  2208 <decimal a="3" b="-3"/><double a="3" b="-3"/><float a="3" b="-3"/></out>]]></assert-xml>
  2283 <decimal a="3" b="-3"/><double a="3" b="-3"/><float a="3" b="-3"/></out>]]></assert-xml>
  2209       </result>
  2284       </result>
  2210    </test-case>
  2285    </test-case>
       
  2286    
       
  2287    <test-case name="math-3306a">
       
  2288       <description>Test that casting to integer truncates towards zero. Variant forcing runtime evaluation</description>
       
  2289       <created by="Michael Kay" on="2016-01-11"/>
       
  2290       <environment ref="math-33"/>
       
  2291       <dependencies>
       
  2292          <spec value="XSLT20+"/>
       
  2293       </dependencies>
       
  2294       <test>
       
  2295          <stylesheet file="math-3306a.xsl"/>
       
  2296       </test>
       
  2297       <result>
       
  2298          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema">;
       
  2299 <decimal a="3" b="-3"/><double a="3" b="-3"/><float a="3" b="-3"/></out>]]></assert-xml>
       
  2300       </result>
       
  2301    </test-case>
  2211 
  2302 
  2212    <test-case name="math-3307">
  2303    <test-case name="math-3307">
  2213       <description>Test that the result of dividing two integers is a decimal.</description>
  2304       <description>Test that the result of dividing two integers is a decimal.</description>
  2214       <created by="Michael Kay" on="2012-11-07"/>
  2305       <created by="Michael Kay" on="2012-11-07"/>
  2215       <environment ref="math-33"/>
  2306       <environment ref="math-33"/>
  2221       </test>
  2312       </test>
  2222       <result>
  2313       <result>
  2223          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema" result="true"/>]]></assert-xml>
  2314          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema" result="true"/>]]></assert-xml>
  2224       </result>
  2315       </result>
  2225    </test-case>
  2316    </test-case>
       
  2317    
       
  2318    <test-case name="math-3307a">
       
  2319       <description>Test that the result of dividing two integers is a decimal. Variant forcing runtime evaluation</description>
       
  2320       <created by="Michael Kay" on="2016-01-11"/>
       
  2321       <environment ref="math-33"/>
       
  2322       <dependencies>
       
  2323          <spec value="XSLT20+"/>
       
  2324       </dependencies>
       
  2325       <test>
       
  2326          <stylesheet file="math-3307a.xsl"/>
       
  2327       </test>
       
  2328       <result>
       
  2329          <assert-xml><![CDATA[<out xmlns:xs="http://www.w3.org/2001/XMLSchema" result="true"/>]]></assert-xml>
       
  2330       </result>
       
  2331    </test-case>
  2226 
  2332 
  2227    <test-case name="math-3308">
  2333    <test-case name="math-3308">
  2228       <description>Bug in 7.8: converting a string of spaces to a number crashes</description>
  2334       <description>Bug in 7.8: converting a string of spaces to a number crashes</description>
  2229       <created by="Michael Kay" on="2012-11-07"/>
  2335       <created by="Michael Kay" on="2012-11-07"/>
  2230       <environment ref="math-33"/>
  2336       <environment ref="math-33"/>
  2236       </test>
  2342       </test>
  2237       <result>
  2343       <result>
  2238          <assert-xml><![CDATA[<out>NaN</out>]]></assert-xml>
  2344          <assert-xml><![CDATA[<out>NaN</out>]]></assert-xml>
  2239       </result>
  2345       </result>
  2240    </test-case>
  2346    </test-case>
       
  2347    
       
  2348    <test-case name="math-3308a">
       
  2349       <description>Bug in 7.8: converting a string of spaces to a number crashes. Variant forcing runtime evaluation</description>
       
  2350       <created by="Michael Kay" on="2016-01-11"/>
       
  2351       <environment ref="math-33"/>
       
  2352       <dependencies>
       
  2353          <spec value="XSLT10+"/>
       
  2354       </dependencies>
       
  2355       <test>
       
  2356          <stylesheet file="math-3308a.xsl"/>
       
  2357       </test>
       
  2358       <result>
       
  2359          <assert-xml><![CDATA[<out>NaN</out>]]></assert-xml>
       
  2360       </result>
       
  2361    </test-case>
  2241 
  2362 
  2242    <test-case name="math-3309">
  2363    <test-case name="math-3309">
  2243       <description>Test whitespace trimming in string-to-number conversion</description>
  2364       <description>Test whitespace trimming in string-to-number conversion</description>
  2244       <created by="Michael Kay" on="2012-11-07"/>
  2365       <created by="Michael Kay" on="2012-11-07"/>
  2245       <environment ref="math-33"/>
  2366       <environment ref="math-33"/>
  2251       </test>
  2372       </test>
  2252       <result>
  2373       <result>
  2253          <assert-xml><![CDATA[<out>-2</out>]]></assert-xml>
  2374          <assert-xml><![CDATA[<out>-2</out>]]></assert-xml>
  2254       </result>
  2375       </result>
  2255    </test-case>
  2376    </test-case>
       
  2377    
       
  2378    <test-case name="math-3309a">
       
  2379       <description>Test whitespace trimming in string-to-number conversion. Variant forcing runtime evaluation</description>
       
  2380       <created by="Michael Kay" on="2016-01-11"/>
       
  2381       <environment ref="math-33"/>
       
  2382       <dependencies>
       
  2383          <spec value="XSLT10+"/>
       
  2384       </dependencies>
       
  2385       <test>
       
  2386          <stylesheet file="math-3309a.xsl"/>
       
  2387       </test>
       
  2388       <result>
       
  2389          <assert-xml><![CDATA[<out>-2</out>]]></assert-xml>
       
  2390       </result>
       
  2391    </test-case>
  2256 
  2392 
  2257    <test-case name="math-3310">
  2393    <test-case name="math-3310">
  2258       <description>test value comparisons on NaN</description>
  2394       <description>test value comparisons on NaN</description>
  2259       <created by="Michael Kay" on="2012-11-07"/>
  2395       <created by="Michael Kay" on="2012-11-07"/>
  2260       <environment ref="math-33"/>
  2396       <environment ref="math-33"/>
  2261       <dependencies>
  2397       <dependencies>
  2262          <spec value="XSLT20+"/>
  2398          <spec value="XSLT20+"/>
  2263       </dependencies>
  2399       </dependencies>
  2264       <test>
  2400       <test>
  2265          <stylesheet file="math-3310.xsl"/>
  2401          <stylesheet file="math-3310.xsl"/>
       
  2402       </test>
       
  2403       <result>
       
  2404          <all-of>
       
  2405             <assert>every $b in //t satisfies $b = 'true'</assert>
       
  2406             <assert>every $b in //f satisfies $b = 'false'</assert>
       
  2407          </all-of>
       
  2408       </result>
       
  2409    </test-case>
       
  2410    
       
  2411    <test-case name="math-3310a">
       
  2412       <description>test value comparisons on NaN. Variant forcing runtime evaluation</description>
       
  2413       <created by="Michael Kay" on="2016-01-11"/>
       
  2414       <environment ref="math-33"/>
       
  2415       <dependencies>
       
  2416          <spec value="XSLT20+"/>
       
  2417       </dependencies>
       
  2418       <test>
       
  2419          <stylesheet file="math-3310a.xsl"/>
  2266       </test>
  2420       </test>
  2267       <result>
  2421       <result>
  2268          <all-of>
  2422          <all-of>
  2269             <assert>every $b in //t satisfies $b = 'true'</assert>
  2423             <assert>every $b in //t satisfies $b = 'true'</assert>
  2270             <assert>every $b in //f satisfies $b = 'false'</assert>
  2424             <assert>every $b in //f satisfies $b = 'false'</assert>