Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 141583 Details for
Bug 283214
[xpath2] Conditional Expressions cause XpathParserException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix the remaining three tests
three-remaining-for-bugzilla-283214.txt (text/plain), 4.73 KB, created by
Jesper Moller
on 2009-07-14 19:13:42 EDT
(
hide
)
Description:
Fix the remaining three tests
Filename:
MIME Type:
Creator:
Jesper Moller
Created:
2009-07-14 19:13:42 EDT
Size:
4.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xml.xpath2.processor.tests >Index: src/org/eclipse/wst/xml/xpath2/processor/test/AbstractPsychoPathTest.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/AbstractPsychoPathTest.java,v >retrieving revision 1.20 >diff -u -r1.20 AbstractPsychoPathTest.java >--- src/org/eclipse/wst/xml/xpath2/processor/test/AbstractPsychoPathTest.java 14 Jul 2009 15:39:43 -0000 1.20 >+++ src/org/eclipse/wst/xml/xpath2/processor/test/AbstractPsychoPathTest.java 14 Jul 2009 23:06:24 -0000 >@@ -9,6 +9,7 @@ > * David Carver (STAR) - initial API and implementation > * Jin Mingjan - bug 262765 - extractXPathExpression and getExpectedResults > * Jesper S Moller - bug 283214 - fix IF THEN ELSE parsing and update grammars >+ * Jesper S Moller - bug 283214 - fix XML result serialization > * Jesper S Moller - bug 283404 - fixed locale > *******************************************************************************/ > package org.eclipse.wst.xml.xpath2.processor.test; >@@ -341,12 +342,18 @@ > > String actual = new String(); > Iterator<NodeType> iterator = rs.iterator(); >+ boolean queueSpace = false; > while (iterator.hasNext()) { > AnyType aat = iterator.next(); > if (aat instanceof NodeType) { > NodeType nodeType = (NodeType) aat; > Node node = nodeType.node_value(); > serializer.write(node, outputText); >+ queueSpace = false; >+ } else { >+ if (queueSpace) outputText.getByteStream().write(32); >+ outputText.getByteStream().write(aat.string_value().getBytes("UTF-8")); >+ queueSpace = true; > } > } > >Index: src/org/eclipse/wst/xml/xpath2/processor/testsuite/core/CondExprTest.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/testsuite/core/CondExprTest.java,v >retrieving revision 1.3 >diff -u -r1.3 CondExprTest.java >--- src/org/eclipse/wst/xml/xpath2/processor/testsuite/core/CondExprTest.java 14 Jul 2009 01:55:25 -0000 1.3 >+++ src/org/eclipse/wst/xml/xpath2/processor/testsuite/core/CondExprTest.java 14 Jul 2009 23:06:24 -0000 >@@ -165,9 +165,11 @@ > actual = ex.code(); > } > >- assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); >- >+ // trim the expected result to only contain the attribute name: >+ // <out name="axolotl"/> -> axolotl >+ expectedResult = trimSurrounding(expectedResult, "<out name=\"", "\"/>"); > >+ assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); > } > > //Test expression has another if expression. >@@ -303,7 +305,7 @@ > Evaluator eval = new DefaultEvaluator(dc, domDoc); > ResultSequence rs = eval.evaluate(path); > >- actual = buildResultString(rs); >+ actual = buildXMLResultString(rs); > > } catch (XPathParserException ex) { > actual = ex.code(); >@@ -341,7 +343,7 @@ > Evaluator eval = new DefaultEvaluator(dc, domDoc); > ResultSequence rs = eval.evaluate(path); > >- actual = buildResultString(rs); >+ actual = buildXMLResultString(rs); > > } catch (XPathParserException ex) { > actual = ex.code(); >#P org.eclipse.wst.xml.xpath2.processor >Index: src/org/eclipse/wst/xml/xpath2/processor/internal/function/FsEq.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/src/org/eclipse/wst/xml/xpath2/processor/internal/function/FsEq.java,v >retrieving revision 1.5 >diff -u -r1.5 FsEq.java >--- src/org/eclipse/wst/xml/xpath2/processor/internal/function/FsEq.java 12 Jul 2009 01:26:47 -0000 1.5 >+++ src/org/eclipse/wst/xml/xpath2/processor/internal/function/FsEq.java 14 Jul 2009 23:06:27 -0000 >@@ -10,6 +10,7 @@ > * Mukul Gandhi - bug 276134 - improvements to schema aware primitive type support > * for attribute/element nodes > * David Carver - bug 262765 - fixed comparison on sequence range values. >+ * Jesper S Moller - bug 283214 - fix eq for untyped atomic values > *******************************************************************************/ > > package org.eclipse.wst.xml.xpath2.processor.internal.function; >@@ -171,7 +172,7 @@ > if (a instanceof XSUntypedAtomic) > a = new XSString(a.string_value()); > if (b instanceof XSUntypedAtomic) >- b = new XSString(a.string_value()); >+ b = new XSString(b.string_value()); > } > > // rule c
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283214
:
141460
|
141461
|
141462
| 141583