[Bug 19782] 'Math' and 'fn' test cases using 'assert-eq' for numeric values instead of 'assert'

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19782

--- Comment #3 from Sorin Nasoi <spungi@gmail.com> ---
Here are 2 more examples of misuse of the 'assert-eq':

1) "op-numeric-add" test set, "op-numeric-addflt2args-3" test case:

<test-case name="op-numeric-addflt2args-3">
  <description> Evaluates The "op:numeric-add" operator with the arguments set
as follows: $arg1 = xs:float(lower bound) $arg2 = xs:float(mid range)
</description>
  <created by="Carmelo Montanez" on="2004-12-13"/>
  <test>xs:float("-3.4028235E38") + xs:float("0")</test>
  <result>
    <assert-eq>xs:float(-3.4028235E38)</assert-eq>
  </result>
</test-case>

Instead of :
<test-case name="op-numeric-addflt2args-3">
[...]
  <result>
   <assert>$result eq xs:float(-3.4028235E38)</assert>
  </result>
</test-case>

2)test set "op-numeric-divide", test case "op-numeric-dividesht2args-5":

<test-case name="op-numeric-dividesht2args-5">
 <description> Evaluates The "op:numeric-divide" operator with the arguments
set as follows: $arg1 = xs:short(lower bound) $arg2 = xs:short(upper bound)
</description>
 <created by="Carmelo Montanez" on="2004-12-13"/>
 <test>xs:short("-32768") div xs:short("32767")</test>
 <result>
   <any-of>
     <assert-eq>-1.000030518509475997</assert-eq>
     <assert-eq>-1.000030518509475997192297128208258</assert-eq>
     <assert-eq>-1.000030518509</assert-eq>
   </any-of>
 </result>
</test-case>

What if the XQuery processor returns '-1.0000305185094759972' ?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 30 October 2012 23:38:44 UTC