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 27848 - UseCaseJSON-002, UseCaseJSON-007
Summary: UseCaseJSON-002, UseCaseJSON-007
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: 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: 2015-01-18 10:29 UTC by Christian Gruen
Modified: 2015-01-19 16:14 UTC (History)
1 user (show)

See Also:


Attachments

Description Christian Gruen 2015-01-18 10:29:11 UTC
The query results should contain all possible permutations, because maps do not necessarily return key/value pairs in the order in which they had been inserted.

See UseCaseJSON-007 as example:

<result>
  <assert-deep-eq>map { "visible" : [ "AJISAI (EGS)", "AKARI (ASTRO-F)"  ],  "invisible" : [ "AAU CUBESAT" ] }</assert-deep-eq>
</result>

<result>
  <any-of>
    <assert-deep-eq>map { "visible" : [ "AJISAI (EGS)", "AKARI (ASTRO-F)" ], "invisible" : [ "AAU CUBESAT" ] }</assert-deep-eq>
    <assert-deep-eq>map { "visible" : [ "AKARI (ASTRO-F)" , "AJISAI (EGS)"], "invisible" : [ "AAU CUBESAT" ] }</assert-deep-eq>
  </any-of>
</result>
Comment 1 Michael Kay 2015-01-18 18:58:45 UTC
Surely this is unnecessary because deep-equal() on maps considers two maps as deep-equal regardless of the order of entries?
Comment 2 Christian Gruen 2015-01-18 20:29:31 UTC
The order of map entries does not matter indeed. But the results have nodes (UseCaseJSON-002) and arrays (UseCaseJSON-007) that have been generated from map contents; that's why I believe that all possible permutations need to be checked as possible outcomes.
Comment 3 Michael Kay 2015-01-19 16:08:51 UTC
Sorry, yes, I see your point.
Comment 4 Michael Kay 2015-01-19 16:14:30 UTC
Fixed as suggested.