Skip to content
Permalink
Browse files
JEXL-360; rebased after JEXL-365
  • Loading branch information
henrib committed Apr 25, 2022
1 parent 5d077d1 commit ed4da519948e62df04c9f5864302f5b93c5c30fd
Showing 2 changed files with 8 additions and 8 deletions.
@@ -581,9 +581,9 @@ void EqualityExpression() #void : {}

void RelationalExpression() #void : {}
{
AdditiveExpression()
(
(<lt> |<LT>) AdditiveExpression() #LTNode(2)
ShiftExpression()
( LOOKAHEAD(2) (
(<lt> |<LT>) ShiftExpression() #LTNode(2)
|
(<gt> | <GT>) ShiftExpression() #GTNode(2)
|
@@ -601,8 +601,8 @@ void RelationalExpression() #void : {}
|
<eeq> ShiftExpression() #EWNode(2) // ends with
|
<ene> AdditiveExpression() #NEWNode(2) // not ends with
)?
<ene> ShiftExpression() #NEWNode(2) // not ends with
) )?
}

/***************************************
@@ -43,7 +43,7 @@ public ShiftOperatorsTest() {

@Test
public void testLeftShiftIntValue() throws Exception {
final String expr = "(x, y)->{ x << y }";
final String expr = "(x, y)-> x << y";
asserter.assertExpression(expr, 1L << 2, 1L, 2);
asserter.assertExpression(expr, 1L << -2, 1L, -2);
asserter.assertExpression(expr, -1L << 2, -1L, 2);
@@ -62,7 +62,7 @@ public void testLeftShiftIntValue() throws Exception {

@Test
public void testRightShiftIntValue() throws Exception {
final String expr = "(x, y)->{ x >> y }";
final String expr = "(x, y)-> x >> y";
asserter.assertExpression(expr, 42L >> 2, 42L, 2);
asserter.assertExpression(expr, 42L >> -2, 42L, -2);
asserter.assertExpression(expr, -42L >> 2, -42L, 2);
@@ -81,7 +81,7 @@ public void testRightShiftIntValue() throws Exception {

@Test
public void testRightShiftUnsignedIntValue() throws Exception {
final String expr = "(x, y)->{ x >>> y }";
final String expr = "(x, y)-> x >>> y";
asserter.assertExpression(expr, 42L >>> 2, 42L, 2);
asserter.assertExpression(expr, 42L >>> -2, 42L, -2);
asserter.assertExpression(expr, -42L >>> 2, -42L, 2);

0 comments on commit ed4da51

Please sign in to comment.