w3c / qt3tests

Tests for XPath and XQuery
27 stars 17 forks source link

A spec required for test cases predicates-33 and predicates-35 #41

Closed brunato closed 2 years ago

brunato commented 2 years ago

Hi,

a spec="XP30+" is needed for test cases "predicates-33" and "predicates-35" (concat operator || is used)

file: prod/Predicate.xml

    <test-case name="predicates-33">
      <description> Filter expression whose predicate compares boolean to untypedAtomic. Saxon bug 5187 </description>
      <created by="Michael Kay" on="2021-12-20"/>
      <environment ref="works"/>
      <test>count(/works/employee[(xs:integer(hours) gt 40) = xs:untypedAtomic("true"||substring(string(current-date()), 200))])</test>
      <result>
         <assert-eq>3</assert-eq>
      </result>
   </test-case>
   <test-case name="predicates-35">
      <description> Filter expression whose predicate compares multiple types to untypedAtomic. 
         Requires elimination of duplicates. Saxon bug 5187 </description>
      <created by="Michael Kay" on="2021-12-20"/>
      <environment ref="works"/>
      <test>(/works/employee[(xs:integer(hours) eq 40, empnum, number(hours) - 39) = xs:untypedAtomic("1"||substring(string(current-date()), 200))]) ! (empnum || pnum)</test>
      <result>
         <assert-deep-eq>"E1P1", "E2P1", "E4P4"</assert-deep-eq>
      </result>
   </test-case>

Thank you again

michaelhkay commented 2 years ago

Fixed as suggested. Also test -34 should work in XPath.

brunato commented 2 years ago

Yes, now also "predicates-34" is included and pass with XP30.