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 3727 - insufficient testing of deep-equal
Summary: insufficient testing of deep-equal
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 17:59 UTC by Per Bothner
Modified: 2006-09-26 06:22 UTC (History)
0 users

See Also:


Attachments

Description Per Bothner 2006-09-14 17:59:26 UTC
The deep-equal function is fairly complex, but there is pretty minimal test coverave.  Most of the tests compare atomic items, and those are useful.  There are a few tests for non-singleton atomic sequences, but not many.  Worst, the few tests for comparing nodes and nodes sequences are pretty useless.  They seesm to fit this pattern:
  deep-equal($input-context1/PATH, $input-context1/PATH)
I.e. the same expression yielding the same *identical* nodes for both arguments.  An implementation that just tests node identity would pass.
Comment 1 Andrew Eisenberg 2006-09-25 21:13:44 UTC
Thanks for bringing this to our attention. I've added test cases fn-deep-equal-node-args-1 to fn-deep-equal-node-args-5 to the test suite. These test cases pass sequences of nodes that do not have the same identity to fn:deep-equal.

Please close this bug report if you agree with this resolution.
Comment 2 Per Bothner 2006-09-26 06:22:36 UTC
Yes, this does provide some more meaningful testing.  (It caught one silly bug in the Qexo implementation!)  Thanks.