eXist-db / exist-xqts-runner

W3C XQTS driver for eXist-db
GNU Lesser General Public License v3.0
5 stars 6 forks source link

[BUG] Errors in assertion checking of assert-eq for fn-round-half-to-even #23

Closed alanpaxton closed 2 years ago

alanpaxton commented 2 years ago

Describe the bug

fn-round-half-to-even-15 Failure assert-eq: expected='-0.1', actual='xs:float("-0.1")'
<test-case name="fn-round-half-to-even-15">
      <description>Positive second argument - halfway case - float. The expected result is surprising; it arises because -0.05 is not exactly representable as an xs:float</description>
      <created by="Michael Kay" on="2011-07-01"/>
      <test>round-half-to-even(xs:float('-0.05'), 1)</test>
      <result>
         <all-of>
            <assert-eq>-0.1</assert-eq>
            <assert-type>xs:float</assert-type>
         </all-of>
      </result>
   </test-case>

Expected behavior I expect this test to pass. I believe the interpretation of the is not completely accurate.

To Reproduce This test relies on an implementation of fn:round which is currently part of a pull request https://github.com/eXist-db/exist/pull/4400. It should be deferred until the PR has been merged. Then, sbt "run --test-set fn-round"

Context (please always complete the following information):

Additional context