Bug 282223 - [xpath2] SeqExprCastable and SeqExprCastTest fail
Summary: [xpath2] SeqExprCastable and SeqExprCastTest fail
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M1   Edit
Assignee: David Carver CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262765
  Show dependency tree
 
Reported: 2009-07-01 21:06 EDT by David Carver CLA
Modified: 2010-08-11 17:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2009-07-01 21:06:51 EDT
PsychoPath fails the majority of the casting tests.   This is about 700 tests total.   There are several things that need to be done with these tests.

1. Make sure all error codes are valid.
2. Step through the code and identify where the issue is occuring.

I suspect if a handful of these tests are fixed, it will take care of many of the tests.  Some may uncover other Data Types that aren't implemented.
Comment 1 David Carver CLA 2009-07-02 00:33:19 EDT
fixed a couple of casting issues.

The XPath Data Model doesn't allow casting of exponential numbers to decimal values.   PsychoPath was returning false positives because Java has no such issues.  It'll happily convert an exponent to a non exponent value.  Check the incoming string value for "E" and "e" if it has it then it tosses a cast exception.   This does use the java 1.5 contains() method on String.

Also implemented the xs:duration data type.  It wasn't implemented correctly, and needed to be a non-abstract class. Moved many functions into xs:duration and override where needed in xs:dateTimeDuration and xs:yearMonthDuration implementations.

With these changes an additional 100 tests pass.  Down to 1256 failures with 66 errors.

Code is checked into head.

Comment 2 David Carver CLA 2009-07-02 23:50:56 EDT
Fixed several more casting issues.  SeqCastable is down to about 50 - 60 failing tests, total test failures are down to 1145.   In some of the tests I'm wondering if there are errors in the test cases from W3C as some look like they should pass but they are expecting it to fail.   Most of these have to do with Duration casting.

All changes are in head, and current code coverage is 75.9% and passing percentage is at 86%.

Comment 3 David Carver CLA 2009-07-03 15:19:50 EDT
Fixed the last of the SeqCastable tests and issues found.   This brings the failure rate under 1000 tests.  All of these tests are core related tests.  There are CastableTests for the XML Schema Userdefined types that still need to be addressed.

Next is addressing the SeqCast test cases that are failing.  This number was greatly reduced due to fixing the SeqCastable tests, and fixing the IntegerLiteral and DecimalLiteral parsing.
Comment 4 David Carver CLA 2009-07-07 00:33:44 EDT
fixed several more date casting issues.  These were caused by times being returned in string values that had a timezone offset not being adjusted for the offset.  Internally all values are stored in UTC format, and need to be adjusted with an offset value if they came in with one when serializing them.

Also implemented xs:NOTATION.

with these tests fixed, 3 more failing datetime related tests pass, and a total of 31 additional tests pass.  Bring the current failure rate to 961 tests.

Comment 5 David Carver CLA 2009-07-10 17:03:13 EDT
both SeqExpCastable and SeqExpCastAs tests are now passing all 1300 of them.