diff --git a/modules/lang-painless/src/main/antlr/PainlessParser.g4 b/modules/lang-painless/src/main/antlr/PainlessParser.g4 index e8aa3592c59..4d9a81e25a0 100644 --- a/modules/lang-painless/src/main/antlr/PainlessParser.g4 +++ b/modules/lang-painless/src/main/antlr/PainlessParser.g4 @@ -28,15 +28,15 @@ source statement : IF LP expression RP block ( ELSE block )? # if | WHILE LP expression RP ( block | empty ) # while - | DO block WHILE LP expression RP SEMICOLON? # do + | DO block WHILE LP expression RP ( SEMICOLON | EOF ) # do | FOR LP initializer? SEMICOLON expression? SEMICOLON afterthought? RP ( block | empty ) # for - | declaration SEMICOLON? # decl - | CONTINUE SEMICOLON? # continue - | BREAK SEMICOLON? # break - | RETURN expression SEMICOLON? # return + | declaration ( SEMICOLON | EOF ) # decl + | CONTINUE ( SEMICOLON | EOF ) # continue + | BREAK ( SEMICOLON | EOF ) # break + | RETURN expression ( SEMICOLON | EOF ) # return | TRY block trap+ # try - | THROW expression SEMICOLON? # throw - | expression SEMICOLON? # expr + | THROW expression ( SEMICOLON | EOF ) # throw + | expression ( SEMICOLON | EOF ) # expr ; block diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java index 9d7ae5c628d..c8e76ee4bd9 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java @@ -182,6 +182,7 @@ class PainlessParser extends Parser { return getRuleContext(DeclarationContext.class,0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public DeclContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -192,6 +193,7 @@ class PainlessParser extends Parser { public static class BreakContext extends StatementContext { public TerminalNode BREAK() { return getToken(PainlessParser.BREAK, 0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public BreakContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -205,6 +207,7 @@ class PainlessParser extends Parser { return getRuleContext(ExpressionContext.class,0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public ThrowContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -215,6 +218,7 @@ class PainlessParser extends Parser { public static class ContinueContext extends StatementContext { public TerminalNode CONTINUE() { return getToken(PainlessParser.CONTINUE, 0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public ContinueContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -275,6 +279,7 @@ class PainlessParser extends Parser { return getRuleContext(ExpressionContext.class,0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public ExprContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -294,6 +299,7 @@ class PainlessParser extends Parser { } public TerminalNode RP() { return getToken(PainlessParser.RP, 0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public DoContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -348,6 +354,7 @@ class PainlessParser extends Parser { return getRuleContext(ExpressionContext.class,0); } public TerminalNode SEMICOLON() { return getToken(PainlessParser.SEMICOLON, 0); } + public TerminalNode EOF() { return getToken(PainlessParser.EOF, 0); } public ReturnContext(StatementContext ctx) { copyFrom(ctx); } @Override public T accept(ParseTreeVisitor visitor) { @@ -362,8 +369,8 @@ class PainlessParser extends Parser { int _la; try { int _alt; - setState(134); - switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + setState(125); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: _localctx = new IfContext(_localctx); enterOuterAlt(_localctx, 1); @@ -436,69 +443,67 @@ class PainlessParser extends Parser { expression(0); setState(79); match(RP); - setState(81); + setState(80); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(80); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 4: _localctx = new ForContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(83); + setState(82); match(FOR); - setState(84); + setState(83); match(LP); - setState(86); + setState(85); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) { { - setState(85); + setState(84); initializer(); } } - setState(88); + setState(87); match(SEMICOLON); - setState(90); + setState(89); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) { { - setState(89); + setState(88); expression(0); } } - setState(92); + setState(91); match(SEMICOLON); - setState(94); + setState(93); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) { { - setState(93); + setState(92); afterthought(); } } - setState(96); + setState(95); match(RP); - setState(99); - switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + setState(98); + switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { case 1: { - setState(97); + setState(96); block(); } break; case 2: { - setState(98); + setState(97); empty(); } break; @@ -509,81 +514,73 @@ class PainlessParser extends Parser { _localctx = new DeclContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(101); + setState(100); declaration(); - setState(103); + setState(101); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(102); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 6: _localctx = new ContinueContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(105); + setState(103); match(CONTINUE); - setState(107); + setState(104); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(106); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 7: _localctx = new BreakContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(109); + setState(105); match(BREAK); - setState(111); + setState(106); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(110); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 8: _localctx = new ReturnContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(113); + setState(107); match(RETURN); - setState(114); + setState(108); expression(0); - setState(116); + setState(109); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(115); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 9: _localctx = new TryContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(118); + setState(111); match(TRY); - setState(119); + setState(112); block(); - setState(121); + setState(114); _errHandler.sync(this); _alt = 1; do { @@ -591,7 +588,7 @@ class PainlessParser extends Parser { case 1: { { - setState(120); + setState(113); trap(); } } @@ -599,9 +596,9 @@ class PainlessParser extends Parser { default: throw new NoViableAltException(this); } - setState(123); + setState(116); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + _alt = getInterpreter().adaptivePredict(_input,7,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -609,36 +606,32 @@ class PainlessParser extends Parser { _localctx = new ThrowContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(125); + setState(118); match(THROW); - setState(126); + setState(119); expression(0); - setState(128); + setState(120); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(127); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; case 11: _localctx = new ExprContext(_localctx); enterOuterAlt(_localctx, 11); { - setState(130); + setState(122); expression(0); - setState(132); + setState(123); _la = _input.LA(1); - if (_la==SEMICOLON) { - { - setState(131); - match(SEMICOLON); - } + if ( !(_la==EOF || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); } - } break; } @@ -698,29 +691,29 @@ class PainlessParser extends Parser { enterRule(_localctx, 4, RULE_block); int _la; try { - setState(145); + setState(136); switch (_input.LA(1)) { case LBRACK: _localctx = new MultipleContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(136); + setState(127); match(LBRACK); - setState(138); + setState(129); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(137); + setState(128); statement(); } } - setState(140); + setState(131); _errHandler.sync(this); _la = _input.LA(1); } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << IF) | (1L << WHILE) | (1L << DO) | (1L << FOR) | (1L << CONTINUE) | (1L << BREAK) | (1L << RETURN) | (1L << NEW) | (1L << TRY) | (1L << THROW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0) ); - setState(142); + setState(133); match(RBRACK); } break; @@ -753,7 +746,7 @@ class PainlessParser extends Parser { _localctx = new SingleContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(144); + setState(135); statement(); } break; @@ -792,19 +785,19 @@ class PainlessParser extends Parser { EmptyContext _localctx = new EmptyContext(_ctx, getState()); enterRule(_localctx, 6, RULE_empty); try { - setState(149); + setState(140); switch (_input.LA(1)) { case LBRACK: enterOuterAlt(_localctx, 1); { - setState(147); + setState(138); emptyscope(); } break; case SEMICOLON: enterOuterAlt(_localctx, 2); { - setState(148); + setState(139); match(SEMICOLON); } break; @@ -843,9 +836,9 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(151); + setState(142); match(LBRACK); - setState(152); + setState(143); match(RBRACK); } } @@ -882,19 +875,19 @@ class PainlessParser extends Parser { InitializerContext _localctx = new InitializerContext(_ctx, getState()); enterRule(_localctx, 10, RULE_initializer); try { - setState(156); - switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + setState(147); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(154); + setState(145); declaration(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(155); + setState(146); expression(0); } break; @@ -932,7 +925,7 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(158); + setState(149); expression(0); } } @@ -979,23 +972,23 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(160); + setState(151); decltype(); - setState(161); + setState(152); declvar(); - setState(166); + setState(157); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(162); + setState(153); match(COMMA); - setState(163); + setState(154); declvar(); } } - setState(168); + setState(159); _errHandler.sync(this); _la = _input.LA(1); } @@ -1042,21 +1035,21 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(169); + setState(160); identifier(); - setState(174); + setState(165); _errHandler.sync(this); _la = _input.LA(1); while (_la==LBRACE) { { { - setState(170); + setState(161); match(LBRACE); - setState(171); + setState(162); match(RBRACE); } } - setState(176); + setState(167); _errHandler.sync(this); _la = _input.LA(1); } @@ -1099,15 +1092,15 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(177); + setState(168); identifier(); - setState(180); + setState(171); _la = _input.LA(1); if (_la==ASSIGN) { { - setState(178); + setState(169); match(ASSIGN); - setState(179); + setState(170); expression(0); } } @@ -1158,29 +1151,29 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(182); + setState(173); match(CATCH); - setState(183); + setState(174); match(LP); { - setState(184); + setState(175); identifier(); - setState(185); + setState(176); identifier(); } - setState(187); + setState(178); match(RP); - setState(190); - switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { + setState(181); + switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: { - setState(188); + setState(179); block(); } break; case 2: { - setState(189); + setState(180); emptyscope(); } break; @@ -1220,13 +1213,13 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(192); + setState(183); match(ID); - setState(194); - switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { + setState(185); + switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: { - setState(193); + setState(184); generic(); } break; @@ -1275,27 +1268,27 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(196); + setState(187); match(LT); - setState(197); + setState(188); identifier(); - setState(202); + setState(193); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(198); + setState(189); match(COMMA); - setState(199); + setState(190); identifier(); } } - setState(204); + setState(195); _errHandler.sync(this); _la = _input.LA(1); } - setState(205); + setState(196); match(GT); } } @@ -1563,22 +1556,22 @@ class PainlessParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(233); - switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { + setState(224); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { case 1: { _localctx = new UnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(208); + setState(199); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(209); + setState(200); expression(14); } break; @@ -1587,13 +1580,13 @@ class PainlessParser extends Parser { _localctx = new CastContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(210); + setState(201); match(LP); - setState(211); + setState(202); decltype(); - setState(212); + setState(203); match(RP); - setState(213); + setState(204); expression(13); } break; @@ -1602,16 +1595,16 @@ class PainlessParser extends Parser { _localctx = new AssignmentContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(215); + setState(206); chain(); - setState(216); + setState(207); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASSIGN) | (1L << AADD) | (1L << ASUB) | (1L << AMUL) | (1L << ADIV) | (1L << AREM) | (1L << AAND) | (1L << AXOR) | (1L << AOR) | (1L << ALSH) | (1L << ARSH) | (1L << AUSH))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(217); + setState(208); expression(1); } break; @@ -1620,11 +1613,11 @@ class PainlessParser extends Parser { _localctx = new PrecedenceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(219); + setState(210); match(LP); - setState(220); + setState(211); expression(0); - setState(221); + setState(212); match(RP); } break; @@ -1633,7 +1626,7 @@ class PainlessParser extends Parser { _localctx = new NumericContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(223); + setState(214); _la = _input.LA(1); if ( !(((((_la - 63)) & ~0x3f) == 0 && ((1L << (_la - 63)) & ((1L << (OCTAL - 63)) | (1L << (HEX - 63)) | (1L << (INTEGER - 63)) | (1L << (DECIMAL - 63)))) != 0)) ) { _errHandler.recoverInline(this); @@ -1647,7 +1640,7 @@ class PainlessParser extends Parser { _localctx = new TrueContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(224); + setState(215); match(TRUE); } break; @@ -1656,7 +1649,7 @@ class PainlessParser extends Parser { _localctx = new FalseContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(225); + setState(216); match(FALSE); } break; @@ -1665,7 +1658,7 @@ class PainlessParser extends Parser { _localctx = new NullContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(226); + setState(217); match(NULL); } break; @@ -1674,9 +1667,9 @@ class PainlessParser extends Parser { _localctx = new PostincContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(227); + setState(218); chain(); - setState(228); + setState(219); _la = _input.LA(1); if ( !(_la==INCR || _la==DECR) ) { _errHandler.recoverInline(this); @@ -1690,14 +1683,14 @@ class PainlessParser extends Parser { _localctx = new PreincContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(230); + setState(221); _la = _input.LA(1); if ( !(_la==INCR || _la==DECR) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(231); + setState(222); chain(); } break; @@ -1706,36 +1699,36 @@ class PainlessParser extends Parser { _localctx = new ReadContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(232); + setState(223); chain(); } break; } _ctx.stop = _input.LT(-1); - setState(273); + setState(264); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,28,_ctx); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(271); - switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { + setState(262); + switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { case 1: { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(235); + setState(226); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(236); + setState(227); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << REM))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(237); + setState(228); expression(13); } break; @@ -1743,16 +1736,16 @@ class PainlessParser extends Parser { { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(238); + setState(229); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(239); + setState(230); _la = _input.LA(1); if ( !(_la==ADD || _la==SUB) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(240); + setState(231); expression(12); } break; @@ -1760,16 +1753,16 @@ class PainlessParser extends Parser { { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(241); + setState(232); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(242); + setState(233); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LSH) | (1L << RSH) | (1L << USH))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(243); + setState(234); expression(11); } break; @@ -1777,16 +1770,16 @@ class PainlessParser extends Parser { { _localctx = new CompContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(244); + setState(235); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(245); + setState(236); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(246); + setState(237); expression(10); } break; @@ -1794,16 +1787,16 @@ class PainlessParser extends Parser { { _localctx = new CompContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(247); + setState(238); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(248); + setState(239); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << EQR) | (1L << NE) | (1L << NER))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(249); + setState(240); expression(9); } break; @@ -1811,11 +1804,11 @@ class PainlessParser extends Parser { { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(250); + setState(241); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(251); + setState(242); match(BWAND); - setState(252); + setState(243); expression(8); } break; @@ -1823,11 +1816,11 @@ class PainlessParser extends Parser { { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(253); + setState(244); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(254); + setState(245); match(XOR); - setState(255); + setState(246); expression(7); } break; @@ -1835,11 +1828,11 @@ class PainlessParser extends Parser { { _localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(256); + setState(247); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(257); + setState(248); match(BWOR); - setState(258); + setState(249); expression(6); } break; @@ -1847,11 +1840,11 @@ class PainlessParser extends Parser { { _localctx = new BoolContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(259); + setState(250); if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(260); + setState(251); match(BOOLAND); - setState(261); + setState(252); expression(5); } break; @@ -1859,11 +1852,11 @@ class PainlessParser extends Parser { { _localctx = new BoolContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(262); + setState(253); if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(263); + setState(254); match(BOOLOR); - setState(264); + setState(255); expression(4); } break; @@ -1871,24 +1864,24 @@ class PainlessParser extends Parser { { _localctx = new ConditionalContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(265); + setState(256); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(266); + setState(257); match(COND); - setState(267); + setState(258); expression(0); - setState(268); + setState(259); match(COLON); - setState(269); + setState(260); expression(2); } break; } } } - setState(275); + setState(266); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,28,_ctx); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); } } } @@ -1934,40 +1927,40 @@ class PainlessParser extends Parser { ChainContext _localctx = new ChainContext(_ctx, getState()); enterRule(_localctx, 28, RULE_chain); try { - setState(281); - switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) { + setState(272); + switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(276); + setState(267); linkprec(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(277); + setState(268); linkcast(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(278); + setState(269); linkvar(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(279); + setState(270); linknew(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(280); + setState(271); linkstring(); } break; @@ -2025,54 +2018,54 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(283); + setState(274); match(LP); - setState(289); - switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { + setState(280); + switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { case 1: { - setState(284); + setState(275); linkprec(); } break; case 2: { - setState(285); + setState(276); linkcast(); } break; case 3: { - setState(286); + setState(277); linkvar(); } break; case 4: { - setState(287); + setState(278); linknew(); } break; case 5: { - setState(288); + setState(279); linkstring(); } break; } - setState(291); + setState(282); match(RP); - setState(294); - switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) { + setState(285); + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { case 1: { - setState(292); + setState(283); linkdot(); } break; case 2: { - setState(293); + setState(284); linkbrace(); } break; @@ -2128,41 +2121,41 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(296); + setState(287); match(LP); - setState(297); + setState(288); decltype(); - setState(298); + setState(289); match(RP); - setState(304); - switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + setState(295); + switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { case 1: { - setState(299); + setState(290); linkprec(); } break; case 2: { - setState(300); + setState(291); linkcast(); } break; case 3: { - setState(301); + setState(292); linkvar(); } break; case 4: { - setState(302); + setState(293); linknew(); } break; case 5: { - setState(303); + setState(294); linkstring(); } break; @@ -2209,23 +2202,23 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(306); + setState(297); match(LBRACE); - setState(307); + setState(298); expression(0); - setState(308); + setState(299); match(RBRACE); - setState(311); - switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + setState(302); + switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { case 1: { - setState(309); + setState(300); linkdot(); } break; case 2: { - setState(310); + setState(301); linkbrace(); } break; @@ -2268,19 +2261,19 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(313); + setState(304); match(DOT); - setState(316); - switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + setState(307); + switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { case 1: { - setState(314); + setState(305); linkcall(); } break; case 2: { - setState(315); + setState(306); linkfield(); } break; @@ -2326,21 +2319,21 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(318); + setState(309); match(EXTID); - setState(319); + setState(310); arguments(); - setState(322); - switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + setState(313); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { case 1: { - setState(320); + setState(311); linkdot(); } break; case 2: { - setState(321); + setState(312); linkbrace(); } break; @@ -2385,19 +2378,19 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(324); + setState(315); identifier(); - setState(327); - switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + setState(318); + switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) { case 1: { - setState(325); + setState(316); linkdot(); } break; case 2: { - setState(326); + setState(317); linkbrace(); } break; @@ -2442,24 +2435,24 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(329); + setState(320); _la = _input.LA(1); if ( !(_la==EXTINTEGER || _la==EXTID) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(332); - switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + setState(323); + switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { case 1: { - setState(330); + setState(321); linkdot(); } break; case 2: { - setState(331); + setState(322); linkbrace(); } break; @@ -2520,22 +2513,22 @@ class PainlessParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(334); + setState(325); match(NEW); - setState(335); + setState(326); identifier(); - setState(351); + setState(342); switch (_input.LA(1)) { case LP: { { - setState(336); + setState(327); arguments(); - setState(338); - switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + setState(329); + switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) { case 1: { - setState(337); + setState(328); linkdot(); } break; @@ -2546,7 +2539,7 @@ class PainlessParser extends Parser { case LBRACE: { { - setState(344); + setState(335); _errHandler.sync(this); _alt = 1; do { @@ -2554,11 +2547,11 @@ class PainlessParser extends Parser { case 1: { { - setState(340); + setState(331); match(LBRACE); - setState(341); + setState(332); expression(0); - setState(342); + setState(333); match(RBRACE); } } @@ -2566,15 +2559,15 @@ class PainlessParser extends Parser { default: throw new NoViableAltException(this); } - setState(346); + setState(337); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + _alt = getInterpreter().adaptivePredict(_input,32,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); - setState(349); - switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { + setState(340); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { case 1: { - setState(348); + setState(339); linkdot(); } break; @@ -2623,19 +2616,19 @@ class PainlessParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(353); + setState(344); match(STRING); - setState(356); - switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { + setState(347); + switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { case 1: { - setState(354); + setState(345); linkdot(); } break; case 2: { - setState(355); + setState(346); linkbrace(); } break; @@ -2685,34 +2678,34 @@ class PainlessParser extends Parser { enterOuterAlt(_localctx, 1); { { - setState(358); + setState(349); match(LP); - setState(367); + setState(358); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) { { - setState(359); + setState(350); expression(0); - setState(364); + setState(355); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(360); + setState(351); match(COMMA); - setState(361); + setState(352); expression(0); } } - setState(366); + setState(357); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(369); + setState(360); match(RP); } } @@ -2764,150 +2757,145 @@ class PainlessParser extends Parser { } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3K\u0176\4\2\t\2\4"+ + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3K\u016d\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ "\4\32\t\32\3\2\6\2\66\n\2\r\2\16\2\67\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3"+ "\3\3\5\3C\n\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3K\n\3\3\3\3\3\3\3\3\3\3\3\3\3"+ - "\3\3\5\3T\n\3\3\3\3\3\3\3\5\3Y\n\3\3\3\3\3\5\3]\n\3\3\3\3\3\5\3a\n\3\3"+ - "\3\3\3\3\3\5\3f\n\3\3\3\3\3\5\3j\n\3\3\3\3\3\5\3n\n\3\3\3\3\3\5\3r\n\3"+ - "\3\3\3\3\3\3\5\3w\n\3\3\3\3\3\3\3\6\3|\n\3\r\3\16\3}\3\3\3\3\3\3\5\3\u0083"+ - "\n\3\3\3\3\3\5\3\u0087\n\3\5\3\u0089\n\3\3\4\3\4\6\4\u008d\n\4\r\4\16"+ - "\4\u008e\3\4\3\4\3\4\5\4\u0094\n\4\3\5\3\5\5\5\u0098\n\5\3\6\3\6\3\6\3"+ - "\7\3\7\5\7\u009f\n\7\3\b\3\b\3\t\3\t\3\t\3\t\7\t\u00a7\n\t\f\t\16\t\u00aa"+ - "\13\t\3\n\3\n\3\n\7\n\u00af\n\n\f\n\16\n\u00b2\13\n\3\13\3\13\3\13\5\13"+ - "\u00b7\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00c1\n\f\3\r\3\r\5\r"+ - "\u00c5\n\r\3\16\3\16\3\16\3\16\7\16\u00cb\n\16\f\16\16\16\u00ce\13\16"+ - "\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+ + "\3\3\3\3\3\3\3\3\3\3\5\3X\n\3\3\3\3\3\5\3\\\n\3\3\3\3\3\5\3`\n\3\3\3\3"+ + "\3\3\3\5\3e\n\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+ + "\3\6\3u\n\3\r\3\16\3v\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3\u0080\n\3\3\4\3"+ + "\4\6\4\u0084\n\4\r\4\16\4\u0085\3\4\3\4\3\4\5\4\u008b\n\4\3\5\3\5\5\5"+ + "\u008f\n\5\3\6\3\6\3\6\3\7\3\7\5\7\u0096\n\7\3\b\3\b\3\t\3\t\3\t\3\t\7"+ + "\t\u009e\n\t\f\t\16\t\u00a1\13\t\3\n\3\n\3\n\7\n\u00a6\n\n\f\n\16\n\u00a9"+ + "\13\n\3\13\3\13\3\13\5\13\u00ae\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5"+ + "\f\u00b8\n\f\3\r\3\r\5\r\u00bc\n\r\3\16\3\16\3\16\3\16\7\16\u00c2\n\16"+ + "\f\16\16\16\u00c5\13\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3"+ + "\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3"+ + "\17\3\17\3\17\3\17\3\17\5\17\u00e3\n\17\3\17\3\17\3\17\3\17\3\17\3\17"+ "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+ - "\5\17\u00ec\n\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+ "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+ - "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\7\17\u0112\n\17"+ - "\f\17\16\17\u0115\13\17\3\20\3\20\3\20\3\20\3\20\5\20\u011c\n\20\3\21"+ - "\3\21\3\21\3\21\3\21\3\21\5\21\u0124\n\21\3\21\3\21\3\21\5\21\u0129\n"+ - "\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u0133\n\22\3\23\3\23"+ - "\3\23\3\23\3\23\5\23\u013a\n\23\3\24\3\24\3\24\5\24\u013f\n\24\3\25\3"+ - "\25\3\25\3\25\5\25\u0145\n\25\3\26\3\26\3\26\5\26\u014a\n\26\3\27\3\27"+ - "\3\27\5\27\u014f\n\27\3\30\3\30\3\30\3\30\5\30\u0155\n\30\3\30\3\30\3"+ - "\30\3\30\6\30\u015b\n\30\r\30\16\30\u015c\3\30\5\30\u0160\n\30\5\30\u0162"+ - "\n\30\3\31\3\31\3\31\5\31\u0167\n\31\3\32\3\32\3\32\3\32\7\32\u016d\n"+ - "\32\f\32\16\32\u0170\13\32\5\32\u0172\n\32\3\32\3\32\3\32\2\3\34\33\2"+ - "\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\2\f\4\2\32\33\37"+ - " \3\2\65@\3\2AD\3\2\63\64\3\2\34\36\3\2\37 \3\2!#\3\2$\'\3\2(+\3\2JK\u01b3"+ - "\2\65\3\2\2\2\4\u0088\3\2\2\2\6\u0093\3\2\2\2\b\u0097\3\2\2\2\n\u0099"+ - "\3\2\2\2\f\u009e\3\2\2\2\16\u00a0\3\2\2\2\20\u00a2\3\2\2\2\22\u00ab\3"+ - "\2\2\2\24\u00b3\3\2\2\2\26\u00b8\3\2\2\2\30\u00c2\3\2\2\2\32\u00c6\3\2"+ - "\2\2\34\u00eb\3\2\2\2\36\u011b\3\2\2\2 \u011d\3\2\2\2\"\u012a\3\2\2\2"+ - "$\u0134\3\2\2\2&\u013b\3\2\2\2(\u0140\3\2\2\2*\u0146\3\2\2\2,\u014b\3"+ - "\2\2\2.\u0150\3\2\2\2\60\u0163\3\2\2\2\62\u0168\3\2\2\2\64\66\5\4\3\2"+ - "\65\64\3\2\2\2\66\67\3\2\2\2\67\65\3\2\2\2\678\3\2\2\289\3\2\2\29:\7\2"+ - "\2\3:\3\3\2\2\2;<\7\16\2\2<=\7\t\2\2=>\5\34\17\2>?\7\n\2\2?B\5\6\4\2@"+ - "A\7\17\2\2AC\5\6\4\2B@\3\2\2\2BC\3\2\2\2C\u0089\3\2\2\2DE\7\20\2\2EF\7"+ - "\t\2\2FG\5\34\17\2GJ\7\n\2\2HK\5\6\4\2IK\5\b\5\2JH\3\2\2\2JI\3\2\2\2K"+ - "\u0089\3\2\2\2LM\7\21\2\2MN\5\6\4\2NO\7\20\2\2OP\7\t\2\2PQ\5\34\17\2Q"+ - "S\7\n\2\2RT\7\r\2\2SR\3\2\2\2ST\3\2\2\2T\u0089\3\2\2\2UV\7\22\2\2VX\7"+ - "\t\2\2WY\5\f\7\2XW\3\2\2\2XY\3\2\2\2YZ\3\2\2\2Z\\\7\r\2\2[]\5\34\17\2"+ - "\\[\3\2\2\2\\]\3\2\2\2]^\3\2\2\2^`\7\r\2\2_a\5\16\b\2`_\3\2\2\2`a\3\2"+ - "\2\2ab\3\2\2\2be\7\n\2\2cf\5\6\4\2df\5\b\5\2ec\3\2\2\2ed\3\2\2\2f\u0089"+ - "\3\2\2\2gi\5\20\t\2hj\7\r\2\2ih\3\2\2\2ij\3\2\2\2j\u0089\3\2\2\2km\7\23"+ - "\2\2ln\7\r\2\2ml\3\2\2\2mn\3\2\2\2n\u0089\3\2\2\2oq\7\24\2\2pr\7\r\2\2"+ - "qp\3\2\2\2qr\3\2\2\2r\u0089\3\2\2\2st\7\25\2\2tv\5\34\17\2uw\7\r\2\2v"+ - "u\3\2\2\2vw\3\2\2\2w\u0089\3\2\2\2xy\7\27\2\2y{\5\6\4\2z|\5\26\f\2{z\3"+ - "\2\2\2|}\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\u0089\3\2\2\2\177\u0080\7\31\2\2"+ - "\u0080\u0082\5\34\17\2\u0081\u0083\7\r\2\2\u0082\u0081\3\2\2\2\u0082\u0083"+ - "\3\2\2\2\u0083\u0089\3\2\2\2\u0084\u0086\5\34\17\2\u0085\u0087\7\r\2\2"+ - "\u0086\u0085\3\2\2\2\u0086\u0087\3\2\2\2\u0087\u0089\3\2\2\2\u0088;\3"+ - "\2\2\2\u0088D\3\2\2\2\u0088L\3\2\2\2\u0088U\3\2\2\2\u0088g\3\2\2\2\u0088"+ - "k\3\2\2\2\u0088o\3\2\2\2\u0088s\3\2\2\2\u0088x\3\2\2\2\u0088\177\3\2\2"+ - "\2\u0088\u0084\3\2\2\2\u0089\5\3\2\2\2\u008a\u008c\7\5\2\2\u008b\u008d"+ - "\5\4\3\2\u008c\u008b\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u008c\3\2\2\2\u008e"+ - "\u008f\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u0091\7\6\2\2\u0091\u0094\3\2"+ - "\2\2\u0092\u0094\5\4\3\2\u0093\u008a\3\2\2\2\u0093\u0092\3\2\2\2\u0094"+ - "\7\3\2\2\2\u0095\u0098\5\n\6\2\u0096\u0098\7\r\2\2\u0097\u0095\3\2\2\2"+ - "\u0097\u0096\3\2\2\2\u0098\t\3\2\2\2\u0099\u009a\7\5\2\2\u009a\u009b\7"+ - "\6\2\2\u009b\13\3\2\2\2\u009c\u009f\5\20\t\2\u009d\u009f\5\34\17\2\u009e"+ - "\u009c\3\2\2\2\u009e\u009d\3\2\2\2\u009f\r\3\2\2\2\u00a0\u00a1\5\34\17"+ - "\2\u00a1\17\3\2\2\2\u00a2\u00a3\5\22\n\2\u00a3\u00a8\5\24\13\2\u00a4\u00a5"+ - "\7\f\2\2\u00a5\u00a7\5\24\13\2\u00a6\u00a4\3\2\2\2\u00a7\u00aa\3\2\2\2"+ - "\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\21\3\2\2\2\u00aa\u00a8"+ - "\3\2\2\2\u00ab\u00b0\5\30\r\2\u00ac\u00ad\7\7\2\2\u00ad\u00af\7\b\2\2"+ - "\u00ae\u00ac\3\2\2\2\u00af\u00b2\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1"+ - "\3\2\2\2\u00b1\23\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b3\u00b6\5\30\r\2\u00b4"+ - "\u00b5\7\65\2\2\u00b5\u00b7\5\34\17\2\u00b6\u00b4\3\2\2\2\u00b6\u00b7"+ - "\3\2\2\2\u00b7\25\3\2\2\2\u00b8\u00b9\7\30\2\2\u00b9\u00ba\7\t\2\2\u00ba"+ - "\u00bb\5\30\r\2\u00bb\u00bc\5\30\r\2\u00bc\u00bd\3\2\2\2\u00bd\u00c0\7"+ - "\n\2\2\u00be\u00c1\5\6\4\2\u00bf\u00c1\5\n\6\2\u00c0\u00be\3\2\2\2\u00c0"+ - "\u00bf\3\2\2\2\u00c1\27\3\2\2\2\u00c2\u00c4\7I\2\2\u00c3\u00c5\5\32\16"+ - "\2\u00c4\u00c3\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5\31\3\2\2\2\u00c6\u00c7"+ - "\7$\2\2\u00c7\u00cc\5\30\r\2\u00c8\u00c9\7\f\2\2\u00c9\u00cb\5\30\r\2"+ - "\u00ca\u00c8\3\2\2\2\u00cb\u00ce\3\2\2\2\u00cc\u00ca\3\2\2\2\u00cc\u00cd"+ - "\3\2\2\2\u00cd\u00cf\3\2\2\2\u00ce\u00cc\3\2\2\2\u00cf\u00d0\7&\2\2\u00d0"+ - "\33\3\2\2\2\u00d1\u00d2\b\17\1\2\u00d2\u00d3\t\2\2\2\u00d3\u00ec\5\34"+ - "\17\20\u00d4\u00d5\7\t\2\2\u00d5\u00d6\5\22\n\2\u00d6\u00d7\7\n\2\2\u00d7"+ - "\u00d8\5\34\17\17\u00d8\u00ec\3\2\2\2\u00d9\u00da\5\36\20\2\u00da\u00db"+ - "\t\3\2\2\u00db\u00dc\5\34\17\3\u00dc\u00ec\3\2\2\2\u00dd\u00de\7\t\2\2"+ - "\u00de\u00df\5\34\17\2\u00df\u00e0\7\n\2\2\u00e0\u00ec\3\2\2\2\u00e1\u00ec"+ - "\t\4\2\2\u00e2\u00ec\7F\2\2\u00e3\u00ec\7G\2\2\u00e4\u00ec\7H\2\2\u00e5"+ - "\u00e6\5\36\20\2\u00e6\u00e7\t\5\2\2\u00e7\u00ec\3\2\2\2\u00e8\u00e9\t"+ - "\5\2\2\u00e9\u00ec\5\36\20\2\u00ea\u00ec\5\36\20\2\u00eb\u00d1\3\2\2\2"+ - "\u00eb\u00d4\3\2\2\2\u00eb\u00d9\3\2\2\2\u00eb\u00dd\3\2\2\2\u00eb\u00e1"+ - "\3\2\2\2\u00eb\u00e2\3\2\2\2\u00eb\u00e3\3\2\2\2\u00eb\u00e4\3\2\2\2\u00eb"+ - "\u00e5\3\2\2\2\u00eb\u00e8\3\2\2\2\u00eb\u00ea\3\2\2\2\u00ec\u0113\3\2"+ - "\2\2\u00ed\u00ee\f\16\2\2\u00ee\u00ef\t\6\2\2\u00ef\u0112\5\34\17\17\u00f0"+ - "\u00f1\f\r\2\2\u00f1\u00f2\t\7\2\2\u00f2\u0112\5\34\17\16\u00f3\u00f4"+ - "\f\f\2\2\u00f4\u00f5\t\b\2\2\u00f5\u0112\5\34\17\r\u00f6\u00f7\f\13\2"+ - "\2\u00f7\u00f8\t\t\2\2\u00f8\u0112\5\34\17\f\u00f9\u00fa\f\n\2\2\u00fa"+ - "\u00fb\t\n\2\2\u00fb\u0112\5\34\17\13\u00fc\u00fd\f\t\2\2\u00fd\u00fe"+ - "\7,\2\2\u00fe\u0112\5\34\17\n\u00ff\u0100\f\b\2\2\u0100\u0101\7-\2\2\u0101"+ - "\u0112\5\34\17\t\u0102\u0103\f\7\2\2\u0103\u0104\7.\2\2\u0104\u0112\5"+ - "\34\17\b\u0105\u0106\f\6\2\2\u0106\u0107\7/\2\2\u0107\u0112\5\34\17\7"+ - "\u0108\u0109\f\5\2\2\u0109\u010a\7\60\2\2\u010a\u0112\5\34\17\6\u010b"+ - "\u010c\f\4\2\2\u010c\u010d\7\61\2\2\u010d\u010e\5\34\17\2\u010e\u010f"+ - "\7\62\2\2\u010f\u0110\5\34\17\4\u0110\u0112\3\2\2\2\u0111\u00ed\3\2\2"+ - "\2\u0111\u00f0\3\2\2\2\u0111\u00f3\3\2\2\2\u0111\u00f6\3\2\2\2\u0111\u00f9"+ - "\3\2\2\2\u0111\u00fc\3\2\2\2\u0111\u00ff\3\2\2\2\u0111\u0102\3\2\2\2\u0111"+ - "\u0105\3\2\2\2\u0111\u0108\3\2\2\2\u0111\u010b\3\2\2\2\u0112\u0115\3\2"+ - "\2\2\u0113\u0111\3\2\2\2\u0113\u0114\3\2\2\2\u0114\35\3\2\2\2\u0115\u0113"+ - "\3\2\2\2\u0116\u011c\5 \21\2\u0117\u011c\5\"\22\2\u0118\u011c\5*\26\2"+ - "\u0119\u011c\5.\30\2\u011a\u011c\5\60\31\2\u011b\u0116\3\2\2\2\u011b\u0117"+ - "\3\2\2\2\u011b\u0118\3\2\2\2\u011b\u0119\3\2\2\2\u011b\u011a\3\2\2\2\u011c"+ - "\37\3\2\2\2\u011d\u0123\7\t\2\2\u011e\u0124\5 \21\2\u011f\u0124\5\"\22"+ - "\2\u0120\u0124\5*\26\2\u0121\u0124\5.\30\2\u0122\u0124\5\60\31\2\u0123"+ - "\u011e\3\2\2\2\u0123\u011f\3\2\2\2\u0123\u0120\3\2\2\2\u0123\u0121\3\2"+ - "\2\2\u0123\u0122\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0128\7\n\2\2\u0126"+ - "\u0129\5&\24\2\u0127\u0129\5$\23\2\u0128\u0126\3\2\2\2\u0128\u0127\3\2"+ - "\2\2\u0128\u0129\3\2\2\2\u0129!\3\2\2\2\u012a\u012b\7\t\2\2\u012b\u012c"+ - "\5\22\n\2\u012c\u0132\7\n\2\2\u012d\u0133\5 \21\2\u012e\u0133\5\"\22\2"+ - "\u012f\u0133\5*\26\2\u0130\u0133\5.\30\2\u0131\u0133\5\60\31\2\u0132\u012d"+ - "\3\2\2\2\u0132\u012e\3\2\2\2\u0132\u012f\3\2\2\2\u0132\u0130\3\2\2\2\u0132"+ - "\u0131\3\2\2\2\u0133#\3\2\2\2\u0134\u0135\7\7\2\2\u0135\u0136\5\34\17"+ - "\2\u0136\u0139\7\b\2\2\u0137\u013a\5&\24\2\u0138\u013a\5$\23\2\u0139\u0137"+ - "\3\2\2\2\u0139\u0138\3\2\2\2\u0139\u013a\3\2\2\2\u013a%\3\2\2\2\u013b"+ - "\u013e\7\13\2\2\u013c\u013f\5(\25\2\u013d\u013f\5,\27\2\u013e\u013c\3"+ - "\2\2\2\u013e\u013d\3\2\2\2\u013f\'\3\2\2\2\u0140\u0141\7K\2\2\u0141\u0144"+ - "\5\62\32\2\u0142\u0145\5&\24\2\u0143\u0145\5$\23\2\u0144\u0142\3\2\2\2"+ - "\u0144\u0143\3\2\2\2\u0144\u0145\3\2\2\2\u0145)\3\2\2\2\u0146\u0149\5"+ - "\30\r\2\u0147\u014a\5&\24\2\u0148\u014a\5$\23\2\u0149\u0147\3\2\2\2\u0149"+ - "\u0148\3\2\2\2\u0149\u014a\3\2\2\2\u014a+\3\2\2\2\u014b\u014e\t\13\2\2"+ - "\u014c\u014f\5&\24\2\u014d\u014f\5$\23\2\u014e\u014c\3\2\2\2\u014e\u014d"+ - "\3\2\2\2\u014e\u014f\3\2\2\2\u014f-\3\2\2\2\u0150\u0151\7\26\2\2\u0151"+ - "\u0161\5\30\r\2\u0152\u0154\5\62\32\2\u0153\u0155\5&\24\2\u0154\u0153"+ - "\3\2\2\2\u0154\u0155\3\2\2\2\u0155\u0162\3\2\2\2\u0156\u0157\7\7\2\2\u0157"+ - "\u0158\5\34\17\2\u0158\u0159\7\b\2\2\u0159\u015b\3\2\2\2\u015a\u0156\3"+ - "\2\2\2\u015b\u015c\3\2\2\2\u015c\u015a\3\2\2\2\u015c\u015d\3\2\2\2\u015d"+ - "\u015f\3\2\2\2\u015e\u0160\5&\24\2\u015f\u015e\3\2\2\2\u015f\u0160\3\2"+ - "\2\2\u0160\u0162\3\2\2\2\u0161\u0152\3\2\2\2\u0161\u015a\3\2\2\2\u0162"+ - "/\3\2\2\2\u0163\u0166\7E\2\2\u0164\u0167\5&\24\2\u0165\u0167\5$\23\2\u0166"+ - "\u0164\3\2\2\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167\61\3\2\2"+ - "\2\u0168\u0171\7\t\2\2\u0169\u016e\5\34\17\2\u016a\u016b\7\f\2\2\u016b"+ - "\u016d\5\34\17\2\u016c\u016a\3\2\2\2\u016d\u0170\3\2\2\2\u016e\u016c\3"+ - "\2\2\2\u016e\u016f\3\2\2\2\u016f\u0172\3\2\2\2\u0170\u016e\3\2\2\2\u0171"+ - "\u0169\3\2\2\2\u0171\u0172\3\2\2\2\u0172\u0173\3\2\2\2\u0173\u0174\7\n"+ - "\2\2\u0174\63\3\2\2\2/\67BJSX\\`eimqv}\u0082\u0086\u0088\u008e\u0093\u0097"+ - "\u009e\u00a8\u00b0\u00b6\u00c0\u00c4\u00cc\u00eb\u0111\u0113\u011b\u0123"+ - "\u0128\u0132\u0139\u013e\u0144\u0149\u014e\u0154\u015c\u015f\u0161\u0166"+ - "\u016e\u0171"; + "\3\17\3\17\7\17\u0109\n\17\f\17\16\17\u010c\13\17\3\20\3\20\3\20\3\20"+ + "\3\20\5\20\u0113\n\20\3\21\3\21\3\21\3\21\3\21\3\21\5\21\u011b\n\21\3"+ + "\21\3\21\3\21\5\21\u0120\n\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+ + "\5\22\u012a\n\22\3\23\3\23\3\23\3\23\3\23\5\23\u0131\n\23\3\24\3\24\3"+ + "\24\5\24\u0136\n\24\3\25\3\25\3\25\3\25\5\25\u013c\n\25\3\26\3\26\3\26"+ + "\5\26\u0141\n\26\3\27\3\27\3\27\5\27\u0146\n\27\3\30\3\30\3\30\3\30\5"+ + "\30\u014c\n\30\3\30\3\30\3\30\3\30\6\30\u0152\n\30\r\30\16\30\u0153\3"+ + "\30\5\30\u0157\n\30\5\30\u0159\n\30\3\31\3\31\3\31\5\31\u015e\n\31\3\32"+ + "\3\32\3\32\3\32\7\32\u0164\n\32\f\32\16\32\u0167\13\32\5\32\u0169\n\32"+ + "\3\32\3\32\3\32\2\3\34\33\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&"+ + "(*,.\60\62\2\r\3\3\r\r\4\2\32\33\37 \3\2\65@\3\2AD\3\2\63\64\3\2\34\36"+ + "\3\2\37 \3\2!#\3\2$\'\3\2(+\3\2JK\u01a3\2\65\3\2\2\2\4\177\3\2\2\2\6\u008a"+ + "\3\2\2\2\b\u008e\3\2\2\2\n\u0090\3\2\2\2\f\u0095\3\2\2\2\16\u0097\3\2"+ + "\2\2\20\u0099\3\2\2\2\22\u00a2\3\2\2\2\24\u00aa\3\2\2\2\26\u00af\3\2\2"+ + "\2\30\u00b9\3\2\2\2\32\u00bd\3\2\2\2\34\u00e2\3\2\2\2\36\u0112\3\2\2\2"+ + " \u0114\3\2\2\2\"\u0121\3\2\2\2$\u012b\3\2\2\2&\u0132\3\2\2\2(\u0137\3"+ + "\2\2\2*\u013d\3\2\2\2,\u0142\3\2\2\2.\u0147\3\2\2\2\60\u015a\3\2\2\2\62"+ + "\u015f\3\2\2\2\64\66\5\4\3\2\65\64\3\2\2\2\66\67\3\2\2\2\67\65\3\2\2\2"+ + "\678\3\2\2\289\3\2\2\29:\7\2\2\3:\3\3\2\2\2;<\7\16\2\2<=\7\t\2\2=>\5\34"+ + "\17\2>?\7\n\2\2?B\5\6\4\2@A\7\17\2\2AC\5\6\4\2B@\3\2\2\2BC\3\2\2\2C\u0080"+ + "\3\2\2\2DE\7\20\2\2EF\7\t\2\2FG\5\34\17\2GJ\7\n\2\2HK\5\6\4\2IK\5\b\5"+ + "\2JH\3\2\2\2JI\3\2\2\2K\u0080\3\2\2\2LM\7\21\2\2MN\5\6\4\2NO\7\20\2\2"+ + "OP\7\t\2\2PQ\5\34\17\2QR\7\n\2\2RS\t\2\2\2S\u0080\3\2\2\2TU\7\22\2\2U"+ + "W\7\t\2\2VX\5\f\7\2WV\3\2\2\2WX\3\2\2\2XY\3\2\2\2Y[\7\r\2\2Z\\\5\34\17"+ + "\2[Z\3\2\2\2[\\\3\2\2\2\\]\3\2\2\2]_\7\r\2\2^`\5\16\b\2_^\3\2\2\2_`\3"+ + "\2\2\2`a\3\2\2\2ad\7\n\2\2be\5\6\4\2ce\5\b\5\2db\3\2\2\2dc\3\2\2\2e\u0080"+ + "\3\2\2\2fg\5\20\t\2gh\t\2\2\2h\u0080\3\2\2\2ij\7\23\2\2j\u0080\t\2\2\2"+ + "kl\7\24\2\2l\u0080\t\2\2\2mn\7\25\2\2no\5\34\17\2op\t\2\2\2p\u0080\3\2"+ + "\2\2qr\7\27\2\2rt\5\6\4\2su\5\26\f\2ts\3\2\2\2uv\3\2\2\2vt\3\2\2\2vw\3"+ + "\2\2\2w\u0080\3\2\2\2xy\7\31\2\2yz\5\34\17\2z{\t\2\2\2{\u0080\3\2\2\2"+ + "|}\5\34\17\2}~\t\2\2\2~\u0080\3\2\2\2\177;\3\2\2\2\177D\3\2\2\2\177L\3"+ + "\2\2\2\177T\3\2\2\2\177f\3\2\2\2\177i\3\2\2\2\177k\3\2\2\2\177m\3\2\2"+ + "\2\177q\3\2\2\2\177x\3\2\2\2\177|\3\2\2\2\u0080\5\3\2\2\2\u0081\u0083"+ + "\7\5\2\2\u0082\u0084\5\4\3\2\u0083\u0082\3\2\2\2\u0084\u0085\3\2\2\2\u0085"+ + "\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0087\3\2\2\2\u0087\u0088\7\6"+ + "\2\2\u0088\u008b\3\2\2\2\u0089\u008b\5\4\3\2\u008a\u0081\3\2\2\2\u008a"+ + "\u0089\3\2\2\2\u008b\7\3\2\2\2\u008c\u008f\5\n\6\2\u008d\u008f\7\r\2\2"+ + "\u008e\u008c\3\2\2\2\u008e\u008d\3\2\2\2\u008f\t\3\2\2\2\u0090\u0091\7"+ + "\5\2\2\u0091\u0092\7\6\2\2\u0092\13\3\2\2\2\u0093\u0096\5\20\t\2\u0094"+ + "\u0096\5\34\17\2\u0095\u0093\3\2\2\2\u0095\u0094\3\2\2\2\u0096\r\3\2\2"+ + "\2\u0097\u0098\5\34\17\2\u0098\17\3\2\2\2\u0099\u009a\5\22\n\2\u009a\u009f"+ + "\5\24\13\2\u009b\u009c\7\f\2\2\u009c\u009e\5\24\13\2\u009d\u009b\3\2\2"+ + "\2\u009e\u00a1\3\2\2\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0\21"+ + "\3\2\2\2\u00a1\u009f\3\2\2\2\u00a2\u00a7\5\30\r\2\u00a3\u00a4\7\7\2\2"+ + "\u00a4\u00a6\7\b\2\2\u00a5\u00a3\3\2\2\2\u00a6\u00a9\3\2\2\2\u00a7\u00a5"+ + "\3\2\2\2\u00a7\u00a8\3\2\2\2\u00a8\23\3\2\2\2\u00a9\u00a7\3\2\2\2\u00aa"+ + "\u00ad\5\30\r\2\u00ab\u00ac\7\65\2\2\u00ac\u00ae\5\34\17\2\u00ad\u00ab"+ + "\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\25\3\2\2\2\u00af\u00b0\7\30\2\2\u00b0"+ + "\u00b1\7\t\2\2\u00b1\u00b2\5\30\r\2\u00b2\u00b3\5\30\r\2\u00b3\u00b4\3"+ + "\2\2\2\u00b4\u00b7\7\n\2\2\u00b5\u00b8\5\6\4\2\u00b6\u00b8\5\n\6\2\u00b7"+ + "\u00b5\3\2\2\2\u00b7\u00b6\3\2\2\2\u00b8\27\3\2\2\2\u00b9\u00bb\7I\2\2"+ + "\u00ba\u00bc\5\32\16\2\u00bb\u00ba\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\31"+ + "\3\2\2\2\u00bd\u00be\7$\2\2\u00be\u00c3\5\30\r\2\u00bf\u00c0\7\f\2\2\u00c0"+ + "\u00c2\5\30\r\2\u00c1\u00bf\3\2\2\2\u00c2\u00c5\3\2\2\2\u00c3\u00c1\3"+ + "\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00c6\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c6"+ + "\u00c7\7&\2\2\u00c7\33\3\2\2\2\u00c8\u00c9\b\17\1\2\u00c9\u00ca\t\3\2"+ + "\2\u00ca\u00e3\5\34\17\20\u00cb\u00cc\7\t\2\2\u00cc\u00cd\5\22\n\2\u00cd"+ + "\u00ce\7\n\2\2\u00ce\u00cf\5\34\17\17\u00cf\u00e3\3\2\2\2\u00d0\u00d1"+ + "\5\36\20\2\u00d1\u00d2\t\4\2\2\u00d2\u00d3\5\34\17\3\u00d3\u00e3\3\2\2"+ + "\2\u00d4\u00d5\7\t\2\2\u00d5\u00d6\5\34\17\2\u00d6\u00d7\7\n\2\2\u00d7"+ + "\u00e3\3\2\2\2\u00d8\u00e3\t\5\2\2\u00d9\u00e3\7F\2\2\u00da\u00e3\7G\2"+ + "\2\u00db\u00e3\7H\2\2\u00dc\u00dd\5\36\20\2\u00dd\u00de\t\6\2\2\u00de"+ + "\u00e3\3\2\2\2\u00df\u00e0\t\6\2\2\u00e0\u00e3\5\36\20\2\u00e1\u00e3\5"+ + "\36\20\2\u00e2\u00c8\3\2\2\2\u00e2\u00cb\3\2\2\2\u00e2\u00d0\3\2\2\2\u00e2"+ + "\u00d4\3\2\2\2\u00e2\u00d8\3\2\2\2\u00e2\u00d9\3\2\2\2\u00e2\u00da\3\2"+ + "\2\2\u00e2\u00db\3\2\2\2\u00e2\u00dc\3\2\2\2\u00e2\u00df\3\2\2\2\u00e2"+ + "\u00e1\3\2\2\2\u00e3\u010a\3\2\2\2\u00e4\u00e5\f\16\2\2\u00e5\u00e6\t"+ + "\7\2\2\u00e6\u0109\5\34\17\17\u00e7\u00e8\f\r\2\2\u00e8\u00e9\t\b\2\2"+ + "\u00e9\u0109\5\34\17\16\u00ea\u00eb\f\f\2\2\u00eb\u00ec\t\t\2\2\u00ec"+ + "\u0109\5\34\17\r\u00ed\u00ee\f\13\2\2\u00ee\u00ef\t\n\2\2\u00ef\u0109"+ + "\5\34\17\f\u00f0\u00f1\f\n\2\2\u00f1\u00f2\t\13\2\2\u00f2\u0109\5\34\17"+ + "\13\u00f3\u00f4\f\t\2\2\u00f4\u00f5\7,\2\2\u00f5\u0109\5\34\17\n\u00f6"+ + "\u00f7\f\b\2\2\u00f7\u00f8\7-\2\2\u00f8\u0109\5\34\17\t\u00f9\u00fa\f"+ + "\7\2\2\u00fa\u00fb\7.\2\2\u00fb\u0109\5\34\17\b\u00fc\u00fd\f\6\2\2\u00fd"+ + "\u00fe\7/\2\2\u00fe\u0109\5\34\17\7\u00ff\u0100\f\5\2\2\u0100\u0101\7"+ + "\60\2\2\u0101\u0109\5\34\17\6\u0102\u0103\f\4\2\2\u0103\u0104\7\61\2\2"+ + "\u0104\u0105\5\34\17\2\u0105\u0106\7\62\2\2\u0106\u0107\5\34\17\4\u0107"+ + "\u0109\3\2\2\2\u0108\u00e4\3\2\2\2\u0108\u00e7\3\2\2\2\u0108\u00ea\3\2"+ + "\2\2\u0108\u00ed\3\2\2\2\u0108\u00f0\3\2\2\2\u0108\u00f3\3\2\2\2\u0108"+ + "\u00f6\3\2\2\2\u0108\u00f9\3\2\2\2\u0108\u00fc\3\2\2\2\u0108\u00ff\3\2"+ + "\2\2\u0108\u0102\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108\3\2\2\2\u010a"+ + "\u010b\3\2\2\2\u010b\35\3\2\2\2\u010c\u010a\3\2\2\2\u010d\u0113\5 \21"+ + "\2\u010e\u0113\5\"\22\2\u010f\u0113\5*\26\2\u0110\u0113\5.\30\2\u0111"+ + "\u0113\5\60\31\2\u0112\u010d\3\2\2\2\u0112\u010e\3\2\2\2\u0112\u010f\3"+ + "\2\2\2\u0112\u0110\3\2\2\2\u0112\u0111\3\2\2\2\u0113\37\3\2\2\2\u0114"+ + "\u011a\7\t\2\2\u0115\u011b\5 \21\2\u0116\u011b\5\"\22\2\u0117\u011b\5"+ + "*\26\2\u0118\u011b\5.\30\2\u0119\u011b\5\60\31\2\u011a\u0115\3\2\2\2\u011a"+ + "\u0116\3\2\2\2\u011a\u0117\3\2\2\2\u011a\u0118\3\2\2\2\u011a\u0119\3\2"+ + "\2\2\u011b\u011c\3\2\2\2\u011c\u011f\7\n\2\2\u011d\u0120\5&\24\2\u011e"+ + "\u0120\5$\23\2\u011f\u011d\3\2\2\2\u011f\u011e\3\2\2\2\u011f\u0120\3\2"+ + "\2\2\u0120!\3\2\2\2\u0121\u0122\7\t\2\2\u0122\u0123\5\22\n\2\u0123\u0129"+ + "\7\n\2\2\u0124\u012a\5 \21\2\u0125\u012a\5\"\22\2\u0126\u012a\5*\26\2"+ + "\u0127\u012a\5.\30\2\u0128\u012a\5\60\31\2\u0129\u0124\3\2\2\2\u0129\u0125"+ + "\3\2\2\2\u0129\u0126\3\2\2\2\u0129\u0127\3\2\2\2\u0129\u0128\3\2\2\2\u012a"+ + "#\3\2\2\2\u012b\u012c\7\7\2\2\u012c\u012d\5\34\17\2\u012d\u0130\7\b\2"+ + "\2\u012e\u0131\5&\24\2\u012f\u0131\5$\23\2\u0130\u012e\3\2\2\2\u0130\u012f"+ + "\3\2\2\2\u0130\u0131\3\2\2\2\u0131%\3\2\2\2\u0132\u0135\7\13\2\2\u0133"+ + "\u0136\5(\25\2\u0134\u0136\5,\27\2\u0135\u0133\3\2\2\2\u0135\u0134\3\2"+ + "\2\2\u0136\'\3\2\2\2\u0137\u0138\7K\2\2\u0138\u013b\5\62\32\2\u0139\u013c"+ + "\5&\24\2\u013a\u013c\5$\23\2\u013b\u0139\3\2\2\2\u013b\u013a\3\2\2\2\u013b"+ + "\u013c\3\2\2\2\u013c)\3\2\2\2\u013d\u0140\5\30\r\2\u013e\u0141\5&\24\2"+ + "\u013f\u0141\5$\23\2\u0140\u013e\3\2\2\2\u0140\u013f\3\2\2\2\u0140\u0141"+ + "\3\2\2\2\u0141+\3\2\2\2\u0142\u0145\t\f\2\2\u0143\u0146\5&\24\2\u0144"+ + "\u0146\5$\23\2\u0145\u0143\3\2\2\2\u0145\u0144\3\2\2\2\u0145\u0146\3\2"+ + "\2\2\u0146-\3\2\2\2\u0147\u0148\7\26\2\2\u0148\u0158\5\30\r\2\u0149\u014b"+ + "\5\62\32\2\u014a\u014c\5&\24\2\u014b\u014a\3\2\2\2\u014b\u014c\3\2\2\2"+ + "\u014c\u0159\3\2\2\2\u014d\u014e\7\7\2\2\u014e\u014f\5\34\17\2\u014f\u0150"+ + "\7\b\2\2\u0150\u0152\3\2\2\2\u0151\u014d\3\2\2\2\u0152\u0153\3\2\2\2\u0153"+ + "\u0151\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0156\3\2\2\2\u0155\u0157\5&"+ + "\24\2\u0156\u0155\3\2\2\2\u0156\u0157\3\2\2\2\u0157\u0159\3\2\2\2\u0158"+ + "\u0149\3\2\2\2\u0158\u0151\3\2\2\2\u0159/\3\2\2\2\u015a\u015d\7E\2\2\u015b"+ + "\u015e\5&\24\2\u015c\u015e\5$\23\2\u015d\u015b\3\2\2\2\u015d\u015c\3\2"+ + "\2\2\u015d\u015e\3\2\2\2\u015e\61\3\2\2\2\u015f\u0168\7\t\2\2\u0160\u0165"+ + "\5\34\17\2\u0161\u0162\7\f\2\2\u0162\u0164\5\34\17\2\u0163\u0161\3\2\2"+ + "\2\u0164\u0167\3\2\2\2\u0165\u0163\3\2\2\2\u0165\u0166\3\2\2\2\u0166\u0169"+ + "\3\2\2\2\u0167\u0165\3\2\2\2\u0168\u0160\3\2\2\2\u0168\u0169\3\2\2\2\u0169"+ + "\u016a\3\2\2\2\u016a\u016b\7\n\2\2\u016b\63\3\2\2\2(\67BJW[_dv\177\u0085"+ + "\u008a\u008e\u0095\u009f\u00a7\u00ad\u00b7\u00bb\u00c3\u00e2\u0108\u010a"+ + "\u0112\u011a\u011f\u0129\u0130\u0135\u013b\u0140\u0145\u014b\u0153\u0156"+ + "\u0158\u015d\u0165\u0168"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/DefOperationTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/DefOperationTests.java index cd4bda1c071..22a9d50b991 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/DefOperationTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/DefOperationTests.java @@ -21,894 +21,894 @@ package org.elasticsearch.painless; public class DefOperationTests extends ScriptTestCase { public void testNot() { - assertEquals(~1, exec("def x = (byte)1 return ~x")); - assertEquals(~1, exec("def x = (short)1 return ~x")); - assertEquals(~1, exec("def x = (char)1 return ~x")); - assertEquals(~1, exec("def x = 1 return ~x")); - assertEquals(~1L, exec("def x = 1L return ~x")); + assertEquals(~1, exec("def x = (byte)1; return ~x")); + assertEquals(~1, exec("def x = (short)1; return ~x")); + assertEquals(~1, exec("def x = (char)1; return ~x")); + assertEquals(~1, exec("def x = 1; return ~x")); + assertEquals(~1L, exec("def x = 1L; return ~x")); } public void testNeg() { - assertEquals(-1, exec("def x = (byte)1 return -x")); - assertEquals(-1, exec("def x = (short)1 return -x")); - assertEquals(-1, exec("def x = (char)1 return -x")); - assertEquals(-1, exec("def x = 1 return -x")); - assertEquals(-1L, exec("def x = 1L return -x")); - assertEquals(-1.0F, exec("def x = 1F return -x")); - assertEquals(-1.0, exec("def x = 1.0 return -x")); + assertEquals(-1, exec("def x = (byte)1; return -x")); + assertEquals(-1, exec("def x = (short)1; return -x")); + assertEquals(-1, exec("def x = (char)1; return -x")); + assertEquals(-1, exec("def x = 1; return -x")); + assertEquals(-1L, exec("def x = 1L; return -x")); + assertEquals(-1.0F, exec("def x = 1F; return -x")); + assertEquals(-1.0, exec("def x = 1.0; return -x")); } public void testMul() { - assertEquals(4, exec("def x = (byte)2 def y = (byte)2 return x * y")); - assertEquals(4, exec("def x = (short)2 def y = (byte)2 return x * y")); - assertEquals(4, exec("def x = (char)2 def y = (byte)2 return x * y")); - assertEquals(4, exec("def x = (int)2 def y = (byte)2 return x * y")); - assertEquals(4L, exec("def x = (long)2 def y = (byte)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (byte)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (byte)2 return x * y")); + assertEquals(4, exec("def x = (byte)2; def y = (byte)2; return x * y")); + assertEquals(4, exec("def x = (short)2; def y = (byte)2; return x * y")); + assertEquals(4, exec("def x = (char)2; def y = (byte)2; return x * y")); + assertEquals(4, exec("def x = (int)2; def y = (byte)2; return x * y")); + assertEquals(4L, exec("def x = (long)2; def y = (byte)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (byte)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (byte)2; return x * y")); - assertEquals(4, exec("def x = (byte)2 def y = (short)2 return x * y")); - assertEquals(4, exec("def x = (short)2 def y = (short)2 return x * y")); - assertEquals(4, exec("def x = (char)2 def y = (short)2 return x * y")); - assertEquals(4, exec("def x = (int)2 def y = (short)2 return x * y")); - assertEquals(4L, exec("def x = (long)2 def y = (short)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (short)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (short)2 return x * y")); + assertEquals(4, exec("def x = (byte)2; def y = (short)2; return x * y")); + assertEquals(4, exec("def x = (short)2; def y = (short)2; return x * y")); + assertEquals(4, exec("def x = (char)2; def y = (short)2; return x * y")); + assertEquals(4, exec("def x = (int)2; def y = (short)2; return x * y")); + assertEquals(4L, exec("def x = (long)2; def y = (short)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (short)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (short)2; return x * y")); - assertEquals(4, exec("def x = (byte)2 def y = (char)2 return x * y")); - assertEquals(4, exec("def x = (short)2 def y = (char)2 return x * y")); - assertEquals(4, exec("def x = (char)2 def y = (char)2 return x * y")); - assertEquals(4, exec("def x = (int)2 def y = (char)2 return x * y")); - assertEquals(4L, exec("def x = (long)2 def y = (char)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (char)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (char)2 return x * y")); + assertEquals(4, exec("def x = (byte)2; def y = (char)2; return x * y")); + assertEquals(4, exec("def x = (short)2; def y = (char)2; return x * y")); + assertEquals(4, exec("def x = (char)2; def y = (char)2; return x * y")); + assertEquals(4, exec("def x = (int)2; def y = (char)2; return x * y")); + assertEquals(4L, exec("def x = (long)2; def y = (char)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (char)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (char)2; return x * y")); - assertEquals(4, exec("def x = (byte)2 def y = (int)2 return x * y")); - assertEquals(4, exec("def x = (short)2 def y = (int)2 return x * y")); - assertEquals(4, exec("def x = (char)2 def y = (int)2 return x * y")); - assertEquals(4, exec("def x = (int)2 def y = (int)2 return x * y")); - assertEquals(4L, exec("def x = (long)2 def y = (int)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (int)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (int)2 return x * y")); + assertEquals(4, exec("def x = (byte)2; def y = (int)2; return x * y")); + assertEquals(4, exec("def x = (short)2; def y = (int)2; return x * y")); + assertEquals(4, exec("def x = (char)2; def y = (int)2; return x * y")); + assertEquals(4, exec("def x = (int)2; def y = (int)2; return x * y")); + assertEquals(4L, exec("def x = (long)2; def y = (int)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (int)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (int)2; return x * y")); - assertEquals(4L, exec("def x = (byte)2 def y = (long)2 return x * y")); - assertEquals(4L, exec("def x = (short)2 def y = (long)2 return x * y")); - assertEquals(4L, exec("def x = (char)2 def y = (long)2 return x * y")); - assertEquals(4L, exec("def x = (int)2 def y = (long)2 return x * y")); - assertEquals(4L, exec("def x = (long)2 def y = (long)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (long)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (long)2 return x * y")); + assertEquals(4L, exec("def x = (byte)2; def y = (long)2; return x * y")); + assertEquals(4L, exec("def x = (short)2; def y = (long)2; return x * y")); + assertEquals(4L, exec("def x = (char)2; def y = (long)2; return x * y")); + assertEquals(4L, exec("def x = (int)2; def y = (long)2; return x * y")); + assertEquals(4L, exec("def x = (long)2; def y = (long)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (long)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (long)2; return x * y")); - assertEquals(4F, exec("def x = (byte)2 def y = (float)2 return x * y")); - assertEquals(4F, exec("def x = (short)2 def y = (float)2 return x * y")); - assertEquals(4F, exec("def x = (char)2 def y = (float)2 return x * y")); - assertEquals(4F, exec("def x = (int)2 def y = (float)2 return x * y")); - assertEquals(4F, exec("def x = (long)2 def y = (float)2 return x * y")); - assertEquals(4F, exec("def x = (float)2 def y = (float)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (float)2 return x * y")); + assertEquals(4F, exec("def x = (byte)2; def y = (float)2; return x * y")); + assertEquals(4F, exec("def x = (short)2; def y = (float)2; return x * y")); + assertEquals(4F, exec("def x = (char)2; def y = (float)2; return x * y")); + assertEquals(4F, exec("def x = (int)2; def y = (float)2; return x * y")); + assertEquals(4F, exec("def x = (long)2; def y = (float)2; return x * y")); + assertEquals(4F, exec("def x = (float)2; def y = (float)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (float)2; return x * y")); - assertEquals(4D, exec("def x = (byte)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (short)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (char)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (int)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (long)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (float)2 def y = (double)2 return x * y")); - assertEquals(4D, exec("def x = (double)2 def y = (double)2 return x * y")); + assertEquals(4D, exec("def x = (byte)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (short)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (char)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (int)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (long)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (float)2; def y = (double)2; return x * y")); + assertEquals(4D, exec("def x = (double)2; def y = (double)2; return x * y")); - assertEquals(4, exec("def x = (Byte)2 def y = (byte)2 return x * y")); - assertEquals(4, exec("def x = (Short)2 def y = (short)2 return x * y")); - assertEquals(4, exec("def x = (Character)2 def y = (char)2 return x * y")); - assertEquals(4, exec("def x = (Integer)2 def y = (int)2 return x * y")); - assertEquals(4L, exec("def x = (Long)2 def y = (long)2 return x * y")); - assertEquals(4F, exec("def x = (Float)2 def y = (float)2 return x * y")); - assertEquals(4D, exec("def x = (Double)2 def y = (double)2 return x * y")); + assertEquals(4, exec("def x = (Byte)2; def y = (byte)2; return x * y")); + assertEquals(4, exec("def x = (Short)2; def y = (short)2; return x * y")); + assertEquals(4, exec("def x = (Character)2; def y = (char)2; return x * y")); + assertEquals(4, exec("def x = (Integer)2; def y = (int)2; return x * y")); + assertEquals(4L, exec("def x = (Long)2; def y = (long)2; return x * y")); + assertEquals(4F, exec("def x = (Float)2; def y = (float)2; return x * y")); + assertEquals(4D, exec("def x = (Double)2; def y = (double)2; return x * y")); } public void testDiv() { - assertEquals(1, exec("def x = (byte)2 def y = (byte)2 return x / y")); - assertEquals(1, exec("def x = (short)2 def y = (byte)2 return x / y")); - assertEquals(1, exec("def x = (char)2 def y = (byte)2 return x / y")); - assertEquals(1, exec("def x = (int)2 def y = (byte)2 return x / y")); - assertEquals(1L, exec("def x = (long)2 def y = (byte)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (byte)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (byte)2 return x / y")); + assertEquals(1, exec("def x = (byte)2; def y = (byte)2; return x / y")); + assertEquals(1, exec("def x = (short)2; def y = (byte)2; return x / y")); + assertEquals(1, exec("def x = (char)2; def y = (byte)2; return x / y")); + assertEquals(1, exec("def x = (int)2; def y = (byte)2; return x / y")); + assertEquals(1L, exec("def x = (long)2; def y = (byte)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (byte)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (byte)2; return x / y")); - assertEquals(1, exec("def x = (byte)2 def y = (short)2 return x / y")); - assertEquals(1, exec("def x = (short)2 def y = (short)2 return x / y")); - assertEquals(1, exec("def x = (char)2 def y = (short)2 return x / y")); - assertEquals(1, exec("def x = (int)2 def y = (short)2 return x / y")); - assertEquals(1L, exec("def x = (long)2 def y = (short)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (short)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (short)2 return x / y")); + assertEquals(1, exec("def x = (byte)2; def y = (short)2; return x / y")); + assertEquals(1, exec("def x = (short)2; def y = (short)2; return x / y")); + assertEquals(1, exec("def x = (char)2; def y = (short)2; return x / y")); + assertEquals(1, exec("def x = (int)2; def y = (short)2; return x / y")); + assertEquals(1L, exec("def x = (long)2; def y = (short)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (short)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (short)2; return x / y")); - assertEquals(1, exec("def x = (byte)2 def y = (char)2 return x / y")); - assertEquals(1, exec("def x = (short)2 def y = (char)2 return x / y")); - assertEquals(1, exec("def x = (char)2 def y = (char)2 return x / y")); - assertEquals(1, exec("def x = (int)2 def y = (char)2 return x / y")); - assertEquals(1L, exec("def x = (long)2 def y = (char)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (char)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (char)2 return x / y")); + assertEquals(1, exec("def x = (byte)2; def y = (char)2; return x / y")); + assertEquals(1, exec("def x = (short)2; def y = (char)2; return x / y")); + assertEquals(1, exec("def x = (char)2; def y = (char)2; return x / y")); + assertEquals(1, exec("def x = (int)2; def y = (char)2; return x / y")); + assertEquals(1L, exec("def x = (long)2; def y = (char)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (char)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (char)2; return x / y")); - assertEquals(1, exec("def x = (byte)2 def y = (int)2 return x / y")); - assertEquals(1, exec("def x = (short)2 def y = (int)2 return x / y")); - assertEquals(1, exec("def x = (char)2 def y = (int)2 return x / y")); - assertEquals(1, exec("def x = (int)2 def y = (int)2 return x / y")); - assertEquals(1L, exec("def x = (long)2 def y = (int)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (int)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (int)2 return x / y")); + assertEquals(1, exec("def x = (byte)2; def y = (int)2; return x / y")); + assertEquals(1, exec("def x = (short)2; def y = (int)2; return x / y")); + assertEquals(1, exec("def x = (char)2; def y = (int)2; return x / y")); + assertEquals(1, exec("def x = (int)2; def y = (int)2; return x / y")); + assertEquals(1L, exec("def x = (long)2; def y = (int)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (int)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (int)2; return x / y")); - assertEquals(1L, exec("def x = (byte)2 def y = (long)2 return x / y")); - assertEquals(1L, exec("def x = (short)2 def y = (long)2 return x / y")); - assertEquals(1L, exec("def x = (char)2 def y = (long)2 return x / y")); - assertEquals(1L, exec("def x = (int)2 def y = (long)2 return x / y")); - assertEquals(1L, exec("def x = (long)2 def y = (long)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (long)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (long)2 return x / y")); + assertEquals(1L, exec("def x = (byte)2; def y = (long)2; return x / y")); + assertEquals(1L, exec("def x = (short)2; def y = (long)2; return x / y")); + assertEquals(1L, exec("def x = (char)2; def y = (long)2; return x / y")); + assertEquals(1L, exec("def x = (int)2; def y = (long)2; return x / y")); + assertEquals(1L, exec("def x = (long)2; def y = (long)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (long)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (long)2; return x / y")); - assertEquals(1F, exec("def x = (byte)2 def y = (float)2 return x / y")); - assertEquals(1F, exec("def x = (short)2 def y = (float)2 return x / y")); - assertEquals(1F, exec("def x = (char)2 def y = (float)2 return x / y")); - assertEquals(1F, exec("def x = (int)2 def y = (float)2 return x / y")); - assertEquals(1F, exec("def x = (long)2 def y = (float)2 return x / y")); - assertEquals(1F, exec("def x = (float)2 def y = (float)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (float)2 return x / y")); + assertEquals(1F, exec("def x = (byte)2; def y = (float)2; return x / y")); + assertEquals(1F, exec("def x = (short)2; def y = (float)2; return x / y")); + assertEquals(1F, exec("def x = (char)2; def y = (float)2; return x / y")); + assertEquals(1F, exec("def x = (int)2; def y = (float)2; return x / y")); + assertEquals(1F, exec("def x = (long)2; def y = (float)2; return x / y")); + assertEquals(1F, exec("def x = (float)2; def y = (float)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (float)2; return x / y")); - assertEquals(1D, exec("def x = (byte)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (short)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (char)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (int)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (long)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (float)2 def y = (double)2 return x / y")); - assertEquals(1D, exec("def x = (double)2 def y = (double)2 return x / y")); + assertEquals(1D, exec("def x = (byte)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (short)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (char)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (int)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (long)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (float)2; def y = (double)2; return x / y")); + assertEquals(1D, exec("def x = (double)2; def y = (double)2; return x / y")); - assertEquals(1, exec("def x = (Byte)2 def y = (byte)2 return x / y")); - assertEquals(1, exec("def x = (Short)2 def y = (short)2 return x / y")); - assertEquals(1, exec("def x = (Character)2 def y = (char)2 return x / y")); - assertEquals(1, exec("def x = (Integer)2 def y = (int)2 return x / y")); - assertEquals(1L, exec("def x = (Long)2 def y = (long)2 return x / y")); - assertEquals(1F, exec("def x = (Float)2 def y = (float)2 return x / y")); - assertEquals(1D, exec("def x = (Double)2 def y = (double)2 return x / y")); + assertEquals(1, exec("def x = (Byte)2; def y = (byte)2; return x / y")); + assertEquals(1, exec("def x = (Short)2; def y = (short)2; return x / y")); + assertEquals(1, exec("def x = (Character)2; def y = (char)2; return x / y")); + assertEquals(1, exec("def x = (Integer)2; def y = (int)2; return x / y")); + assertEquals(1L, exec("def x = (Long)2; def y = (long)2; return x / y")); + assertEquals(1F, exec("def x = (Float)2; def y = (float)2; return x / y")); + assertEquals(1D, exec("def x = (Double)2; def y = (double)2; return x / y")); } public void testRem() { - assertEquals(0, exec("def x = (byte)2 def y = (byte)2 return x % y")); - assertEquals(0, exec("def x = (short)2 def y = (byte)2 return x % y")); - assertEquals(0, exec("def x = (char)2 def y = (byte)2 return x % y")); - assertEquals(0, exec("def x = (int)2 def y = (byte)2 return x % y")); - assertEquals(0L, exec("def x = (long)2 def y = (byte)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (byte)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (byte)2 return x % y")); + assertEquals(0, exec("def x = (byte)2; def y = (byte)2; return x % y")); + assertEquals(0, exec("def x = (short)2; def y = (byte)2; return x % y")); + assertEquals(0, exec("def x = (char)2; def y = (byte)2; return x % y")); + assertEquals(0, exec("def x = (int)2; def y = (byte)2; return x % y")); + assertEquals(0L, exec("def x = (long)2; def y = (byte)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (byte)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (byte)2; return x % y")); - assertEquals(0, exec("def x = (byte)2 def y = (short)2 return x % y")); - assertEquals(0, exec("def x = (short)2 def y = (short)2 return x % y")); - assertEquals(0, exec("def x = (char)2 def y = (short)2 return x % y")); - assertEquals(0, exec("def x = (int)2 def y = (short)2 return x % y")); - assertEquals(0L, exec("def x = (long)2 def y = (short)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (short)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (short)2 return x % y")); + assertEquals(0, exec("def x = (byte)2; def y = (short)2; return x % y")); + assertEquals(0, exec("def x = (short)2; def y = (short)2; return x % y")); + assertEquals(0, exec("def x = (char)2; def y = (short)2; return x % y")); + assertEquals(0, exec("def x = (int)2; def y = (short)2; return x % y")); + assertEquals(0L, exec("def x = (long)2; def y = (short)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (short)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (short)2; return x % y")); - assertEquals(0, exec("def x = (byte)2 def y = (char)2 return x % y")); - assertEquals(0, exec("def x = (short)2 def y = (char)2 return x % y")); - assertEquals(0, exec("def x = (char)2 def y = (char)2 return x % y")); - assertEquals(0, exec("def x = (int)2 def y = (char)2 return x % y")); - assertEquals(0L, exec("def x = (long)2 def y = (char)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (char)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (char)2 return x % y")); + assertEquals(0, exec("def x = (byte)2; def y = (char)2; return x % y")); + assertEquals(0, exec("def x = (short)2; def y = (char)2; return x % y")); + assertEquals(0, exec("def x = (char)2; def y = (char)2; return x % y")); + assertEquals(0, exec("def x = (int)2; def y = (char)2; return x % y")); + assertEquals(0L, exec("def x = (long)2; def y = (char)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (char)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (char)2; return x % y")); - assertEquals(0, exec("def x = (byte)2 def y = (int)2 return x % y")); - assertEquals(0, exec("def x = (short)2 def y = (int)2 return x % y")); - assertEquals(0, exec("def x = (char)2 def y = (int)2 return x % y")); - assertEquals(0, exec("def x = (int)2 def y = (int)2 return x % y")); - assertEquals(0L, exec("def x = (long)2 def y = (int)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (int)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (int)2 return x % y")); + assertEquals(0, exec("def x = (byte)2; def y = (int)2; return x % y")); + assertEquals(0, exec("def x = (short)2; def y = (int)2; return x % y")); + assertEquals(0, exec("def x = (char)2; def y = (int)2; return x % y")); + assertEquals(0, exec("def x = (int)2; def y = (int)2; return x % y")); + assertEquals(0L, exec("def x = (long)2; def y = (int)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (int)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (int)2; return x % y")); - assertEquals(0L, exec("def x = (byte)2 def y = (long)2 return x % y")); - assertEquals(0L, exec("def x = (short)2 def y = (long)2 return x % y")); - assertEquals(0L, exec("def x = (char)2 def y = (long)2 return x % y")); - assertEquals(0L, exec("def x = (int)2 def y = (long)2 return x % y")); - assertEquals(0L, exec("def x = (long)2 def y = (long)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (long)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (long)2 return x % y")); + assertEquals(0L, exec("def x = (byte)2; def y = (long)2; return x % y")); + assertEquals(0L, exec("def x = (short)2; def y = (long)2; return x % y")); + assertEquals(0L, exec("def x = (char)2; def y = (long)2; return x % y")); + assertEquals(0L, exec("def x = (int)2; def y = (long)2; return x % y")); + assertEquals(0L, exec("def x = (long)2; def y = (long)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (long)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (long)2; return x % y")); - assertEquals(0F, exec("def x = (byte)2 def y = (float)2 return x % y")); - assertEquals(0F, exec("def x = (short)2 def y = (float)2 return x % y")); - assertEquals(0F, exec("def x = (char)2 def y = (float)2 return x % y")); - assertEquals(0F, exec("def x = (int)2 def y = (float)2 return x % y")); - assertEquals(0F, exec("def x = (long)2 def y = (float)2 return x % y")); - assertEquals(0F, exec("def x = (float)2 def y = (float)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (float)2 return x % y")); + assertEquals(0F, exec("def x = (byte)2; def y = (float)2; return x % y")); + assertEquals(0F, exec("def x = (short)2; def y = (float)2; return x % y")); + assertEquals(0F, exec("def x = (char)2; def y = (float)2; return x % y")); + assertEquals(0F, exec("def x = (int)2; def y = (float)2; return x % y")); + assertEquals(0F, exec("def x = (long)2; def y = (float)2; return x % y")); + assertEquals(0F, exec("def x = (float)2; def y = (float)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (float)2; return x % y")); - assertEquals(0D, exec("def x = (byte)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (short)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (char)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (int)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (long)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (float)2 def y = (double)2 return x % y")); - assertEquals(0D, exec("def x = (double)2 def y = (double)2 return x % y")); + assertEquals(0D, exec("def x = (byte)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (short)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (char)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (int)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (long)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (float)2; def y = (double)2; return x % y")); + assertEquals(0D, exec("def x = (double)2; def y = (double)2; return x % y")); - assertEquals(0, exec("def x = (Byte)2 def y = (byte)2 return x % y")); - assertEquals(0, exec("def x = (Short)2 def y = (short)2 return x % y")); - assertEquals(0, exec("def x = (Character)2 def y = (char)2 return x % y")); - assertEquals(0, exec("def x = (Integer)2 def y = (int)2 return x % y")); - assertEquals(0L, exec("def x = (Long)2 def y = (long)2 return x % y")); - assertEquals(0F, exec("def x = (Float)2 def y = (float)2 return x % y")); - assertEquals(0D, exec("def x = (Double)2 def y = (double)2 return x % y")); + assertEquals(0, exec("def x = (Byte)2; def y = (byte)2; return x % y")); + assertEquals(0, exec("def x = (Short)2; def y = (short)2; return x % y")); + assertEquals(0, exec("def x = (Character)2; def y = (char)2; return x % y")); + assertEquals(0, exec("def x = (Integer)2; def y = (int)2; return x % y")); + assertEquals(0L, exec("def x = (Long)2; def y = (long)2; return x % y")); + assertEquals(0F, exec("def x = (Float)2; def y = (float)2; return x % y")); + assertEquals(0D, exec("def x = (Double)2; def y = (double)2; return x % y")); } public void testAdd() { - assertEquals(2, exec("def x = (byte)1 def y = (byte)1 return x + y")); - assertEquals(2, exec("def x = (short)1 def y = (byte)1 return x + y")); - assertEquals(2, exec("def x = (char)1 def y = (byte)1 return x + y")); - assertEquals(2, exec("def x = (int)1 def y = (byte)1 return x + y")); - assertEquals(2L, exec("def x = (long)1 def y = (byte)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (byte)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (byte)1 return x + y")); + assertEquals(2, exec("def x = (byte)1; def y = (byte)1; return x + y")); + assertEquals(2, exec("def x = (short)1; def y = (byte)1; return x + y")); + assertEquals(2, exec("def x = (char)1; def y = (byte)1; return x + y")); + assertEquals(2, exec("def x = (int)1; def y = (byte)1; return x + y")); + assertEquals(2L, exec("def x = (long)1; def y = (byte)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (byte)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (byte)1; return x + y")); - assertEquals(2, exec("def x = (byte)1 def y = (short)1 return x + y")); - assertEquals(2, exec("def x = (short)1 def y = (short)1 return x + y")); - assertEquals(2, exec("def x = (char)1 def y = (short)1 return x + y")); - assertEquals(2, exec("def x = (int)1 def y = (short)1 return x + y")); - assertEquals(2L, exec("def x = (long)1 def y = (short)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (short)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (short)1 return x + y")); + assertEquals(2, exec("def x = (byte)1; def y = (short)1; return x + y")); + assertEquals(2, exec("def x = (short)1; def y = (short)1; return x + y")); + assertEquals(2, exec("def x = (char)1; def y = (short)1; return x + y")); + assertEquals(2, exec("def x = (int)1; def y = (short)1; return x + y")); + assertEquals(2L, exec("def x = (long)1; def y = (short)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (short)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (short)1; return x + y")); - assertEquals(2, exec("def x = (byte)1 def y = (char)1 return x + y")); - assertEquals(2, exec("def x = (short)1 def y = (char)1 return x + y")); - assertEquals(2, exec("def x = (char)1 def y = (char)1 return x + y")); - assertEquals(2, exec("def x = (int)1 def y = (char)1 return x + y")); - assertEquals(2L, exec("def x = (long)1 def y = (char)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (char)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (char)1 return x + y")); + assertEquals(2, exec("def x = (byte)1; def y = (char)1; return x + y")); + assertEquals(2, exec("def x = (short)1; def y = (char)1; return x + y")); + assertEquals(2, exec("def x = (char)1; def y = (char)1; return x + y")); + assertEquals(2, exec("def x = (int)1; def y = (char)1; return x + y")); + assertEquals(2L, exec("def x = (long)1; def y = (char)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (char)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (char)1; return x + y")); - assertEquals(2, exec("def x = (byte)1 def y = (int)1 return x + y")); - assertEquals(2, exec("def x = (short)1 def y = (int)1 return x + y")); - assertEquals(2, exec("def x = (char)1 def y = (int)1 return x + y")); - assertEquals(2, exec("def x = (int)1 def y = (int)1 return x + y")); - assertEquals(2L, exec("def x = (long)1 def y = (int)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (int)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (int)1 return x + y")); + assertEquals(2, exec("def x = (byte)1; def y = (int)1; return x + y")); + assertEquals(2, exec("def x = (short)1; def y = (int)1; return x + y")); + assertEquals(2, exec("def x = (char)1; def y = (int)1; return x + y")); + assertEquals(2, exec("def x = (int)1; def y = (int)1; return x + y")); + assertEquals(2L, exec("def x = (long)1; def y = (int)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (int)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (int)1; return x + y")); - assertEquals(2L, exec("def x = (byte)1 def y = (long)1 return x + y")); - assertEquals(2L, exec("def x = (short)1 def y = (long)1 return x + y")); - assertEquals(2L, exec("def x = (char)1 def y = (long)1 return x + y")); - assertEquals(2L, exec("def x = (int)1 def y = (long)1 return x + y")); - assertEquals(2L, exec("def x = (long)1 def y = (long)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (long)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (long)1 return x + y")); + assertEquals(2L, exec("def x = (byte)1; def y = (long)1; return x + y")); + assertEquals(2L, exec("def x = (short)1; def y = (long)1; return x + y")); + assertEquals(2L, exec("def x = (char)1; def y = (long)1; return x + y")); + assertEquals(2L, exec("def x = (int)1; def y = (long)1; return x + y")); + assertEquals(2L, exec("def x = (long)1; def y = (long)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (long)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (long)1; return x + y")); - assertEquals(2F, exec("def x = (byte)1 def y = (float)1 return x + y")); - assertEquals(2F, exec("def x = (short)1 def y = (float)1 return x + y")); - assertEquals(2F, exec("def x = (char)1 def y = (float)1 return x + y")); - assertEquals(2F, exec("def x = (int)1 def y = (float)1 return x + y")); - assertEquals(2F, exec("def x = (long)1 def y = (float)1 return x + y")); - assertEquals(2F, exec("def x = (float)1 def y = (float)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (float)1 return x + y")); + assertEquals(2F, exec("def x = (byte)1; def y = (float)1; return x + y")); + assertEquals(2F, exec("def x = (short)1; def y = (float)1; return x + y")); + assertEquals(2F, exec("def x = (char)1; def y = (float)1; return x + y")); + assertEquals(2F, exec("def x = (int)1; def y = (float)1; return x + y")); + assertEquals(2F, exec("def x = (long)1; def y = (float)1; return x + y")); + assertEquals(2F, exec("def x = (float)1; def y = (float)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (float)1; return x + y")); - assertEquals(2D, exec("def x = (byte)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (short)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (char)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (int)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (long)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (float)1 def y = (double)1 return x + y")); - assertEquals(2D, exec("def x = (double)1 def y = (double)1 return x + y")); + assertEquals(2D, exec("def x = (byte)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (short)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (char)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (int)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (long)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (float)1; def y = (double)1; return x + y")); + assertEquals(2D, exec("def x = (double)1; def y = (double)1; return x + y")); - assertEquals(2, exec("def x = (Byte)1 def y = (byte)1 return x + y")); - assertEquals(2, exec("def x = (Short)1 def y = (short)1 return x + y")); - assertEquals(2, exec("def x = (Character)1 def y = (char)1 return x + y")); - assertEquals(2, exec("def x = (Integer)1 def y = (int)1 return x + y")); - assertEquals(2L, exec("def x = (Long)1 def y = (long)1 return x + y")); - assertEquals(2F, exec("def x = (Float)1 def y = (float)1 return x + y")); - assertEquals(2D, exec("def x = (Double)1 def y = (double)1 return x + y")); + assertEquals(2, exec("def x = (Byte)1; def y = (byte)1; return x + y")); + assertEquals(2, exec("def x = (Short)1; def y = (short)1; return x + y")); + assertEquals(2, exec("def x = (Character)1; def y = (char)1; return x + y")); + assertEquals(2, exec("def x = (Integer)1; def y = (int)1; return x + y")); + assertEquals(2L, exec("def x = (Long)1; def y = (long)1; return x + y")); + assertEquals(2F, exec("def x = (Float)1; def y = (float)1; return x + y")); + assertEquals(2D, exec("def x = (Double)1; def y = (double)1; return x + y")); } public void testSub() { - assertEquals(0, exec("def x = (byte)1 def y = (byte)1 return x - y")); - assertEquals(0, exec("def x = (short)1 def y = (byte)1 return x - y")); - assertEquals(0, exec("def x = (char)1 def y = (byte)1 return x - y")); - assertEquals(0, exec("def x = (int)1 def y = (byte)1 return x - y")); - assertEquals(0L, exec("def x = (long)1 def y = (byte)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (byte)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (byte)1 return x - y")); + assertEquals(0, exec("def x = (byte)1; def y = (byte)1; return x - y")); + assertEquals(0, exec("def x = (short)1; def y = (byte)1; return x - y")); + assertEquals(0, exec("def x = (char)1; def y = (byte)1; return x - y")); + assertEquals(0, exec("def x = (int)1; def y = (byte)1; return x - y")); + assertEquals(0L, exec("def x = (long)1; def y = (byte)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (byte)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (byte)1; return x - y")); - assertEquals(0, exec("def x = (byte)1 def y = (short)1 return x - y")); - assertEquals(0, exec("def x = (short)1 def y = (short)1 return x - y")); - assertEquals(0, exec("def x = (char)1 def y = (short)1 return x - y")); - assertEquals(0, exec("def x = (int)1 def y = (short)1 return x - y")); - assertEquals(0L, exec("def x = (long)1 def y = (short)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (short)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (short)1 return x - y")); + assertEquals(0, exec("def x = (byte)1; def y = (short)1; return x - y")); + assertEquals(0, exec("def x = (short)1; def y = (short)1; return x - y")); + assertEquals(0, exec("def x = (char)1; def y = (short)1; return x - y")); + assertEquals(0, exec("def x = (int)1; def y = (short)1; return x - y")); + assertEquals(0L, exec("def x = (long)1; def y = (short)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (short)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (short)1; return x - y")); - assertEquals(0, exec("def x = (byte)1 def y = (char)1 return x - y")); - assertEquals(0, exec("def x = (short)1 def y = (char)1 return x - y")); - assertEquals(0, exec("def x = (char)1 def y = (char)1 return x - y")); - assertEquals(0, exec("def x = (int)1 def y = (char)1 return x - y")); - assertEquals(0L, exec("def x = (long)1 def y = (char)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (char)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (char)1 return x - y")); + assertEquals(0, exec("def x = (byte)1; def y = (char)1; return x - y")); + assertEquals(0, exec("def x = (short)1; def y = (char)1; return x - y")); + assertEquals(0, exec("def x = (char)1; def y = (char)1; return x - y")); + assertEquals(0, exec("def x = (int)1; def y = (char)1; return x - y")); + assertEquals(0L, exec("def x = (long)1; def y = (char)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (char)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (char)1; return x - y")); - assertEquals(0, exec("def x = (byte)1 def y = (int)1 return x - y")); - assertEquals(0, exec("def x = (short)1 def y = (int)1 return x - y")); - assertEquals(0, exec("def x = (char)1 def y = (int)1 return x - y")); - assertEquals(0, exec("def x = (int)1 def y = (int)1 return x - y")); - assertEquals(0L, exec("def x = (long)1 def y = (int)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (int)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (int)1 return x - y")); + assertEquals(0, exec("def x = (byte)1; def y = (int)1; return x - y")); + assertEquals(0, exec("def x = (short)1; def y = (int)1; return x - y")); + assertEquals(0, exec("def x = (char)1; def y = (int)1; return x - y")); + assertEquals(0, exec("def x = (int)1; def y = (int)1; return x - y")); + assertEquals(0L, exec("def x = (long)1; def y = (int)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (int)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (int)1; return x - y")); - assertEquals(0L, exec("def x = (byte)1 def y = (long)1 return x - y")); - assertEquals(0L, exec("def x = (short)1 def y = (long)1 return x - y")); - assertEquals(0L, exec("def x = (char)1 def y = (long)1 return x - y")); - assertEquals(0L, exec("def x = (int)1 def y = (long)1 return x - y")); - assertEquals(0L, exec("def x = (long)1 def y = (long)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (long)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (long)1 return x - y")); + assertEquals(0L, exec("def x = (byte)1; def y = (long)1; return x - y")); + assertEquals(0L, exec("def x = (short)1; def y = (long)1; return x - y")); + assertEquals(0L, exec("def x = (char)1; def y = (long)1; return x - y")); + assertEquals(0L, exec("def x = (int)1; def y = (long)1; return x - y")); + assertEquals(0L, exec("def x = (long)1; def y = (long)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (long)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (long)1; return x - y")); - assertEquals(0F, exec("def x = (byte)1 def y = (float)1 return x - y")); - assertEquals(0F, exec("def x = (short)1 def y = (float)1 return x - y")); - assertEquals(0F, exec("def x = (char)1 def y = (float)1 return x - y")); - assertEquals(0F, exec("def x = (int)1 def y = (float)1 return x - y")); - assertEquals(0F, exec("def x = (long)1 def y = (float)1 return x - y")); - assertEquals(0F, exec("def x = (float)1 def y = (float)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (float)1 return x - y")); + assertEquals(0F, exec("def x = (byte)1; def y = (float)1; return x - y")); + assertEquals(0F, exec("def x = (short)1; def y = (float)1; return x - y")); + assertEquals(0F, exec("def x = (char)1; def y = (float)1; return x - y")); + assertEquals(0F, exec("def x = (int)1; def y = (float)1; return x - y")); + assertEquals(0F, exec("def x = (long)1; def y = (float)1; return x - y")); + assertEquals(0F, exec("def x = (float)1; def y = (float)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (float)1; return x - y")); - assertEquals(0D, exec("def x = (byte)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (short)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (char)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (int)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (long)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (float)1 def y = (double)1 return x - y")); - assertEquals(0D, exec("def x = (double)1 def y = (double)1 return x - y")); + assertEquals(0D, exec("def x = (byte)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (short)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (char)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (int)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (long)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (float)1; def y = (double)1; return x - y")); + assertEquals(0D, exec("def x = (double)1; def y = (double)1; return x - y")); - assertEquals(0, exec("def x = (Byte)1 def y = (byte)1 return x - y")); - assertEquals(0, exec("def x = (Short)1 def y = (short)1 return x - y")); - assertEquals(0, exec("def x = (Character)1 def y = (char)1 return x - y")); - assertEquals(0, exec("def x = (Integer)1 def y = (int)1 return x - y")); - assertEquals(0L, exec("def x = (Long)1 def y = (long)1 return x - y")); - assertEquals(0F, exec("def x = (Float)1 def y = (float)1 return x - y")); - assertEquals(0D, exec("def x = (Double)1 def y = (double)1 return x - y")); + assertEquals(0, exec("def x = (Byte)1; def y = (byte)1; return x - y")); + assertEquals(0, exec("def x = (Short)1; def y = (short)1; return x - y")); + assertEquals(0, exec("def x = (Character)1; def y = (char)1; return x - y")); + assertEquals(0, exec("def x = (Integer)1; def y = (int)1; return x - y")); + assertEquals(0L, exec("def x = (Long)1; def y = (long)1; return x - y")); + assertEquals(0F, exec("def x = (Float)1; def y = (float)1; return x - y")); + assertEquals(0D, exec("def x = (Double)1; def y = (double)1; return x - y")); } public void testLsh() { - assertEquals(2, exec("def x = (byte)1 def y = (byte)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (byte)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (byte)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (byte)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (byte)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (byte)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (byte)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (byte)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (byte)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (byte)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (byte)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (byte)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (byte)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (byte)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (short)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (short)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (short)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (short)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (short)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (short)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (short)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (short)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (short)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (short)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (short)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (short)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (short)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (short)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (char)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (char)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (char)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (char)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (char)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (char)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (char)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (char)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (char)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (char)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (char)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (char)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (char)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (char)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (int)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (int)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (int)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (int)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (int)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (int)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (int)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (int)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (int)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (int)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (int)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (int)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (int)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (int)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (long)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (long)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (long)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (long)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (long)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (long)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (long)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (long)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (long)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (long)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (long)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (long)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (long)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (long)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (float)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (float)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (float)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (float)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (float)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (float)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (float)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (float)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (float)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (float)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (float)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (float)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (float)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (float)1; return x << y")); - assertEquals(2, exec("def x = (byte)1 def y = (double)1 return x << y")); - assertEquals(2, exec("def x = (short)1 def y = (double)1 return x << y")); - assertEquals(2, exec("def x = (char)1 def y = (double)1 return x << y")); - assertEquals(2, exec("def x = (int)1 def y = (double)1 return x << y")); - assertEquals(2L, exec("def x = (long)1 def y = (double)1 return x << y")); - assertEquals(2L, exec("def x = (float)1 def y = (double)1 return x << y")); - assertEquals(2L, exec("def x = (double)1 def y = (double)1 return x << y")); + assertEquals(2, exec("def x = (byte)1; def y = (double)1; return x << y")); + assertEquals(2, exec("def x = (short)1; def y = (double)1; return x << y")); + assertEquals(2, exec("def x = (char)1; def y = (double)1; return x << y")); + assertEquals(2, exec("def x = (int)1; def y = (double)1; return x << y")); + assertEquals(2L, exec("def x = (long)1; def y = (double)1; return x << y")); + assertEquals(2L, exec("def x = (float)1; def y = (double)1; return x << y")); + assertEquals(2L, exec("def x = (double)1; def y = (double)1; return x << y")); - assertEquals(2, exec("def x = (Byte)1 def y = (byte)1 return x << y")); - assertEquals(2, exec("def x = (Short)1 def y = (short)1 return x << y")); - assertEquals(2, exec("def x = (Character)1 def y = (char)1 return x << y")); - assertEquals(2, exec("def x = (Integer)1 def y = (int)1 return x << y")); - assertEquals(2L, exec("def x = (Long)1 def y = (long)1 return x << y")); - assertEquals(2L, exec("def x = (Float)1 def y = (float)1 return x << y")); - assertEquals(2L, exec("def x = (Double)1 def y = (double)1 return x << y")); + assertEquals(2, exec("def x = (Byte)1; def y = (byte)1; return x << y")); + assertEquals(2, exec("def x = (Short)1; def y = (short)1; return x << y")); + assertEquals(2, exec("def x = (Character)1; def y = (char)1; return x << y")); + assertEquals(2, exec("def x = (Integer)1; def y = (int)1; return x << y")); + assertEquals(2L, exec("def x = (Long)1; def y = (long)1; return x << y")); + assertEquals(2L, exec("def x = (Float)1; def y = (float)1; return x << y")); + assertEquals(2L, exec("def x = (Double)1; def y = (double)1; return x << y")); } public void testRsh() { - assertEquals(2, exec("def x = (byte)4 def y = (byte)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (byte)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (byte)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (byte)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (byte)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (byte)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (byte)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (byte)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (byte)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (byte)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (byte)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (byte)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (byte)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (byte)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (short)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (short)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (short)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (short)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (short)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (short)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (short)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (short)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (short)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (short)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (short)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (short)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (short)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (short)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (char)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (char)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (char)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (char)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (char)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (char)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (char)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (char)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (char)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (char)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (char)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (char)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (char)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (char)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (int)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (int)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (int)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (int)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (int)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (int)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (int)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (int)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (int)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (int)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (int)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (int)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (int)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (int)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (long)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (long)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (long)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (long)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (long)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (long)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (long)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (long)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (long)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (long)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (long)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (long)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (long)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (long)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (float)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (float)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (float)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (float)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (float)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (float)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (float)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (float)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (float)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (float)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (float)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (float)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (float)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (float)1; return x >> y")); - assertEquals(2, exec("def x = (byte)4 def y = (double)1 return x >> y")); - assertEquals(2, exec("def x = (short)4 def y = (double)1 return x >> y")); - assertEquals(2, exec("def x = (char)4 def y = (double)1 return x >> y")); - assertEquals(2, exec("def x = (int)4 def y = (double)1 return x >> y")); - assertEquals(2L, exec("def x = (long)4 def y = (double)1 return x >> y")); - assertEquals(2L, exec("def x = (float)4 def y = (double)1 return x >> y")); - assertEquals(2L, exec("def x = (double)4 def y = (double)1 return x >> y")); + assertEquals(2, exec("def x = (byte)4; def y = (double)1; return x >> y")); + assertEquals(2, exec("def x = (short)4; def y = (double)1; return x >> y")); + assertEquals(2, exec("def x = (char)4; def y = (double)1; return x >> y")); + assertEquals(2, exec("def x = (int)4; def y = (double)1; return x >> y")); + assertEquals(2L, exec("def x = (long)4; def y = (double)1; return x >> y")); + assertEquals(2L, exec("def x = (float)4; def y = (double)1; return x >> y")); + assertEquals(2L, exec("def x = (double)4; def y = (double)1; return x >> y")); - assertEquals(2, exec("def x = (Byte)4 def y = (byte)1 return x >> y")); - assertEquals(2, exec("def x = (Short)4 def y = (short)1 return x >> y")); - assertEquals(2, exec("def x = (Character)4 def y = (char)1 return x >> y")); - assertEquals(2, exec("def x = (Integer)4 def y = (int)1 return x >> y")); - assertEquals(2L, exec("def x = (Long)4 def y = (long)1 return x >> y")); - assertEquals(2L, exec("def x = (Float)4 def y = (float)1 return x >> y")); - assertEquals(2L, exec("def x = (Double)4 def y = (double)1 return x >> y")); + assertEquals(2, exec("def x = (Byte)4; def y = (byte)1; return x >> y")); + assertEquals(2, exec("def x = (Short)4; def y = (short)1; return x >> y")); + assertEquals(2, exec("def x = (Character)4; def y = (char)1; return x >> y")); + assertEquals(2, exec("def x = (Integer)4; def y = (int)1; return x >> y")); + assertEquals(2L, exec("def x = (Long)4; def y = (long)1; return x >> y")); + assertEquals(2L, exec("def x = (Float)4; def y = (float)1; return x >> y")); + assertEquals(2L, exec("def x = (Double)4; def y = (double)1; return x >> y")); } public void testUsh() { - assertEquals(2, exec("def x = (byte)4 def y = (byte)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (byte)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (byte)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (byte)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (byte)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (byte)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (byte)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (byte)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (byte)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (byte)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (byte)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (byte)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (byte)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (byte)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (short)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (short)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (short)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (short)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (short)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (short)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (short)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (short)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (short)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (short)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (short)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (short)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (short)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (short)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (char)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (char)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (char)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (char)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (char)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (char)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (char)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (char)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (char)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (char)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (char)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (char)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (char)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (char)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (int)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (int)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (int)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (int)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (int)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (int)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (int)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (int)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (int)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (int)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (int)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (int)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (int)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (int)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (long)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (long)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (long)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (long)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (long)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (long)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (long)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (long)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (long)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (long)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (long)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (long)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (long)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (long)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (float)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (float)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (float)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (float)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (float)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (float)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (float)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (float)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (float)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (float)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (float)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (float)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (float)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (float)1; return x >>> y")); - assertEquals(2, exec("def x = (byte)4 def y = (double)1 return x >>> y")); - assertEquals(2, exec("def x = (short)4 def y = (double)1 return x >>> y")); - assertEquals(2, exec("def x = (char)4 def y = (double)1 return x >>> y")); - assertEquals(2, exec("def x = (int)4 def y = (double)1 return x >>> y")); - assertEquals(2L, exec("def x = (long)4 def y = (double)1 return x >>> y")); - assertEquals(2L, exec("def x = (float)4 def y = (double)1 return x >>> y")); - assertEquals(2L, exec("def x = (double)4 def y = (double)1 return x >>> y")); + assertEquals(2, exec("def x = (byte)4; def y = (double)1; return x >>> y")); + assertEquals(2, exec("def x = (short)4; def y = (double)1; return x >>> y")); + assertEquals(2, exec("def x = (char)4; def y = (double)1; return x >>> y")); + assertEquals(2, exec("def x = (int)4; def y = (double)1; return x >>> y")); + assertEquals(2L, exec("def x = (long)4; def y = (double)1; return x >>> y")); + assertEquals(2L, exec("def x = (float)4; def y = (double)1; return x >>> y")); + assertEquals(2L, exec("def x = (double)4; def y = (double)1; return x >>> y")); - assertEquals(2, exec("def x = (Byte)4 def y = (byte)1 return x >>> y")); - assertEquals(2, exec("def x = (Short)4 def y = (short)1 return x >>> y")); - assertEquals(2, exec("def x = (Character)4 def y = (char)1 return x >>> y")); - assertEquals(2, exec("def x = (Integer)4 def y = (int)1 return x >>> y")); - assertEquals(2L, exec("def x = (Long)4 def y = (long)1 return x >>> y")); - assertEquals(2L, exec("def x = (Float)4 def y = (float)1 return x >>> y")); - assertEquals(2L, exec("def x = (Double)4 def y = (double)1 return x >>> y")); + assertEquals(2, exec("def x = (Byte)4; def y = (byte)1; return x >>> y")); + assertEquals(2, exec("def x = (Short)4; def y = (short)1; return x >>> y")); + assertEquals(2, exec("def x = (Character)4; def y = (char)1; return x >>> y")); + assertEquals(2, exec("def x = (Integer)4; def y = (int)1; return x >>> y")); + assertEquals(2L, exec("def x = (Long)4; def y = (long)1; return x >>> y")); + assertEquals(2L, exec("def x = (Float)4; def y = (float)1; return x >>> y")); + assertEquals(2L, exec("def x = (Double)4; def y = (double)1; return x >>> y")); } public void testAnd() { - assertEquals(0, exec("def x = (byte)4 def y = (byte)1 return x & y")); - assertEquals(0, exec("def x = (short)4 def y = (byte)1 return x & y")); - assertEquals(0, exec("def x = (char)4 def y = (byte)1 return x & y")); - assertEquals(0, exec("def x = (int)4 def y = (byte)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (byte)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (byte)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (byte)1 return x & y")); + assertEquals(0, exec("def x = (byte)4; def y = (byte)1; return x & y")); + assertEquals(0, exec("def x = (short)4; def y = (byte)1; return x & y")); + assertEquals(0, exec("def x = (char)4; def y = (byte)1; return x & y")); + assertEquals(0, exec("def x = (int)4; def y = (byte)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (byte)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (byte)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (byte)1; return x & y")); - assertEquals(0, exec("def x = (byte)4 def y = (short)1 return x & y")); - assertEquals(0, exec("def x = (short)4 def y = (short)1 return x & y")); - assertEquals(0, exec("def x = (char)4 def y = (short)1 return x & y")); - assertEquals(0, exec("def x = (int)4 def y = (short)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (short)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (short)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (short)1 return x & y")); + assertEquals(0, exec("def x = (byte)4; def y = (short)1; return x & y")); + assertEquals(0, exec("def x = (short)4; def y = (short)1; return x & y")); + assertEquals(0, exec("def x = (char)4; def y = (short)1; return x & y")); + assertEquals(0, exec("def x = (int)4; def y = (short)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (short)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (short)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (short)1; return x & y")); - assertEquals(0, exec("def x = (byte)4 def y = (char)1 return x & y")); - assertEquals(0, exec("def x = (short)4 def y = (char)1 return x & y")); - assertEquals(0, exec("def x = (char)4 def y = (char)1 return x & y")); - assertEquals(0, exec("def x = (int)4 def y = (char)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (char)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (char)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (char)1 return x & y")); + assertEquals(0, exec("def x = (byte)4; def y = (char)1; return x & y")); + assertEquals(0, exec("def x = (short)4; def y = (char)1; return x & y")); + assertEquals(0, exec("def x = (char)4; def y = (char)1; return x & y")); + assertEquals(0, exec("def x = (int)4; def y = (char)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (char)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (char)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (char)1; return x & y")); - assertEquals(0, exec("def x = (byte)4 def y = (int)1 return x & y")); - assertEquals(0, exec("def x = (short)4 def y = (int)1 return x & y")); - assertEquals(0, exec("def x = (char)4 def y = (int)1 return x & y")); - assertEquals(0, exec("def x = (int)4 def y = (int)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (int)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (int)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (int)1 return x & y")); + assertEquals(0, exec("def x = (byte)4; def y = (int)1; return x & y")); + assertEquals(0, exec("def x = (short)4; def y = (int)1; return x & y")); + assertEquals(0, exec("def x = (char)4; def y = (int)1; return x & y")); + assertEquals(0, exec("def x = (int)4; def y = (int)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (int)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (int)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (int)1; return x & y")); - assertEquals(0L, exec("def x = (byte)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (short)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (char)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (int)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (long)1 return x & y")); + assertEquals(0L, exec("def x = (byte)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (short)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (char)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (int)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (long)1; return x & y")); - assertEquals(0L, exec("def x = (byte)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (short)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (char)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (int)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (float)1 return x & y")); + assertEquals(0L, exec("def x = (byte)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (short)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (char)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (int)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (float)1; return x & y")); - assertEquals(0L, exec("def x = (byte)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (short)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (char)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (int)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (long)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (float)4 def y = (double)1 return x & y")); - assertEquals(0L, exec("def x = (double)4 def y = (double)1 return x & y")); + assertEquals(0L, exec("def x = (byte)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (short)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (char)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (int)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (long)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (float)4; def y = (double)1; return x & y")); + assertEquals(0L, exec("def x = (double)4; def y = (double)1; return x & y")); - assertEquals(0, exec("def x = (Byte)4 def y = (byte)1 return x & y")); - assertEquals(0, exec("def x = (Short)4 def y = (short)1 return x & y")); - assertEquals(0, exec("def x = (Character)4 def y = (char)1 return x & y")); - assertEquals(0, exec("def x = (Integer)4 def y = (int)1 return x & y")); - assertEquals(0L, exec("def x = (Long)4 def y = (long)1 return x & y")); - assertEquals(0L, exec("def x = (Float)4 def y = (float)1 return x & y")); - assertEquals(0L, exec("def x = (Double)4 def y = (double)1 return x & y")); + assertEquals(0, exec("def x = (Byte)4; def y = (byte)1; return x & y")); + assertEquals(0, exec("def x = (Short)4; def y = (short)1; return x & y")); + assertEquals(0, exec("def x = (Character)4; def y = (char)1; return x & y")); + assertEquals(0, exec("def x = (Integer)4; def y = (int)1; return x & y")); + assertEquals(0L, exec("def x = (Long)4; def y = (long)1; return x & y")); + assertEquals(0L, exec("def x = (Float)4; def y = (float)1; return x & y")); + assertEquals(0L, exec("def x = (Double)4; def y = (double)1; return x & y")); } public void testXor() { - assertEquals(5, exec("def x = (byte)4 def y = (byte)1 return x ^ y")); - assertEquals(5, exec("def x = (short)4 def y = (byte)1 return x ^ y")); - assertEquals(5, exec("def x = (char)4 def y = (byte)1 return x ^ y")); - assertEquals(5, exec("def x = (int)4 def y = (byte)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (byte)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (byte)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (byte)1 return x ^ y")); + assertEquals(5, exec("def x = (byte)4; def y = (byte)1; return x ^ y")); + assertEquals(5, exec("def x = (short)4; def y = (byte)1; return x ^ y")); + assertEquals(5, exec("def x = (char)4; def y = (byte)1; return x ^ y")); + assertEquals(5, exec("def x = (int)4; def y = (byte)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (byte)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (byte)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (byte)1; return x ^ y")); - assertEquals(5, exec("def x = (byte)4 def y = (short)1 return x ^ y")); - assertEquals(5, exec("def x = (short)4 def y = (short)1 return x ^ y")); - assertEquals(5, exec("def x = (char)4 def y = (short)1 return x ^ y")); - assertEquals(5, exec("def x = (int)4 def y = (short)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (short)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (short)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (short)1 return x ^ y")); + assertEquals(5, exec("def x = (byte)4; def y = (short)1; return x ^ y")); + assertEquals(5, exec("def x = (short)4; def y = (short)1; return x ^ y")); + assertEquals(5, exec("def x = (char)4; def y = (short)1; return x ^ y")); + assertEquals(5, exec("def x = (int)4; def y = (short)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (short)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (short)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (short)1; return x ^ y")); - assertEquals(5, exec("def x = (byte)4 def y = (char)1 return x ^ y")); - assertEquals(5, exec("def x = (short)4 def y = (char)1 return x ^ y")); - assertEquals(5, exec("def x = (char)4 def y = (char)1 return x ^ y")); - assertEquals(5, exec("def x = (int)4 def y = (char)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (char)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (char)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (char)1 return x ^ y")); + assertEquals(5, exec("def x = (byte)4; def y = (char)1; return x ^ y")); + assertEquals(5, exec("def x = (short)4; def y = (char)1; return x ^ y")); + assertEquals(5, exec("def x = (char)4; def y = (char)1; return x ^ y")); + assertEquals(5, exec("def x = (int)4; def y = (char)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (char)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (char)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (char)1; return x ^ y")); - assertEquals(5, exec("def x = (byte)4 def y = (int)1 return x ^ y")); - assertEquals(5, exec("def x = (short)4 def y = (int)1 return x ^ y")); - assertEquals(5, exec("def x = (char)4 def y = (int)1 return x ^ y")); - assertEquals(5, exec("def x = (int)4 def y = (int)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (int)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (int)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (int)1 return x ^ y")); + assertEquals(5, exec("def x = (byte)4; def y = (int)1; return x ^ y")); + assertEquals(5, exec("def x = (short)4; def y = (int)1; return x ^ y")); + assertEquals(5, exec("def x = (char)4; def y = (int)1; return x ^ y")); + assertEquals(5, exec("def x = (int)4; def y = (int)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (int)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (int)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (int)1; return x ^ y")); - assertEquals(5L, exec("def x = (byte)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (short)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (char)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (int)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (long)1 return x ^ y")); + assertEquals(5L, exec("def x = (byte)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (short)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (char)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (int)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (long)1; return x ^ y")); - assertEquals(5L, exec("def x = (byte)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (short)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (char)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (int)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (float)1 return x ^ y")); + assertEquals(5L, exec("def x = (byte)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (short)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (char)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (int)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (float)1; return x ^ y")); - assertEquals(5L, exec("def x = (byte)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (short)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (char)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (int)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (long)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (float)4 def y = (double)1 return x ^ y")); - assertEquals(5L, exec("def x = (double)4 def y = (double)1 return x ^ y")); + assertEquals(5L, exec("def x = (byte)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (short)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (char)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (int)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (long)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (float)4; def y = (double)1; return x ^ y")); + assertEquals(5L, exec("def x = (double)4; def y = (double)1; return x ^ y")); - assertEquals(5, exec("def x = (Byte)4 def y = (byte)1 return x ^ y")); - assertEquals(5, exec("def x = (Short)4 def y = (short)1 return x ^ y")); - assertEquals(5, exec("def x = (Character)4 def y = (char)1 return x ^ y")); - assertEquals(5, exec("def x = (Integer)4 def y = (int)1 return x ^ y")); - assertEquals(5L, exec("def x = (Long)4 def y = (long)1 return x ^ y")); - assertEquals(5L, exec("def x = (Float)4 def y = (float)1 return x ^ y")); - assertEquals(5L, exec("def x = (Double)4 def y = (double)1 return x ^ y")); + assertEquals(5, exec("def x = (Byte)4; def y = (byte)1; return x ^ y")); + assertEquals(5, exec("def x = (Short)4; def y = (short)1; return x ^ y")); + assertEquals(5, exec("def x = (Character)4; def y = (char)1; return x ^ y")); + assertEquals(5, exec("def x = (Integer)4; def y = (int)1; return x ^ y")); + assertEquals(5L, exec("def x = (Long)4; def y = (long)1; return x ^ y")); + assertEquals(5L, exec("def x = (Float)4; def y = (float)1; return x ^ y")); + assertEquals(5L, exec("def x = (Double)4; def y = (double)1; return x ^ y")); } public void testOr() { - assertEquals(5, exec("def x = (byte)4 def y = (byte)1 return x | y")); - assertEquals(5, exec("def x = (short)4 def y = (byte)1 return x | y")); - assertEquals(5, exec("def x = (char)4 def y = (byte)1 return x | y")); - assertEquals(5, exec("def x = (int)4 def y = (byte)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (byte)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (byte)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (byte)1 return x | y")); + assertEquals(5, exec("def x = (byte)4; def y = (byte)1; return x | y")); + assertEquals(5, exec("def x = (short)4; def y = (byte)1; return x | y")); + assertEquals(5, exec("def x = (char)4; def y = (byte)1; return x | y")); + assertEquals(5, exec("def x = (int)4; def y = (byte)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (byte)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (byte)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (byte)1; return x | y")); - assertEquals(5, exec("def x = (byte)4 def y = (short)1 return x | y")); - assertEquals(5, exec("def x = (short)4 def y = (short)1 return x | y")); - assertEquals(5, exec("def x = (char)4 def y = (short)1 return x | y")); - assertEquals(5, exec("def x = (int)4 def y = (short)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (short)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (short)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (short)1 return x | y")); + assertEquals(5, exec("def x = (byte)4; def y = (short)1; return x | y")); + assertEquals(5, exec("def x = (short)4; def y = (short)1; return x | y")); + assertEquals(5, exec("def x = (char)4; def y = (short)1; return x | y")); + assertEquals(5, exec("def x = (int)4; def y = (short)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (short)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (short)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (short)1; return x | y")); - assertEquals(5, exec("def x = (byte)4 def y = (char)1 return x | y")); - assertEquals(5, exec("def x = (short)4 def y = (char)1 return x | y")); - assertEquals(5, exec("def x = (char)4 def y = (char)1 return x | y")); - assertEquals(5, exec("def x = (int)4 def y = (char)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (char)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (char)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (char)1 return x | y")); + assertEquals(5, exec("def x = (byte)4; def y = (char)1; return x | y")); + assertEquals(5, exec("def x = (short)4; def y = (char)1; return x | y")); + assertEquals(5, exec("def x = (char)4; def y = (char)1; return x | y")); + assertEquals(5, exec("def x = (int)4; def y = (char)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (char)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (char)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (char)1; return x | y")); - assertEquals(5, exec("def x = (byte)4 def y = (int)1 return x | y")); - assertEquals(5, exec("def x = (short)4 def y = (int)1 return x | y")); - assertEquals(5, exec("def x = (char)4 def y = (int)1 return x | y")); - assertEquals(5, exec("def x = (int)4 def y = (int)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (int)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (int)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (int)1 return x | y")); + assertEquals(5, exec("def x = (byte)4; def y = (int)1; return x | y")); + assertEquals(5, exec("def x = (short)4; def y = (int)1; return x | y")); + assertEquals(5, exec("def x = (char)4; def y = (int)1; return x | y")); + assertEquals(5, exec("def x = (int)4; def y = (int)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (int)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (int)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (int)1; return x | y")); - assertEquals(5L, exec("def x = (byte)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (short)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (char)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (int)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (long)1 return x | y")); + assertEquals(5L, exec("def x = (byte)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (short)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (char)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (int)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (long)1; return x | y")); - assertEquals(5L, exec("def x = (byte)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (short)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (char)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (int)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (float)1 return x | y")); + assertEquals(5L, exec("def x = (byte)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (short)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (char)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (int)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (float)1; return x | y")); - assertEquals(5L, exec("def x = (byte)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (short)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (char)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (int)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (long)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (float)4 def y = (double)1 return x | y")); - assertEquals(5L, exec("def x = (double)4 def y = (double)1 return x | y")); + assertEquals(5L, exec("def x = (byte)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (short)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (char)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (int)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (long)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (float)4; def y = (double)1; return x | y")); + assertEquals(5L, exec("def x = (double)4; def y = (double)1; return x | y")); - assertEquals(5, exec("def x = (Byte)4 def y = (byte)1 return x | y")); - assertEquals(5, exec("def x = (Short)4 def y = (short)1 return x | y")); - assertEquals(5, exec("def x = (Character)4 def y = (char)1 return x | y")); - assertEquals(5, exec("def x = (Integer)4 def y = (int)1 return x | y")); - assertEquals(5L, exec("def x = (Long)4 def y = (long)1 return x | y")); - assertEquals(5L, exec("def x = (Float)4 def y = (float)1 return x | y")); - assertEquals(5L, exec("def x = (Double)4 def y = (double)1 return x | y")); + assertEquals(5, exec("def x = (Byte)4; def y = (byte)1; return x | y")); + assertEquals(5, exec("def x = (Short)4; def y = (short)1; return x | y")); + assertEquals(5, exec("def x = (Character)4; def y = (char)1; return x | y")); + assertEquals(5, exec("def x = (Integer)4; def y = (int)1; return x | y")); + assertEquals(5L, exec("def x = (Long)4; def y = (long)1; return x | y")); + assertEquals(5L, exec("def x = (Float)4; def y = (float)1; return x | y")); + assertEquals(5L, exec("def x = (Double)4; def y = (double)1; return x | y")); } public void testEq() { - assertEquals(true, exec("def x = (byte)7 def y = (int)7 return x == y")); - assertEquals(true, exec("def x = (short)6 def y = (int)6 return x == y")); - assertEquals(true, exec("def x = (char)5 def y = (int)5 return x == y")); - assertEquals(true, exec("def x = (int)4 def y = (int)4 return x == y")); - assertEquals(false, exec("def x = (long)5 def y = (int)3 return x == y")); - assertEquals(false, exec("def x = (float)6 def y = (int)2 return x == y")); - assertEquals(false, exec("def x = (double)7 def y = (int)1 return x == y")); + assertEquals(true, exec("def x = (byte)7; def y = (int)7; return x == y")); + assertEquals(true, exec("def x = (short)6; def y = (int)6; return x == y")); + assertEquals(true, exec("def x = (char)5; def y = (int)5; return x == y")); + assertEquals(true, exec("def x = (int)4; def y = (int)4; return x == y")); + assertEquals(false, exec("def x = (long)5; def y = (int)3; return x == y")); + assertEquals(false, exec("def x = (float)6; def y = (int)2; return x == y")); + assertEquals(false, exec("def x = (double)7; def y = (int)1; return x == y")); - assertEquals(true, exec("def x = (byte)7 def y = (double)7 return x == y")); - assertEquals(true, exec("def x = (short)6 def y = (double)6 return x == y")); - assertEquals(true, exec("def x = (char)5 def y = (double)5 return x == y")); - assertEquals(true, exec("def x = (int)4 def y = (double)4 return x == y")); - assertEquals(false, exec("def x = (long)5 def y = (double)3 return x == y")); - assertEquals(false, exec("def x = (float)6 def y = (double)2 return x == y")); - assertEquals(false, exec("def x = (double)7 def y = (double)1 return x == y")); + assertEquals(true, exec("def x = (byte)7; def y = (double)7; return x == y")); + assertEquals(true, exec("def x = (short)6; def y = (double)6; return x == y")); + assertEquals(true, exec("def x = (char)5; def y = (double)5; return x == y")); + assertEquals(true, exec("def x = (int)4; def y = (double)4; return x == y")); + assertEquals(false, exec("def x = (long)5; def y = (double)3; return x == y")); + assertEquals(false, exec("def x = (float)6; def y = (double)2; return x == y")); + assertEquals(false, exec("def x = (double)7; def y = (double)1; return x == y")); - assertEquals(true, exec("def x = new HashMap() def y = new HashMap() return x == y")); - assertEquals(false, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() return x == y")); - assertEquals(true, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() y.put(3, 3) return x == y")); - assertEquals(true, exec("def x = new HashMap() def y = x x.put(3, 3) y.put(3, 3) return x == y")); + assertEquals(true, exec("def x = new HashMap(); def y = new HashMap(); return x == y")); + assertEquals(false, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); return x == y")); + assertEquals(true, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); y.put(3, 3); return x == y")); + assertEquals(true, exec("def x = new HashMap(); def y = x; x.put(3, 3); y.put(3, 3); return x == y")); } public void testEqr() { - assertEquals(false, exec("def x = (byte)7 def y = (int)7 return x === y")); - assertEquals(false, exec("def x = (short)6 def y = (int)6 return x === y")); - assertEquals(false, exec("def x = (char)5 def y = (int)5 return x === y")); - assertEquals(true, exec("def x = (int)4 def y = (int)4 return x === y")); - assertEquals(false, exec("def x = (long)5 def y = (int)3 return x === y")); - assertEquals(false, exec("def x = (float)6 def y = (int)2 return x === y")); - assertEquals(false, exec("def x = (double)7 def y = (int)1 return x === y")); + assertEquals(false, exec("def x = (byte)7; def y = (int)7; return x === y")); + assertEquals(false, exec("def x = (short)6; def y = (int)6; return x === y")); + assertEquals(false, exec("def x = (char)5; def y = (int)5; return x === y")); + assertEquals(true, exec("def x = (int)4; def y = (int)4; return x === y")); + assertEquals(false, exec("def x = (long)5; def y = (int)3; return x === y")); + assertEquals(false, exec("def x = (float)6; def y = (int)2; return x === y")); + assertEquals(false, exec("def x = (double)7; def y = (int)1; return x === y")); - assertEquals(false, exec("def x = new HashMap() def y = new HashMap() return x === y")); - assertEquals(false, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() return x === y")); - assertEquals(false, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() y.put(3, 3) return x === y")); - assertEquals(true, exec("def x = new HashMap() def y = x x.put(3, 3) y.put(3, 3) return x === y")); + assertEquals(false, exec("def x = new HashMap(); def y = new HashMap(); return x === y")); + assertEquals(false, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); return x === y")); + assertEquals(false, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); y.put(3, 3); return x === y")); + assertEquals(true, exec("def x = new HashMap(); def y = x; x.put(3, 3); y.put(3, 3); return x === y")); } public void testNe() { - assertEquals(false, exec("def x = (byte)7 def y = (int)7 return x != y")); - assertEquals(false, exec("def x = (short)6 def y = (int)6 return x != y")); - assertEquals(false, exec("def x = (char)5 def y = (int)5 return x != y")); - assertEquals(false, exec("def x = (int)4 def y = (int)4 return x != y")); - assertEquals(true, exec("def x = (long)5 def y = (int)3 return x != y")); - assertEquals(true, exec("def x = (float)6 def y = (int)2 return x != y")); - assertEquals(true, exec("def x = (double)7 def y = (int)1 return x != y")); + assertEquals(false, exec("def x = (byte)7; def y = (int)7; return x != y")); + assertEquals(false, exec("def x = (short)6; def y = (int)6; return x != y")); + assertEquals(false, exec("def x = (char)5; def y = (int)5; return x != y")); + assertEquals(false, exec("def x = (int)4; def y = (int)4; return x != y")); + assertEquals(true, exec("def x = (long)5; def y = (int)3; return x != y")); + assertEquals(true, exec("def x = (float)6; def y = (int)2; return x != y")); + assertEquals(true, exec("def x = (double)7; def y = (int)1; return x != y")); - assertEquals(false, exec("def x = (byte)7 def y = (double)7 return x != y")); - assertEquals(false, exec("def x = (short)6 def y = (double)6 return x != y")); - assertEquals(false, exec("def x = (char)5 def y = (double)5 return x != y")); - assertEquals(false, exec("def x = (int)4 def y = (double)4 return x != y")); - assertEquals(true, exec("def x = (long)5 def y = (double)3 return x != y")); - assertEquals(true, exec("def x = (float)6 def y = (double)2 return x != y")); - assertEquals(true, exec("def x = (double)7 def y = (double)1 return x != y")); + assertEquals(false, exec("def x = (byte)7; def y = (double)7; return x != y")); + assertEquals(false, exec("def x = (short)6; def y = (double)6; return x != y")); + assertEquals(false, exec("def x = (char)5; def y = (double)5; return x != y")); + assertEquals(false, exec("def x = (int)4; def y = (double)4; return x != y")); + assertEquals(true, exec("def x = (long)5; def y = (double)3; return x != y")); + assertEquals(true, exec("def x = (float)6; def y = (double)2; return x != y")); + assertEquals(true, exec("def x = (double)7; def y = (double)1; return x != y")); - assertEquals(false, exec("def x = new HashMap() def y = new HashMap() return x != y")); - assertEquals(true, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() return x != y")); - assertEquals(false, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() y.put(3, 3) return x != y")); - assertEquals(false, exec("def x = new HashMap() def y = x x.put(3, 3) y.put(3, 3) return x != y")); + assertEquals(false, exec("def x = new HashMap(); def y = new HashMap(); return x != y")); + assertEquals(true, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); return x != y")); + assertEquals(false, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); y.put(3, 3); return x != y")); + assertEquals(false, exec("def x = new HashMap(); def y = x; x.put(3, 3); y.put(3, 3); return x != y")); } public void testNer() { - assertEquals(true, exec("def x = (byte)7 def y = (int)7 return x !== y")); - assertEquals(true, exec("def x = (short)6 def y = (int)6 return x !== y")); - assertEquals(true, exec("def x = (char)5 def y = (int)5 return x !== y")); - assertEquals(false, exec("def x = (int)4 def y = (int)4 return x !== y")); - assertEquals(true, exec("def x = (long)5 def y = (int)3 return x !== y")); - assertEquals(true, exec("def x = (float)6 def y = (int)2 return x !== y")); - assertEquals(true, exec("def x = (double)7 def y = (int)1 return x !== y")); + assertEquals(true, exec("def x = (byte)7; def y = (int)7; return x !== y")); + assertEquals(true, exec("def x = (short)6; def y = (int)6; return x !== y")); + assertEquals(true, exec("def x = (char)5; def y = (int)5; return x !== y")); + assertEquals(false, exec("def x = (int)4; def y = (int)4; return x !== y")); + assertEquals(true, exec("def x = (long)5; def y = (int)3; return x !== y")); + assertEquals(true, exec("def x = (float)6; def y = (int)2; return x !== y")); + assertEquals(true, exec("def x = (double)7; def y = (int)1; return x !== y")); - assertEquals(true, exec("def x = new HashMap() def y = new HashMap() return x !== y")); - assertEquals(true, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() return x !== y")); - assertEquals(true, exec("def x = new HashMap() x.put(3, 3) def y = new HashMap() y.put(3, 3) return x !== y")); - assertEquals(false, exec("def x = new HashMap() def y = x x.put(3, 3) y.put(3, 3) return x !== y")); + assertEquals(true, exec("def x = new HashMap(); def y = new HashMap(); return x !== y")); + assertEquals(true, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); return x !== y")); + assertEquals(true, exec("def x = new HashMap(); x.put(3, 3); def y = new HashMap(); y.put(3, 3); return x !== y")); + assertEquals(false, exec("def x = new HashMap(); def y = x; x.put(3, 3); y.put(3, 3); return x !== y")); } public void testLt() { - assertEquals(true, exec("def x = (byte)1 def y = (int)7 return x < y")); - assertEquals(true, exec("def x = (short)2 def y = (int)6 return x < y")); - assertEquals(true, exec("def x = (char)3 def y = (int)5 return x < y")); - assertEquals(false, exec("def x = (int)4 def y = (int)4 return x < y")); - assertEquals(false, exec("def x = (long)5 def y = (int)3 return x < y")); - assertEquals(false, exec("def x = (float)6 def y = (int)2 return x < y")); - assertEquals(false, exec("def x = (double)7 def y = (int)1 return x < y")); + assertEquals(true, exec("def x = (byte)1; def y = (int)7; return x < y")); + assertEquals(true, exec("def x = (short)2; def y = (int)6; return x < y")); + assertEquals(true, exec("def x = (char)3; def y = (int)5; return x < y")); + assertEquals(false, exec("def x = (int)4; def y = (int)4; return x < y")); + assertEquals(false, exec("def x = (long)5; def y = (int)3; return x < y")); + assertEquals(false, exec("def x = (float)6; def y = (int)2; return x < y")); + assertEquals(false, exec("def x = (double)7; def y = (int)1; return x < y")); - assertEquals(true, exec("def x = (byte)1 def y = (double)7 return x < y")); - assertEquals(true, exec("def x = (short)2 def y = (double)6 return x < y")); - assertEquals(true, exec("def x = (char)3 def y = (double)5 return x < y")); - assertEquals(false, exec("def x = (int)4 def y = (double)4 return x < y")); - assertEquals(false, exec("def x = (long)5 def y = (double)3 return x < y")); - assertEquals(false, exec("def x = (float)6 def y = (double)2 return x < y")); - assertEquals(false, exec("def x = (double)7 def y = (double)1 return x < y")); + assertEquals(true, exec("def x = (byte)1; def y = (double)7; return x < y")); + assertEquals(true, exec("def x = (short)2; def y = (double)6; return x < y")); + assertEquals(true, exec("def x = (char)3; def y = (double)5; return x < y")); + assertEquals(false, exec("def x = (int)4; def y = (double)4; return x < y")); + assertEquals(false, exec("def x = (long)5; def y = (double)3; return x < y")); + assertEquals(false, exec("def x = (float)6; def y = (double)2; return x < y")); + assertEquals(false, exec("def x = (double)7; def y = (double)1; return x < y")); } public void testLte() { - assertEquals(true, exec("def x = (byte)1 def y = (int)7 return x <= y")); - assertEquals(true, exec("def x = (short)2 def y = (int)6 return x <= y")); - assertEquals(true, exec("def x = (char)3 def y = (int)5 return x <= y")); - assertEquals(true, exec("def x = (int)4 def y = (int)4 return x <= y")); - assertEquals(false, exec("def x = (long)5 def y = (int)3 return x <= y")); - assertEquals(false, exec("def x = (float)6 def y = (int)2 return x <= y")); - assertEquals(false, exec("def x = (double)7 def y = (int)1 return x <= y")); + assertEquals(true, exec("def x = (byte)1; def y = (int)7; return x <= y")); + assertEquals(true, exec("def x = (short)2; def y = (int)6; return x <= y")); + assertEquals(true, exec("def x = (char)3; def y = (int)5; return x <= y")); + assertEquals(true, exec("def x = (int)4; def y = (int)4; return x <= y")); + assertEquals(false, exec("def x = (long)5; def y = (int)3; return x <= y")); + assertEquals(false, exec("def x = (float)6; def y = (int)2; return x <= y")); + assertEquals(false, exec("def x = (double)7; def y = (int)1; return x <= y")); - assertEquals(true, exec("def x = (byte)1 def y = (double)7 return x <= y")); - assertEquals(true, exec("def x = (short)2 def y = (double)6 return x <= y")); - assertEquals(true, exec("def x = (char)3 def y = (double)5 return x <= y")); - assertEquals(true, exec("def x = (int)4 def y = (double)4 return x <= y")); - assertEquals(false, exec("def x = (long)5 def y = (double)3 return x <= y")); - assertEquals(false, exec("def x = (float)6 def y = (double)2 return x <= y")); - assertEquals(false, exec("def x = (double)7 def y = (double)1 return x <= y")); + assertEquals(true, exec("def x = (byte)1; def y = (double)7; return x <= y")); + assertEquals(true, exec("def x = (short)2; def y = (double)6; return x <= y")); + assertEquals(true, exec("def x = (char)3; def y = (double)5; return x <= y")); + assertEquals(true, exec("def x = (int)4; def y = (double)4; return x <= y")); + assertEquals(false, exec("def x = (long)5; def y = (double)3; return x <= y")); + assertEquals(false, exec("def x = (float)6; def y = (double)2; return x <= y")); + assertEquals(false, exec("def x = (double)7; def y = (double)1; return x <= y")); } public void testGt() { - assertEquals(false, exec("def x = (byte)1 def y = (int)7 return x > y")); - assertEquals(false, exec("def x = (short)2 def y = (int)6 return x > y")); - assertEquals(false, exec("def x = (char)3 def y = (int)5 return x > y")); - assertEquals(false, exec("def x = (int)4 def y = (int)4 return x > y")); - assertEquals(true, exec("def x = (long)5 def y = (int)3 return x > y")); - assertEquals(true, exec("def x = (float)6 def y = (int)2 return x > y")); - assertEquals(true, exec("def x = (double)7 def y = (int)1 return x > y")); + assertEquals(false, exec("def x = (byte)1; def y = (int)7; return x > y")); + assertEquals(false, exec("def x = (short)2; def y = (int)6; return x > y")); + assertEquals(false, exec("def x = (char)3; def y = (int)5; return x > y")); + assertEquals(false, exec("def x = (int)4; def y = (int)4; return x > y")); + assertEquals(true, exec("def x = (long)5; def y = (int)3; return x > y")); + assertEquals(true, exec("def x = (float)6; def y = (int)2; return x > y")); + assertEquals(true, exec("def x = (double)7; def y = (int)1; return x > y")); - assertEquals(false, exec("def x = (byte)1 def y = (double)7 return x > y")); - assertEquals(false, exec("def x = (short)2 def y = (double)6 return x > y")); - assertEquals(false, exec("def x = (char)3 def y = (double)5 return x > y")); - assertEquals(false, exec("def x = (int)4 def y = (double)4 return x > y")); - assertEquals(true, exec("def x = (long)5 def y = (double)3 return x > y")); - assertEquals(true, exec("def x = (float)6 def y = (double)2 return x > y")); - assertEquals(true, exec("def x = (double)7 def y = (double)1 return x > y")); + assertEquals(false, exec("def x = (byte)1; def y = (double)7; return x > y")); + assertEquals(false, exec("def x = (short)2; def y = (double)6; return x > y")); + assertEquals(false, exec("def x = (char)3; def y = (double)5; return x > y")); + assertEquals(false, exec("def x = (int)4; def y = (double)4; return x > y")); + assertEquals(true, exec("def x = (long)5; def y = (double)3; return x > y")); + assertEquals(true, exec("def x = (float)6; def y = (double)2; return x > y")); + assertEquals(true, exec("def x = (double)7; def y = (double)1; return x > y")); } public void testGte() { - assertEquals(false, exec("def x = (byte)1 def y = (int)7 return x >= y")); - assertEquals(false, exec("def x = (short)2 def y = (int)6 return x >= y")); - assertEquals(false, exec("def x = (char)3 def y = (int)5 return x >= y")); - assertEquals(true, exec("def x = (int)4 def y = (int)4 return x >= y")); - assertEquals(true, exec("def x = (long)5 def y = (int)3 return x >= y")); - assertEquals(true, exec("def x = (float)6 def y = (int)2 return x >= y")); - assertEquals(true, exec("def x = (double)7 def y = (int)1 return x >= y")); + assertEquals(false, exec("def x = (byte)1; def y = (int)7; return x >= y")); + assertEquals(false, exec("def x = (short)2; def y = (int)6; return x >= y")); + assertEquals(false, exec("def x = (char)3; def y = (int)5; return x >= y")); + assertEquals(true, exec("def x = (int)4; def y = (int)4; return x >= y")); + assertEquals(true, exec("def x = (long)5; def y = (int)3; return x >= y")); + assertEquals(true, exec("def x = (float)6; def y = (int)2; return x >= y")); + assertEquals(true, exec("def x = (double)7; def y = (int)1; return x >= y")); - assertEquals(false, exec("def x = (byte)1 def y = (double)7 return x >= y")); - assertEquals(false, exec("def x = (short)2 def y = (double)6 return x >= y")); - assertEquals(false, exec("def x = (char)3 def y = (double)5 return x >= y")); - assertEquals(true, exec("def x = (int)4 def y = (double)4 return x >= y")); - assertEquals(true, exec("def x = (long)5 def y = (double)3 return x >= y")); - assertEquals(true, exec("def x = (float)6 def y = (double)2 return x >= y")); - assertEquals(true, exec("def x = (double)7 def y = (double)1 return x >= y")); + assertEquals(false, exec("def x = (byte)1; def y = (double)7; return x >= y")); + assertEquals(false, exec("def x = (short)2; def y = (double)6; return x >= y")); + assertEquals(false, exec("def x = (char)3; def y = (double)5; return x >= y")); + assertEquals(true, exec("def x = (int)4; def y = (double)4; return x >= y")); + assertEquals(true, exec("def x = (long)5; def y = (double)3; return x >= y")); + assertEquals(true, exec("def x = (float)6; def y = (double)2; return x >= y")); + assertEquals(true, exec("def x = (double)7; def y = (double)1; return x >= y")); } } diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/NoSemiColonTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/NoSemiColonTests.java index 5ca98c2e575..f2e65fc680c 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/NoSemiColonTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/NoSemiColonTests.java @@ -19,161 +19,60 @@ package org.elasticsearch.painless; +import java.util.Collections; import java.util.HashMap; import java.util.Map; public class NoSemiColonTests extends ScriptTestCase { - public void testIfStatement() { - assertEquals(1, exec("int x = 5 if (x == 5) return 1 return 0")); - assertEquals(0, exec("int x = 4 if (x == 5) return 1 else return 0")); - assertEquals(2, exec("int x = 4 if (x == 5) return 1 else if (x == 4) return 2 else return 0")); - assertEquals(1, exec("int x = 4 if (x == 5) return 1 else if (x == 4) return 1 else return 0")); - - assertEquals(3, exec( - "int x = 5\n" + - "if (x == 5) {\n" + - " int y = 2\n" + - " \n" + - " if (y == 2) {\n" + - " x = 3\n" + - " }\n" + - " \n" + - "}\n" + - "\n" + - "return x\n")); - } - - public void testWhileStatement() { - - assertEquals("aaaaaa", exec("String c = \"a\" int x while (x < 5) { ++x c += \"a\" } return c")); - - Object value = exec( - " byte[][] b = new byte[5][5] \n" + - " byte x = 0, y \n" + - " \n" + - " while (x < 5) { \n" + - " y = 0 \n" + - " \n" + - " while (y < 5) { \n" + - " b[x][y] = (byte)(x*y) \n" + - " ++y \n" + - " } \n" + - " \n" + - " ++x \n" + - " } \n" + - " \n" + - " return b \n"); - - byte[][] b = (byte[][])value; - - for (byte x = 0; x < 5; ++x) { - for (byte y = 0; y < 5; ++y) { - assertEquals(x*y, b[x][y]); - } - } - } - - public void testDoWhileStatement() { - assertEquals("aaaaaa", exec("String c = \"a\" int x do { c += \"a\"; ++x } while (x < 5) return c")); - - Object value = exec( - " long[][] l = new long[5][5] \n" + - " long x = 0, y \n" + - " \n" + - " do { \n" + - " y = 0 \n" + - " \n" + - " do { \n" + - " l[(int)x][(int)y] = x*y; \n" + - " ++y \n" + - " } while (y < 5) \n" + - " \n" + - " ++x \n" + - " } while (x < 5) \n" + - " \n" + - " return l \n"); - - long[][] l = (long[][])value; - - for (long x = 0; x < 5; ++x) { - for (long y = 0; y < 5; ++y) { - assertEquals(x*y, l[(int)x][(int)y]); - } - } - } - - public void testForStatement() { - assertEquals("aaaaaa", exec("String c = \"a\" for (int x = 0; x < 5; ++x) c += \"a\" return c")); - - Object value = exec( - " int[][] i = new int[5][5] \n" + - " for (int x = 0; x < 5; ++x) { \n" + - " for (int y = 0; y < 5; ++y) { \n" + - " i[x][y] = x*y \n" + - " } \n" + - " } \n" + - " \n" + - " return i \n"); - - int[][] i = (int[][])value; - - for (int x = 0; x < 5; ++x) { - for (int y = 0; y < 5; ++y) { - assertEquals(x*y, i[x][y]); - } - } - } - public void testDeclarationStatement() { - assertEquals((byte)2, exec("byte a = 2 return a")); - assertEquals((short)2, exec("short a = 2 return a")); - assertEquals((char)2, exec("char a = 2 return a")); - assertEquals(2, exec("int a = 2 return a")); - assertEquals(2L, exec("long a = 2 return a")); - assertEquals(2F, exec("float a = 2 return a")); - assertEquals(2.0, exec("double a = 2 return a")); - assertEquals(false, exec("boolean a = false return a")); - assertEquals("string", exec("String a = \"string\" return a")); - assertEquals(HashMap.class, exec("Map a = new HashMap() return a").getClass()); + assertEquals((byte)2, exec("byte a = 2; return a")); + assertEquals((short)2, exec("short a = 2; return a")); + assertEquals((char)2, exec("char a = 2; return a")); + assertEquals(2, exec("int a = 2; return a")); + assertEquals(2L, exec("long a = 2; return a")); + assertEquals(2F, exec("float a = 2; return a")); + assertEquals(2.0, exec("double a = 2; return a")); + assertEquals(false, exec("boolean a = false; return a")); + assertEquals("string", exec("String a = \"string\"; return a")); + assertEquals(HashMap.class, exec("Map a = new HashMap(); return a").getClass()); - assertEquals(byte[].class, exec("byte[] a = new byte[1] return a").getClass()); - assertEquals(short[].class, exec("short[] a = new short[1] return a").getClass()); - assertEquals(char[].class, exec("char[] a = new char[1] return a").getClass()); - assertEquals(int[].class, exec("int[] a = new int[1] return a").getClass()); - assertEquals(long[].class, exec("long[] a = new long[1] return a").getClass()); - assertEquals(float[].class, exec("float[] a = new float[1] return a").getClass()); - assertEquals(double[].class, exec("double[] a = new double[1] return a").getClass()); - assertEquals(boolean[].class, exec("boolean[] a = new boolean[1] return a").getClass()); - assertEquals(String[].class, exec("String[] a = new String[1] return a").getClass()); - assertEquals(Map[].class, exec("Map[] a = new Map[1] return a").getClass()); + assertEquals(byte[].class, exec("byte[] a = new byte[1]; return a").getClass()); + assertEquals(short[].class, exec("short[] a = new short[1]; return a").getClass()); + assertEquals(char[].class, exec("char[] a = new char[1]; return a").getClass()); + assertEquals(int[].class, exec("int[] a = new int[1]; return a").getClass()); + assertEquals(long[].class, exec("long[] a = new long[1]; return a").getClass()); + assertEquals(float[].class, exec("float[] a = new float[1]; return a").getClass()); + assertEquals(double[].class, exec("double[] a = new double[1]; return a").getClass()); + assertEquals(boolean[].class, exec("boolean[] a = new boolean[1]; return a").getClass()); + assertEquals(String[].class, exec("String[] a = new String[1]; return a").getClass()); + assertEquals(Map[].class, exec("Map[] a = new Map[1]; return a").getClass()); - assertEquals(byte[][].class, exec("byte[][] a = new byte[1][2] return a").getClass()); - assertEquals(short[][][].class, exec("short[][][] a = new short[1][2][3] return a").getClass()); - assertEquals(char[][][][].class, exec("char[][][][] a = new char[1][2][3][4] return a").getClass()); - assertEquals(int[][][][][].class, exec("int[][][][][] a = new int[1][2][3][4][5] return a").getClass()); - assertEquals(long[][].class, exec("long[][] a = new long[1][2] return a").getClass()); - assertEquals(float[][][].class, exec("float[][][] a = new float[1][2][3] return a").getClass()); - assertEquals(double[][][][].class, exec("double[][][][] a = new double[1][2][3][4] return a").getClass()); - assertEquals(boolean[][][][][].class, exec("boolean[][][][][] a = new boolean[1][2][3][4][5] return a").getClass()); - assertEquals(String[][].class, exec("String[][] a = new String[1][2] return a").getClass()); - assertEquals(Map[][][].class, exec("Map[][][] a = new Map[1][2][3] return a").getClass()); + assertEquals(byte[][].class, exec("byte[][] a = new byte[1][2]; return a").getClass()); + assertEquals(short[][][].class, exec("short[][][] a = new short[1][2][3]; return a").getClass()); + assertEquals(char[][][][].class, exec("char[][][][] a = new char[1][2][3][4]; return a").getClass()); + assertEquals(int[][][][][].class, exec("int[][][][][] a = new int[1][2][3][4][5]; return a").getClass()); + assertEquals(long[][].class, exec("long[][] a = new long[1][2]; return a").getClass()); + assertEquals(float[][][].class, exec("float[][][] a = new float[1][2][3]; return a").getClass()); + assertEquals(double[][][][].class, exec("double[][][][] a = new double[1][2][3][4]; return a").getClass()); + assertEquals(boolean[][][][][].class, exec("boolean[][][][][] a = new boolean[1][2][3][4][5]; return a").getClass()); + assertEquals(String[][].class, exec("String[][] a = new String[1][2]; return a").getClass()); + assertEquals(Map[][][].class, exec("Map[][][] a = new Map[1][2][3]; return a").getClass()); } - - public void testContinueStatement() { - assertEquals(9, exec("int x = 0, y = 0 while (x < 10) { ++x if (x == 1) continue ++y } return y")); - } - - public void testBreakStatement() { - assertEquals(4, exec("int x = 0, y = 0 while (x < 10) { ++x if (x == 5) break ++y } return y")); + + public void testExpression() { + assertEquals(10, exec("10")); + assertEquals(10, exec("5 + 5")); + assertEquals(10, exec("5 + 5")); + assertEquals(10, exec("params.param == 'yes' ? 10 : 5", Collections.singletonMap("param", "yes"))); } @SuppressWarnings("rawtypes") public void testReturnStatement() { assertEquals(10, exec("return 10")); - assertEquals(5, exec("int x = 5 return x")); - assertEquals(4, exec("int[] x = new int[2] x[1] = 4 return x[1]")); - assertEquals(5, ((short[])exec("short[] s = new short[3] s[1] = 5 return s"))[1]); - assertEquals(10, ((Map)exec("Map s = new HashMap< String,Object>() s.put(\"x\", 10) return s")).get("x")); + assertEquals(5, exec("int x = 5; return x")); + assertEquals(4, exec("int[] x = new int[2]; x[1] = 4; return x[1]")); + assertEquals(5, ((short[])exec("short[] s = new short[3]; s[1] = 5; return s"))[1]); + assertEquals(10, ((Map)exec("Map s = new HashMap< String,Object>(); s.put(\"x\", 10); return s")).get("x")); } } diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/StringTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/StringTests.java index 0c2b2f4386c..95acf1826fd 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/StringTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/StringTests.java @@ -19,6 +19,8 @@ package org.elasticsearch.painless; +import java.util.Locale; + public class StringTests extends ScriptTestCase { public void testAppend() { @@ -63,6 +65,21 @@ public class StringTests extends ScriptTestCase { assertEquals("cat" + "cat", exec("String s = 'cat'; return s + s;")); } + public void testAppendMultiple() { + assertEquals("cat" + true + "abc" + null, exec("String s = \"cat\"; return s + true + 'abc' + null;")); + } + + public void testAppendMany() { + StringBuilder script = new StringBuilder("String s = \"cat\"; return s"); + StringBuilder result = new StringBuilder("cat"); + for (int i = 0; i < 200 /* indy limit */ + 10; i++) { + final String s = String.format(Locale.ROOT, "%03d", i); + script.append(" + '").append(s).append("'.toString()"); + result.append(s); + } + assertEquals(result.toString(), exec(script.toString())); + } + public void testStringAPI() { assertEquals("", exec("return new String();")); assertEquals('x', exec("String s = \"x\"; return s.charAt(0);")); @@ -127,8 +144,8 @@ public class StringTests extends ScriptTestCase { assertEquals("c", exec("return (String)(char)\"c\"")); assertEquals("c", exec("return (String)(char)'c'")); - assertEquals('c', exec("String s = \"c\" (char)s")); - assertEquals('c', exec("String s = 'c' (char)s")); + assertEquals('c', exec("String s = \"c\"; (char)s")); + assertEquals('c', exec("String s = 'c'; (char)s")); try { assertEquals("cc", exec("return (String)(char)\"cc\"")); @@ -145,14 +162,14 @@ public class StringTests extends ScriptTestCase { } try { - assertEquals('c', exec("String s = \"cc\" (char)s")); + assertEquals('c', exec("String s = \"cc\"; (char)s")); fail(); } catch (final ClassCastException cce) { assertTrue(cce.getMessage().contains("Cannot cast [String] with length greater than one to [char].")); } try { - assertEquals('c', exec("String s = 'cc' (char)s")); + assertEquals('c', exec("String s = 'cc'; (char)s")); fail(); } catch (final ClassCastException cce) { assertTrue(cce.getMessage().contains("Cannot cast [String] with length greater than one to [char].")); @@ -163,8 +180,8 @@ public class StringTests extends ScriptTestCase { assertEquals("c", exec("return (String)(Character)\"c\"")); assertEquals("c", exec("return (String)(Character)'c'")); - assertEquals('c', exec("String s = \"c\" (Character)s")); - assertEquals('c', exec("String s = 'c' (Character)s")); + assertEquals('c', exec("String s = \"c\"; (Character)s")); + assertEquals('c', exec("String s = 'c'; (Character)s")); try { assertEquals("cc", exec("return (String)(Character)\"cc\"")); @@ -181,14 +198,14 @@ public class StringTests extends ScriptTestCase { } try { - assertEquals('c', exec("String s = \"cc\" (Character)s")); + assertEquals('c', exec("String s = \"cc\"; (Character)s")); fail(); } catch (final ClassCastException cce) { assertTrue(cce.getMessage().contains("Cannot cast [String] with length greater than one to [Character].")); } try { - assertEquals('c', exec("String s = 'cc' (Character)s")); + assertEquals('c', exec("String s = 'cc'; (Character)s")); fail(); } catch (final ClassCastException cce) { assertTrue(cce.getMessage().contains("Cannot cast [String] with length greater than one to [Character].")); diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java index 55ee490bb3f..15ae321534e 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java @@ -90,7 +90,7 @@ public class WhenThingsGoWrongTests extends ScriptTestCase { "The maximum number of statements that can be executed in a loop has been reached.")); expected = expectThrows(PainlessError.class, () -> { - exec("while (true) {int y = 5}"); + exec("while (true) {int y = 5;}"); }); assertTrue(expected.getMessage().contains( "The maximum number of statements that can be executed in a loop has been reached.")); @@ -116,7 +116,7 @@ public class WhenThingsGoWrongTests extends ScriptTestCase { "The maximum number of statements that can be executed in a loop has been reached.")); expected = expectThrows(PainlessError.class, () -> { - exec("for (;;) {int x = 5}"); + exec("for (;;) {int x = 5;}"); fail("should have hit PainlessError"); }); assertTrue(expected.getMessage().contains( @@ -130,7 +130,7 @@ public class WhenThingsGoWrongTests extends ScriptTestCase { "The maximum number of statements that can be executed in a loop has been reached.")); RuntimeException parseException = expectThrows(RuntimeException.class, () -> { - exec("try { int x } catch (PainlessError error) {}"); + exec("try { int x; } catch (PainlessError error) {}"); fail("should have hit ParseException"); }); assertTrue(parseException.getMessage().contains("Not a type [PainlessError]."));