RFR: JDK-8289949 Improve test coverage for XPath: operators
Joe Wang
joehw at openjdk.org
Fri Aug 26 19:41:56 UTC 2022
On Fri, 26 Aug 2022 16:48:03 GMT, Bill Huang <duke at openjdk.org> wrote:
> Provided coverage for XPath operators. Operators include:
> * Boolean operators: or, and, =, !=, <, <=, >, >=
> * Number operators: +, -, *, div, mod
> * Union operator: |
Looks good. A few minor comments below.
test/jaxp/javax/xml/jaxp/unittest/xpath/XPathOperatorExpTest.java line 51:
> 49: public Object[][] getOperatorExp() {
> 50: return new Object[][]{
> 51: // boolean operators: or, and, =, !=, <, <=, >, >=
boolean and relational operators
test/jaxp/javax/xml/jaxp/unittest/xpath/XPathOperatorExpTest.java line 58:
> 56: {"count(//Customer[Age >= 0][Age <= 0])", 1.0},
> 57: {"count(//Customer[Age > 0 or Age < 0])", 2.0},
> 58: {"count(//Customer[Age != 0])", 2.0},
might be better for 'count' to return an integer.
test/jaxp/javax/xml/jaxp/unittest/xpath/XPathOperatorExpTest.java line 60:
> 58: {"count(//Customer[Age != 0])", 2.0},
> 59:
> 60: // number operators: +, -, *, div, mod
arithmetic operators
-------------
PR: https://git.openjdk.org/jdk/pull/10047
More information about the core-libs-dev
mailing list