This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30292 - Missing test for multiple subtractions (5 - 1 - 1)
Summary: Missing test for multiple subtractions (5 - 1 - 1)
Status: NEW
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-01 18:00 UTC by Martin Middel
Modified: 2018-10-01 18:00 UTC (History)
0 users

See Also:


Attachments

Description Martin Middel 2018-10-01 18:00:57 UTC
Hi there,

I've been working on a open source JavaScript XPath engine (https://github.com/FontoXML/fontoxpath) and a user ran into a bug (https://github.com/FontoXML/fontoxpath/issues/54). This bug came down to a wrong parsing result for the input "5 - 1 - 1". I wrongfully recursed into the right hand side of the equation. I would have suspected that one of the 30k-ish tests in the QT3 test set must surely test this, and that I didn't notice this failing test. However, when re-running the set, I discovered that there is no such test...

I therefore propose this testcase to be added, so that no one else has to have this bug:

====
   <test-case name="op-numeric-subtractint3args-1">
      <description> Evaluates the subtract operator multiple times to test a correct order of operator precedence </description>
      <created by="Martin Middel" on="2018-10-01"/>
      <test>xs:int("5") - xs:int("1") - xs:int("1")</test>
      <result>
         <assert-eq>3</assert-eq>
      </result>
   </test-case>
====

Please feel free to change anything you'd want in this test case! This is my first time attempting to contribute, so please assist me!

I hope this is the correct place for these kinds of things. If not, could someone please point me where I should add these things? I'm afraid the submitting guide in the QT3 test set is a bit outdated...