| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.parser_test; | 8 library engine.parser_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * code fragments should be as minimal as possible in order to test the method,
but should not test | 27 * code fragments should be as minimal as possible in order to test the method,
but should not test |
| 28 * the interactions between the method under test and other methods. | 28 * the interactions between the method under test and other methods. |
| 29 * | 29 * |
| 30 * More complex tests should be defined in the class [ComplexParserTest]. | 30 * More complex tests should be defined in the class [ComplexParserTest]. |
| 31 */ | 31 */ |
| 32 class SimpleParserTest extends ParserTestCase { | 32 class SimpleParserTest extends ParserTestCase { |
| 33 void fail_parseCommentReference_this() { | 33 void fail_parseCommentReference_this() { |
| 34 // This fails because we are returning null from the method and asserting th
at the return value | 34 // This fails because we are returning null from the method and asserting th
at the return value |
| 35 // is not null. | 35 // is not null. |
| 36 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["this", 5], ""); | 36 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["this", 5], ""); |
| 37 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifi
er, reference.identifier); | 37 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj i
s SimpleIdentifier, SimpleIdentifier, reference.identifier); |
| 38 JUnitTestCase.assertNotNull(identifier.token); | 38 JUnitTestCase.assertNotNull(identifier.token); |
| 39 JUnitTestCase.assertEquals("a", identifier.name); | 39 JUnitTestCase.assertEquals("a", identifier.name); |
| 40 JUnitTestCase.assertEquals(5, identifier.offset); | 40 JUnitTestCase.assertEquals(5, identifier.offset); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void test_computeStringValue_emptyInterpolationPrefix() { | 43 void test_computeStringValue_emptyInterpolationPrefix() { |
| 44 JUnitTestCase.assertEquals("", computeStringValue("'''", true, false)); | 44 JUnitTestCase.assertEquals("", computeStringValue("'''", true, false)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void test_computeStringValue_escape_b() { | 47 void test_computeStringValue_escape_b() { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 void test_parseAdditiveExpression_normal() { | 298 void test_parseAdditiveExpression_normal() { |
| 299 BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression
", "x + y", []); | 299 BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression
", "x + y", []); |
| 300 JUnitTestCase.assertNotNull(expression.leftOperand); | 300 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 301 JUnitTestCase.assertNotNull(expression.operator); | 301 JUnitTestCase.assertNotNull(expression.operator); |
| 302 JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type); | 302 JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type); |
| 303 JUnitTestCase.assertNotNull(expression.rightOperand); | 303 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void test_parseAdditiveExpression_super() { | 306 void test_parseAdditiveExpression_super() { |
| 307 BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression
", "super + y", []); | 307 BinaryExpression expression = ParserTestCase.parse4("parseAdditiveExpression
", "super + y", []); |
| 308 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 308 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 309 JUnitTestCase.assertNotNull(expression.operator); | 309 JUnitTestCase.assertNotNull(expression.operator); |
| 310 JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type); | 310 JUnitTestCase.assertEquals(TokenType.PLUS, expression.operator.type); |
| 311 JUnitTestCase.assertNotNull(expression.rightOperand); | 311 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 312 } | 312 } |
| 313 | 313 |
| 314 void test_parseAnnotation_n1() { | 314 void test_parseAnnotation_n1() { |
| 315 Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A", []); | 315 Annotation annotation = ParserTestCase.parse4("parseAnnotation", "@A", []); |
| 316 JUnitTestCase.assertNotNull(annotation.atSign); | 316 JUnitTestCase.assertNotNull(annotation.atSign); |
| 317 JUnitTestCase.assertNotNull(annotation.name); | 317 JUnitTestCase.assertNotNull(annotation.name); |
| 318 JUnitTestCase.assertNull(annotation.period); | 318 JUnitTestCase.assertNull(annotation.period); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 void test_parseAssignableExpression_identifier_index() { | 471 void test_parseAssignableExpression_identifier_index() { |
| 472 IndexExpression expression = ParserTestCase.parse("parseAssignableExpression
", <Object> [false], "x[y]"); | 472 IndexExpression expression = ParserTestCase.parse("parseAssignableExpression
", <Object> [false], "x[y]"); |
| 473 JUnitTestCase.assertNotNull(expression.target); | 473 JUnitTestCase.assertNotNull(expression.target); |
| 474 JUnitTestCase.assertNotNull(expression.leftBracket); | 474 JUnitTestCase.assertNotNull(expression.leftBracket); |
| 475 JUnitTestCase.assertNotNull(expression.index); | 475 JUnitTestCase.assertNotNull(expression.index); |
| 476 JUnitTestCase.assertNotNull(expression.rightBracket); | 476 JUnitTestCase.assertNotNull(expression.rightBracket); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void test_parseAssignableExpression_super_dot() { | 479 void test_parseAssignableExpression_super_dot() { |
| 480 PropertyAccess propertyAccess = ParserTestCase.parse("parseAssignableExpress
ion", <Object> [false], "super.y"); | 480 PropertyAccess propertyAccess = ParserTestCase.parse("parseAssignableExpress
ion", <Object> [false], "super.y"); |
| 481 EngineTestCase.assertInstanceOf(SuperExpression, propertyAccess.target); | 481 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, propertyAccess.target); |
| 482 JUnitTestCase.assertNotNull(propertyAccess.operator); | 482 JUnitTestCase.assertNotNull(propertyAccess.operator); |
| 483 JUnitTestCase.assertNotNull(propertyAccess.propertyName); | 483 JUnitTestCase.assertNotNull(propertyAccess.propertyName); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void test_parseAssignableExpression_super_index() { | 486 void test_parseAssignableExpression_super_index() { |
| 487 IndexExpression expression = ParserTestCase.parse("parseAssignableExpression
", <Object> [false], "super[y]"); | 487 IndexExpression expression = ParserTestCase.parse("parseAssignableExpression
", <Object> [false], "super[y]"); |
| 488 EngineTestCase.assertInstanceOf(SuperExpression, expression.target); | 488 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.target); |
| 489 JUnitTestCase.assertNotNull(expression.leftBracket); | 489 JUnitTestCase.assertNotNull(expression.leftBracket); |
| 490 JUnitTestCase.assertNotNull(expression.index); | 490 JUnitTestCase.assertNotNull(expression.index); |
| 491 JUnitTestCase.assertNotNull(expression.rightBracket); | 491 JUnitTestCase.assertNotNull(expression.rightBracket); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void test_parseAssignableSelector_dot() { | 494 void test_parseAssignableSelector_dot() { |
| 495 PropertyAccess selector = ParserTestCase.parse("parseAssignableSelector", <O
bject> [null, true], ".x"); | 495 PropertyAccess selector = ParserTestCase.parse("parseAssignableSelector", <O
bject> [null, true], ".x"); |
| 496 JUnitTestCase.assertNotNull(selector.operator); | 496 JUnitTestCase.assertNotNull(selector.operator); |
| 497 JUnitTestCase.assertNotNull(selector.propertyName); | 497 JUnitTestCase.assertNotNull(selector.propertyName); |
| 498 } | 498 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 512 void test_parseBitwiseAndExpression_normal() { | 512 void test_parseBitwiseAndExpression_normal() { |
| 513 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi
on", "x & y", []); | 513 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi
on", "x & y", []); |
| 514 JUnitTestCase.assertNotNull(expression.leftOperand); | 514 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 515 JUnitTestCase.assertNotNull(expression.operator); | 515 JUnitTestCase.assertNotNull(expression.operator); |
| 516 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type); | 516 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type); |
| 517 JUnitTestCase.assertNotNull(expression.rightOperand); | 517 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 518 } | 518 } |
| 519 | 519 |
| 520 void test_parseBitwiseAndExpression_super() { | 520 void test_parseBitwiseAndExpression_super() { |
| 521 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi
on", "super & y", []); | 521 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpressi
on", "super & y", []); |
| 522 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 522 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 523 JUnitTestCase.assertNotNull(expression.operator); | 523 JUnitTestCase.assertNotNull(expression.operator); |
| 524 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type); | 524 JUnitTestCase.assertEquals(TokenType.AMPERSAND, expression.operator.type); |
| 525 JUnitTestCase.assertNotNull(expression.rightOperand); | 525 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void test_parseBitwiseOrExpression_normal() { | 528 void test_parseBitwiseOrExpression_normal() { |
| 529 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpressio
n", "x | y", []); | 529 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpressio
n", "x | y", []); |
| 530 JUnitTestCase.assertNotNull(expression.leftOperand); | 530 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 531 JUnitTestCase.assertNotNull(expression.operator); | 531 JUnitTestCase.assertNotNull(expression.operator); |
| 532 JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type); | 532 JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type); |
| 533 JUnitTestCase.assertNotNull(expression.rightOperand); | 533 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 534 } | 534 } |
| 535 | 535 |
| 536 void test_parseBitwiseOrExpression_super() { | 536 void test_parseBitwiseOrExpression_super() { |
| 537 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpressio
n", "super | y", []); | 537 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseOrExpressio
n", "super | y", []); |
| 538 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 538 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 539 JUnitTestCase.assertNotNull(expression.operator); | 539 JUnitTestCase.assertNotNull(expression.operator); |
| 540 JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type); | 540 JUnitTestCase.assertEquals(TokenType.BAR, expression.operator.type); |
| 541 JUnitTestCase.assertNotNull(expression.rightOperand); | 541 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void test_parseBitwiseXorExpression_normal() { | 544 void test_parseBitwiseXorExpression_normal() { |
| 545 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpressi
on", "x ^ y", []); | 545 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpressi
on", "x ^ y", []); |
| 546 JUnitTestCase.assertNotNull(expression.leftOperand); | 546 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 547 JUnitTestCase.assertNotNull(expression.operator); | 547 JUnitTestCase.assertNotNull(expression.operator); |
| 548 JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type); | 548 JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type); |
| 549 JUnitTestCase.assertNotNull(expression.rightOperand); | 549 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 550 } | 550 } |
| 551 | 551 |
| 552 void test_parseBitwiseXorExpression_super() { | 552 void test_parseBitwiseXorExpression_super() { |
| 553 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpressi
on", "super ^ y", []); | 553 BinaryExpression expression = ParserTestCase.parse4("parseBitwiseXorExpressi
on", "super ^ y", []); |
| 554 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 554 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 555 JUnitTestCase.assertNotNull(expression.operator); | 555 JUnitTestCase.assertNotNull(expression.operator); |
| 556 JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type); | 556 JUnitTestCase.assertEquals(TokenType.CARET, expression.operator.type); |
| 557 JUnitTestCase.assertNotNull(expression.rightOperand); | 557 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 558 } | 558 } |
| 559 | 559 |
| 560 void test_parseBlock_empty() { | 560 void test_parseBlock_empty() { |
| 561 Block block = ParserTestCase.parse4("parseBlock", "{}", []); | 561 Block block = ParserTestCase.parse4("parseBlock", "{}", []); |
| 562 JUnitTestCase.assertNotNull(block.leftBracket); | 562 JUnitTestCase.assertNotNull(block.leftBracket); |
| 563 EngineTestCase.assertSize(0, block.statements); | 563 EngineTestCase.assertSize(0, block.statements); |
| 564 JUnitTestCase.assertNotNull(block.rightBracket); | 564 JUnitTestCase.assertNotNull(block.rightBracket); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 588 void test_parseCascadeSection_i() { | 588 void test_parseCascadeSection_i() { |
| 589 IndexExpression section = ParserTestCase.parse4("parseCascadeSection", "..[i
]", []); | 589 IndexExpression section = ParserTestCase.parse4("parseCascadeSection", "..[i
]", []); |
| 590 JUnitTestCase.assertNull(section.target); | 590 JUnitTestCase.assertNull(section.target); |
| 591 JUnitTestCase.assertNotNull(section.leftBracket); | 591 JUnitTestCase.assertNotNull(section.leftBracket); |
| 592 JUnitTestCase.assertNotNull(section.index); | 592 JUnitTestCase.assertNotNull(section.index); |
| 593 JUnitTestCase.assertNotNull(section.rightBracket); | 593 JUnitTestCase.assertNotNull(section.rightBracket); |
| 594 } | 594 } |
| 595 | 595 |
| 596 void test_parseCascadeSection_ia() { | 596 void test_parseCascadeSection_ia() { |
| 597 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..[i](b)", []); | 597 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..[i](b)", []); |
| 598 EngineTestCase.assertInstanceOf(IndexExpression, section.function); | 598 EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpres
sion, section.function); |
| 599 JUnitTestCase.assertNotNull(section.argumentList); | 599 JUnitTestCase.assertNotNull(section.argumentList); |
| 600 } | 600 } |
| 601 | 601 |
| 602 void test_parseCascadeSection_ii() { | 602 void test_parseCascadeSection_ii() { |
| 603 MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a
(b).c(d)", []); | 603 MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a
(b).c(d)", []); |
| 604 EngineTestCase.assertInstanceOf(MethodInvocation, section.target); | 604 EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvo
cation, section.target); |
| 605 JUnitTestCase.assertNotNull(section.period); | 605 JUnitTestCase.assertNotNull(section.period); |
| 606 JUnitTestCase.assertNotNull(section.methodName); | 606 JUnitTestCase.assertNotNull(section.methodName); |
| 607 JUnitTestCase.assertNotNull(section.argumentList); | 607 JUnitTestCase.assertNotNull(section.argumentList); |
| 608 EngineTestCase.assertSize(1, section.argumentList.arguments); | 608 EngineTestCase.assertSize(1, section.argumentList.arguments); |
| 609 } | 609 } |
| 610 | 610 |
| 611 void test_parseCascadeSection_p() { | 611 void test_parseCascadeSection_p() { |
| 612 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a",
[]); | 612 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a",
[]); |
| 613 JUnitTestCase.assertNull(section.target); | 613 JUnitTestCase.assertNull(section.target); |
| 614 JUnitTestCase.assertNotNull(section.operator); | 614 JUnitTestCase.assertNotNull(section.operator); |
| 615 JUnitTestCase.assertNotNull(section.propertyName); | 615 JUnitTestCase.assertNotNull(section.propertyName); |
| 616 } | 616 } |
| 617 | 617 |
| 618 void test_parseCascadeSection_p_assign() { | 618 void test_parseCascadeSection_p_assign() { |
| 619 AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection",
"..a = 3", []); | 619 AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection",
"..a = 3", []); |
| 620 JUnitTestCase.assertNotNull(section.leftHandSide); | 620 JUnitTestCase.assertNotNull(section.leftHandSide); |
| 621 JUnitTestCase.assertNotNull(section.operator); | 621 JUnitTestCase.assertNotNull(section.operator); |
| 622 Expression rhs = section.rightHandSide; | 622 Expression rhs = section.rightHandSide; |
| 623 JUnitTestCase.assertNotNull(rhs); | 623 JUnitTestCase.assertNotNull(rhs); |
| 624 } | 624 } |
| 625 | 625 |
| 626 void test_parseCascadeSection_p_assign_withCascade() { | 626 void test_parseCascadeSection_p_assign_withCascade() { |
| 627 AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection",
"..a = 3..m()", []); | 627 AssignmentExpression section = ParserTestCase.parse4("parseCascadeSection",
"..a = 3..m()", []); |
| 628 JUnitTestCase.assertNotNull(section.leftHandSide); | 628 JUnitTestCase.assertNotNull(section.leftHandSide); |
| 629 JUnitTestCase.assertNotNull(section.operator); | 629 JUnitTestCase.assertNotNull(section.operator); |
| 630 Expression rhs = section.rightHandSide; | 630 Expression rhs = section.rightHandSide; |
| 631 EngineTestCase.assertInstanceOf(IntegerLiteral, rhs); | 631 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, rhs); |
| 632 } | 632 } |
| 633 | 633 |
| 634 void test_parseCascadeSection_p_builtIn() { | 634 void test_parseCascadeSection_p_builtIn() { |
| 635 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..as"
, []); | 635 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..as"
, []); |
| 636 JUnitTestCase.assertNull(section.target); | 636 JUnitTestCase.assertNull(section.target); |
| 637 JUnitTestCase.assertNotNull(section.operator); | 637 JUnitTestCase.assertNotNull(section.operator); |
| 638 JUnitTestCase.assertNotNull(section.propertyName); | 638 JUnitTestCase.assertNotNull(section.propertyName); |
| 639 } | 639 } |
| 640 | 640 |
| 641 void test_parseCascadeSection_pa() { | 641 void test_parseCascadeSection_pa() { |
| 642 MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a
(b)", []); | 642 MethodInvocation section = ParserTestCase.parse4("parseCascadeSection", "..a
(b)", []); |
| 643 JUnitTestCase.assertNull(section.target); | 643 JUnitTestCase.assertNull(section.target); |
| 644 JUnitTestCase.assertNotNull(section.period); | 644 JUnitTestCase.assertNotNull(section.period); |
| 645 JUnitTestCase.assertNotNull(section.methodName); | 645 JUnitTestCase.assertNotNull(section.methodName); |
| 646 JUnitTestCase.assertNotNull(section.argumentList); | 646 JUnitTestCase.assertNotNull(section.argumentList); |
| 647 EngineTestCase.assertSize(1, section.argumentList.arguments); | 647 EngineTestCase.assertSize(1, section.argumentList.arguments); |
| 648 } | 648 } |
| 649 | 649 |
| 650 void test_parseCascadeSection_paa() { | 650 void test_parseCascadeSection_paa() { |
| 651 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..a(b)(c)", []); | 651 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..a(b)(c)", []); |
| 652 EngineTestCase.assertInstanceOf(MethodInvocation, section.function); | 652 EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvo
cation, section.function); |
| 653 JUnitTestCase.assertNotNull(section.argumentList); | 653 JUnitTestCase.assertNotNull(section.argumentList); |
| 654 EngineTestCase.assertSize(1, section.argumentList.arguments); | 654 EngineTestCase.assertSize(1, section.argumentList.arguments); |
| 655 } | 655 } |
| 656 | 656 |
| 657 void test_parseCascadeSection_paapaa() { | 657 void test_parseCascadeSection_paapaa() { |
| 658 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..a(b)(c).d(e)(f)", []); | 658 FunctionExpressionInvocation section = ParserTestCase.parse4("parseCascadeSe
ction", "..a(b)(c).d(e)(f)", []); |
| 659 EngineTestCase.assertInstanceOf(MethodInvocation, section.function); | 659 EngineTestCase.assertInstanceOf((obj) => obj is MethodInvocation, MethodInvo
cation, section.function); |
| 660 JUnitTestCase.assertNotNull(section.argumentList); | 660 JUnitTestCase.assertNotNull(section.argumentList); |
| 661 EngineTestCase.assertSize(1, section.argumentList.arguments); | 661 EngineTestCase.assertSize(1, section.argumentList.arguments); |
| 662 } | 662 } |
| 663 | 663 |
| 664 void test_parseCascadeSection_pap() { | 664 void test_parseCascadeSection_pap() { |
| 665 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a(b
).c", []); | 665 PropertyAccess section = ParserTestCase.parse4("parseCascadeSection", "..a(b
).c", []); |
| 666 JUnitTestCase.assertNotNull(section.target); | 666 JUnitTestCase.assertNotNull(section.target); |
| 667 JUnitTestCase.assertNotNull(section.operator); | 667 JUnitTestCase.assertNotNull(section.operator); |
| 668 JUnitTestCase.assertNotNull(section.propertyName); | 668 JUnitTestCase.assertNotNull(section.propertyName); |
| 669 } | 669 } |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 void test_parseCommentAndMetadata_singleLine() { | 1296 void test_parseCommentAndMetadata_singleLine() { |
| 1297 CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentA
ndMetadata", EngineTestCase.createSource(["/// 1", "/// 2", "void"]), []); | 1297 CommentAndMetadata commentAndMetadata = ParserTestCase.parse4("parseCommentA
ndMetadata", EngineTestCase.createSource(["/// 1", "/// 2", "void"]), []); |
| 1298 JUnitTestCase.assertNotNull(commentAndMetadata.comment); | 1298 JUnitTestCase.assertNotNull(commentAndMetadata.comment); |
| 1299 EngineTestCase.assertSize(0, commentAndMetadata.metadata); | 1299 EngineTestCase.assertSize(0, commentAndMetadata.metadata); |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 void test_parseCommentReference_new_prefixed() { | 1302 void test_parseCommentReference_new_prefixed() { |
| 1303 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["new a.b", 7], ""); | 1303 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["new a.b", 7], ""); |
| 1304 PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(Pref
ixedIdentifier, reference.identifier); | 1304 PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf((obj
) => obj is PrefixedIdentifier, PrefixedIdentifier, reference.identifier); |
| 1305 SimpleIdentifier prefix = prefixedIdentifier.prefix; | 1305 SimpleIdentifier prefix = prefixedIdentifier.prefix; |
| 1306 JUnitTestCase.assertNotNull(prefix.token); | 1306 JUnitTestCase.assertNotNull(prefix.token); |
| 1307 JUnitTestCase.assertEquals("a", prefix.name); | 1307 JUnitTestCase.assertEquals("a", prefix.name); |
| 1308 JUnitTestCase.assertEquals(11, prefix.offset); | 1308 JUnitTestCase.assertEquals(11, prefix.offset); |
| 1309 JUnitTestCase.assertNotNull(prefixedIdentifier.period); | 1309 JUnitTestCase.assertNotNull(prefixedIdentifier.period); |
| 1310 SimpleIdentifier identifier = prefixedIdentifier.identifier; | 1310 SimpleIdentifier identifier = prefixedIdentifier.identifier; |
| 1311 JUnitTestCase.assertNotNull(identifier.token); | 1311 JUnitTestCase.assertNotNull(identifier.token); |
| 1312 JUnitTestCase.assertEquals("b", identifier.name); | 1312 JUnitTestCase.assertEquals("b", identifier.name); |
| 1313 JUnitTestCase.assertEquals(13, identifier.offset); | 1313 JUnitTestCase.assertEquals(13, identifier.offset); |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 void test_parseCommentReference_new_simple() { | 1316 void test_parseCommentReference_new_simple() { |
| 1317 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["new a", 5], ""); | 1317 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["new a", 5], ""); |
| 1318 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifi
er, reference.identifier); | 1318 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj i
s SimpleIdentifier, SimpleIdentifier, reference.identifier); |
| 1319 JUnitTestCase.assertNotNull(identifier.token); | 1319 JUnitTestCase.assertNotNull(identifier.token); |
| 1320 JUnitTestCase.assertEquals("a", identifier.name); | 1320 JUnitTestCase.assertEquals("a", identifier.name); |
| 1321 JUnitTestCase.assertEquals(9, identifier.offset); | 1321 JUnitTestCase.assertEquals(9, identifier.offset); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 void test_parseCommentReference_prefixed() { | 1324 void test_parseCommentReference_prefixed() { |
| 1325 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["a.b", 7], ""); | 1325 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["a.b", 7], ""); |
| 1326 PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(Pref
ixedIdentifier, reference.identifier); | 1326 PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf((obj
) => obj is PrefixedIdentifier, PrefixedIdentifier, reference.identifier); |
| 1327 SimpleIdentifier prefix = prefixedIdentifier.prefix; | 1327 SimpleIdentifier prefix = prefixedIdentifier.prefix; |
| 1328 JUnitTestCase.assertNotNull(prefix.token); | 1328 JUnitTestCase.assertNotNull(prefix.token); |
| 1329 JUnitTestCase.assertEquals("a", prefix.name); | 1329 JUnitTestCase.assertEquals("a", prefix.name); |
| 1330 JUnitTestCase.assertEquals(7, prefix.offset); | 1330 JUnitTestCase.assertEquals(7, prefix.offset); |
| 1331 JUnitTestCase.assertNotNull(prefixedIdentifier.period); | 1331 JUnitTestCase.assertNotNull(prefixedIdentifier.period); |
| 1332 SimpleIdentifier identifier = prefixedIdentifier.identifier; | 1332 SimpleIdentifier identifier = prefixedIdentifier.identifier; |
| 1333 JUnitTestCase.assertNotNull(identifier.token); | 1333 JUnitTestCase.assertNotNull(identifier.token); |
| 1334 JUnitTestCase.assertEquals("b", identifier.name); | 1334 JUnitTestCase.assertEquals("b", identifier.name); |
| 1335 JUnitTestCase.assertEquals(9, identifier.offset); | 1335 JUnitTestCase.assertEquals(9, identifier.offset); |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 void test_parseCommentReference_simple() { | 1338 void test_parseCommentReference_simple() { |
| 1339 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["a", 5], ""); | 1339 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["a", 5], ""); |
| 1340 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifi
er, reference.identifier); | 1340 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj i
s SimpleIdentifier, SimpleIdentifier, reference.identifier); |
| 1341 JUnitTestCase.assertNotNull(identifier.token); | 1341 JUnitTestCase.assertNotNull(identifier.token); |
| 1342 JUnitTestCase.assertEquals("a", identifier.name); | 1342 JUnitTestCase.assertEquals("a", identifier.name); |
| 1343 JUnitTestCase.assertEquals(5, identifier.offset); | 1343 JUnitTestCase.assertEquals(5, identifier.offset); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 void test_parseCommentReference_synthetic() { | 1346 void test_parseCommentReference_synthetic() { |
| 1347 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["", 5], ""); | 1347 CommentReference reference = ParserTestCase.parse("parseCommentReference", <
Object> ["", 5], ""); |
| 1348 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(SimpleIdentifi
er, reference.identifier); | 1348 SimpleIdentifier identifier = EngineTestCase.assertInstanceOf((obj) => obj i
s SimpleIdentifier, SimpleIdentifier, reference.identifier); |
| 1349 JUnitTestCase.assertNotNull(identifier); | 1349 JUnitTestCase.assertNotNull(identifier); |
| 1350 JUnitTestCase.assertTrue(identifier.isSynthetic); | 1350 JUnitTestCase.assertTrue(identifier.isSynthetic); |
| 1351 JUnitTestCase.assertNotNull(identifier.token); | 1351 JUnitTestCase.assertNotNull(identifier.token); |
| 1352 JUnitTestCase.assertEquals("", identifier.name); | 1352 JUnitTestCase.assertEquals("", identifier.name); |
| 1353 JUnitTestCase.assertEquals(5, identifier.offset); | 1353 JUnitTestCase.assertEquals(5, identifier.offset); |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 void test_parseCommentReferences_multiLine() { | 1356 void test_parseCommentReferences_multiLine() { |
| 1357 List<Token> tokens = <Token> [new StringToken(TokenType.MULTI_LINE_COMMENT,
"/** xxx [a] yyy [b] zzz */", 3)]; | 1357 List<Token> tokens = <Token> [new StringToken(TokenType.MULTI_LINE_COMMENT,
"/** xxx [a] yyy [b] zzz */", 3)]; |
| 1358 List<CommentReference> references = ParserTestCase.parse("parseCommentRefere
nces", <Object> [tokens], ""); | 1358 List<CommentReference> references = ParserTestCase.parse("parseCommentRefere
nces", <Object> [tokens], ""); |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 void test_parseEqualityExpression_normal() { | 1946 void test_parseEqualityExpression_normal() { |
| 1947 BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression
", "x == y", []); | 1947 BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression
", "x == y", []); |
| 1948 JUnitTestCase.assertNotNull(expression.leftOperand); | 1948 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 1949 JUnitTestCase.assertNotNull(expression.operator); | 1949 JUnitTestCase.assertNotNull(expression.operator); |
| 1950 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); | 1950 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); |
| 1951 JUnitTestCase.assertNotNull(expression.rightOperand); | 1951 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 void test_parseEqualityExpression_super() { | 1954 void test_parseEqualityExpression_super() { |
| 1955 BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression
", "super == y", []); | 1955 BinaryExpression expression = ParserTestCase.parse4("parseEqualityExpression
", "super == y", []); |
| 1956 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 1956 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 1957 JUnitTestCase.assertNotNull(expression.operator); | 1957 JUnitTestCase.assertNotNull(expression.operator); |
| 1958 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); | 1958 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); |
| 1959 JUnitTestCase.assertNotNull(expression.rightOperand); | 1959 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 1960 } | 1960 } |
| 1961 | 1961 |
| 1962 void test_parseExportDirective_hide() { | 1962 void test_parseExportDirective_hide() { |
| 1963 ExportDirective directive = ParserTestCase.parse("parseExportDirective", <Ob
ject> [emptyCommentAndMetadata()], "export 'lib/lib.dart' hide A, B;"); | 1963 ExportDirective directive = ParserTestCase.parse("parseExportDirective", <Ob
ject> [emptyCommentAndMetadata()], "export 'lib/lib.dart' hide A, B;"); |
| 1964 JUnitTestCase.assertNotNull(directive.keyword); | 1964 JUnitTestCase.assertNotNull(directive.keyword); |
| 1965 JUnitTestCase.assertNotNull(directive.uri); | 1965 JUnitTestCase.assertNotNull(directive.uri); |
| 1966 EngineTestCase.assertSize(1, directive.combinators); | 1966 EngineTestCase.assertSize(1, directive.combinators); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2011 void test_parseExpression_comparison() { | 2011 void test_parseExpression_comparison() { |
| 2012 BinaryExpression expression = ParserTestCase.parse4("parseExpression", "--a.
b == c", []); | 2012 BinaryExpression expression = ParserTestCase.parse4("parseExpression", "--a.
b == c", []); |
| 2013 JUnitTestCase.assertNotNull(expression.leftOperand); | 2013 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 2014 JUnitTestCase.assertNotNull(expression.operator); | 2014 JUnitTestCase.assertNotNull(expression.operator); |
| 2015 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); | 2015 JUnitTestCase.assertEquals(TokenType.EQ_EQ, expression.operator.type); |
| 2016 JUnitTestCase.assertNotNull(expression.rightOperand); | 2016 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 void test_parseExpression_invokeFunctionExpression() { | 2019 void test_parseExpression_invokeFunctionExpression() { |
| 2020 FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpres
sion", "(a) {return a + a;} (3)", []); | 2020 FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpres
sion", "(a) {return a + a;} (3)", []); |
| 2021 EngineTestCase.assertInstanceOf(FunctionExpression, invocation.function); | 2021 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, Function
Expression, invocation.function); |
| 2022 FunctionExpression expression = invocation.function as FunctionExpression; | 2022 FunctionExpression expression = invocation.function as FunctionExpression; |
| 2023 JUnitTestCase.assertNotNull(expression.parameters); | 2023 JUnitTestCase.assertNotNull(expression.parameters); |
| 2024 JUnitTestCase.assertNotNull(expression.body); | 2024 JUnitTestCase.assertNotNull(expression.body); |
| 2025 ArgumentList list = invocation.argumentList; | 2025 ArgumentList list = invocation.argumentList; |
| 2026 JUnitTestCase.assertNotNull(list); | 2026 JUnitTestCase.assertNotNull(list); |
| 2027 EngineTestCase.assertSize(1, list.arguments); | 2027 EngineTestCase.assertSize(1, list.arguments); |
| 2028 } | 2028 } |
| 2029 | 2029 |
| 2030 void test_parseExpression_superMethodInvocation() { | 2030 void test_parseExpression_superMethodInvocation() { |
| 2031 MethodInvocation invocation = ParserTestCase.parse4("parseExpression", "supe
r.m()", []); | 2031 MethodInvocation invocation = ParserTestCase.parse4("parseExpression", "supe
r.m()", []); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 MethodInvocation invocation = ParserTestCase.parse4("parseExpressionWithoutC
ascade", "super.m()", []); | 2065 MethodInvocation invocation = ParserTestCase.parse4("parseExpressionWithoutC
ascade", "super.m()", []); |
| 2066 JUnitTestCase.assertNotNull(invocation.target); | 2066 JUnitTestCase.assertNotNull(invocation.target); |
| 2067 JUnitTestCase.assertNotNull(invocation.methodName); | 2067 JUnitTestCase.assertNotNull(invocation.methodName); |
| 2068 JUnitTestCase.assertNotNull(invocation.argumentList); | 2068 JUnitTestCase.assertNotNull(invocation.argumentList); |
| 2069 } | 2069 } |
| 2070 | 2070 |
| 2071 void test_parseExtendsClause() { | 2071 void test_parseExtendsClause() { |
| 2072 ExtendsClause clause = ParserTestCase.parse4("parseExtendsClause", "extends
B", []); | 2072 ExtendsClause clause = ParserTestCase.parse4("parseExtendsClause", "extends
B", []); |
| 2073 JUnitTestCase.assertNotNull(clause.keyword); | 2073 JUnitTestCase.assertNotNull(clause.keyword); |
| 2074 JUnitTestCase.assertNotNull(clause.superclass); | 2074 JUnitTestCase.assertNotNull(clause.superclass); |
| 2075 EngineTestCase.assertInstanceOf(TypeName, clause.superclass); | 2075 EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, clause.s
uperclass); |
| 2076 } | 2076 } |
| 2077 | 2077 |
| 2078 void test_parseFinalConstVarOrType_const_noType() { | 2078 void test_parseFinalConstVarOrType_const_noType() { |
| 2079 FinalConstVarOrType result = ParserTestCase.parse("parseFinalConstVarOrType"
, <Object> [false], "const"); | 2079 FinalConstVarOrType result = ParserTestCase.parse("parseFinalConstVarOrType"
, <Object> [false], "const"); |
| 2080 Token keyword = result.keyword; | 2080 Token keyword = result.keyword; |
| 2081 JUnitTestCase.assertNotNull(keyword); | 2081 JUnitTestCase.assertNotNull(keyword); |
| 2082 JUnitTestCase.assertEquals(TokenType.KEYWORD, keyword.type); | 2082 JUnitTestCase.assertEquals(TokenType.KEYWORD, keyword.type); |
| 2083 JUnitTestCase.assertEquals(Keyword.CONST, (keyword as KeywordToken).keyword)
; | 2083 JUnitTestCase.assertEquals(Keyword.CONST, (keyword as KeywordToken).keyword)
; |
| 2084 JUnitTestCase.assertNull(result.type); | 2084 JUnitTestCase.assertNull(result.type); |
| 2085 } | 2085 } |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 void test_parseFunctionBody_nativeFunctionBody() { | 2562 void test_parseFunctionBody_nativeFunctionBody() { |
| 2563 NativeFunctionBody functionBody = ParserTestCase.parse("parseFunctionBody",
<Object> [false, null, false], "native 'str';"); | 2563 NativeFunctionBody functionBody = ParserTestCase.parse("parseFunctionBody",
<Object> [false, null, false], "native 'str';"); |
| 2564 JUnitTestCase.assertNotNull(functionBody.nativeToken); | 2564 JUnitTestCase.assertNotNull(functionBody.nativeToken); |
| 2565 JUnitTestCase.assertNotNull(functionBody.stringLiteral); | 2565 JUnitTestCase.assertNotNull(functionBody.stringLiteral); |
| 2566 JUnitTestCase.assertNotNull(functionBody.semicolon); | 2566 JUnitTestCase.assertNotNull(functionBody.semicolon); |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 void test_parseFunctionBody_skip_block() { | 2569 void test_parseFunctionBody_skip_block() { |
| 2570 ParserTestCase._parseFunctionBodies = false; | 2570 ParserTestCase._parseFunctionBodies = false; |
| 2571 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "{}"); | 2571 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "{}"); |
| 2572 EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody); | 2572 EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunc
tionBody, functionBody); |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 void test_parseFunctionBody_skip_blocks() { | 2575 void test_parseFunctionBody_skip_blocks() { |
| 2576 ParserTestCase._parseFunctionBodies = false; | 2576 ParserTestCase._parseFunctionBodies = false; |
| 2577 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "{ {} }"); | 2577 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "{ {} }"); |
| 2578 EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody); | 2578 EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunc
tionBody, functionBody); |
| 2579 } | 2579 } |
| 2580 | 2580 |
| 2581 void test_parseFunctionBody_skip_expression() { | 2581 void test_parseFunctionBody_skip_expression() { |
| 2582 ParserTestCase._parseFunctionBodies = false; | 2582 ParserTestCase._parseFunctionBodies = false; |
| 2583 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "=> y;"); | 2583 FunctionBody functionBody = ParserTestCase.parse("parseFunctionBody", <Objec
t> [false, null, false], "=> y;"); |
| 2584 EngineTestCase.assertInstanceOf(EmptyFunctionBody, functionBody); | 2584 EngineTestCase.assertInstanceOf((obj) => obj is EmptyFunctionBody, EmptyFunc
tionBody, functionBody); |
| 2585 } | 2585 } |
| 2586 | 2586 |
| 2587 void test_parseFunctionDeclaration_function() { | 2587 void test_parseFunctionDeclaration_function() { |
| 2588 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); | 2588 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); |
| 2589 TypeName returnType = new TypeName(new SimpleIdentifier(null), null); | 2589 TypeName returnType = new TypeName(new SimpleIdentifier(null), null); |
| 2590 FunctionDeclaration declaration = ParserTestCase.parse("parseFunctionDeclara
tion", <Object> [commentAndMetadata(comment, []), null, returnType], "f() {}"); | 2590 FunctionDeclaration declaration = ParserTestCase.parse("parseFunctionDeclara
tion", <Object> [commentAndMetadata(comment, []), null, returnType], "f() {}"); |
| 2591 JUnitTestCase.assertEquals(comment, declaration.documentationComment); | 2591 JUnitTestCase.assertEquals(comment, declaration.documentationComment); |
| 2592 JUnitTestCase.assertEquals(returnType, declaration.returnType); | 2592 JUnitTestCase.assertEquals(returnType, declaration.returnType); |
| 2593 JUnitTestCase.assertNotNull(declaration.name); | 2593 JUnitTestCase.assertNotNull(declaration.name); |
| 2594 FunctionExpression expression = declaration.functionExpression; | 2594 FunctionExpression expression = declaration.functionExpression; |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3088 void test_parseMultiplicativeExpression_normal() { | 3088 void test_parseMultiplicativeExpression_normal() { |
| 3089 BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpr
ession", "x * y", []); | 3089 BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpr
ession", "x * y", []); |
| 3090 JUnitTestCase.assertNotNull(expression.leftOperand); | 3090 JUnitTestCase.assertNotNull(expression.leftOperand); |
| 3091 JUnitTestCase.assertNotNull(expression.operator); | 3091 JUnitTestCase.assertNotNull(expression.operator); |
| 3092 JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type); | 3092 JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type); |
| 3093 JUnitTestCase.assertNotNull(expression.rightOperand); | 3093 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 3094 } | 3094 } |
| 3095 | 3095 |
| 3096 void test_parseMultiplicativeExpression_super() { | 3096 void test_parseMultiplicativeExpression_super() { |
| 3097 BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpr
ession", "super * y", []); | 3097 BinaryExpression expression = ParserTestCase.parse4("parseMultiplicativeExpr
ession", "super * y", []); |
| 3098 EngineTestCase.assertInstanceOf(SuperExpression, expression.leftOperand); | 3098 EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression, SuperExpres
sion, expression.leftOperand); |
| 3099 JUnitTestCase.assertNotNull(expression.operator); | 3099 JUnitTestCase.assertNotNull(expression.operator); |
| 3100 JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type); | 3100 JUnitTestCase.assertEquals(TokenType.STAR, expression.operator.type); |
| 3101 JUnitTestCase.assertNotNull(expression.rightOperand); | 3101 JUnitTestCase.assertNotNull(expression.rightOperand); |
| 3102 } | 3102 } |
| 3103 | 3103 |
| 3104 void test_parseNewExpression() { | 3104 void test_parseNewExpression() { |
| 3105 InstanceCreationExpression expression = ParserTestCase.parse4("parseNewExpre
ssion", "new A()", []); | 3105 InstanceCreationExpression expression = ParserTestCase.parse4("parseNewExpre
ssion", "new A()", []); |
| 3106 JUnitTestCase.assertNotNull(expression.keyword); | 3106 JUnitTestCase.assertNotNull(expression.keyword); |
| 3107 ConstructorName name = expression.constructorName; | 3107 ConstructorName name = expression.constructorName; |
| 3108 JUnitTestCase.assertNotNull(name); | 3108 JUnitTestCase.assertNotNull(name); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3165 ParserTestCase.parse4("parseNonLabeledStatement", "() {}[0] = null;", []); | 3165 ParserTestCase.parse4("parseNonLabeledStatement", "() {}[0] = null;", []); |
| 3166 } | 3166 } |
| 3167 | 3167 |
| 3168 void test_parseNonLabeledStatement_functionInvocation() { | 3168 void test_parseNonLabeledStatement_functionInvocation() { |
| 3169 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "f();", []); | 3169 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "f();", []); |
| 3170 JUnitTestCase.assertNotNull(statement.expression); | 3170 JUnitTestCase.assertNotNull(statement.expression); |
| 3171 } | 3171 } |
| 3172 | 3172 |
| 3173 void test_parseNonLabeledStatement_invokeFunctionExpression() { | 3173 void test_parseNonLabeledStatement_invokeFunctionExpression() { |
| 3174 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "(a) {return a + a;} (3);", []); | 3174 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "(a) {return a + a;} (3);", []); |
| 3175 EngineTestCase.assertInstanceOf(FunctionExpressionInvocation, statement.expr
ession); | 3175 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpressionInvocation
, FunctionExpressionInvocation, statement.expression); |
| 3176 FunctionExpressionInvocation invocation = statement.expression as FunctionEx
pressionInvocation; | 3176 FunctionExpressionInvocation invocation = statement.expression as FunctionEx
pressionInvocation; |
| 3177 EngineTestCase.assertInstanceOf(FunctionExpression, invocation.function); | 3177 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, Function
Expression, invocation.function); |
| 3178 FunctionExpression expression = invocation.function as FunctionExpression; | 3178 FunctionExpression expression = invocation.function as FunctionExpression; |
| 3179 JUnitTestCase.assertNotNull(expression.parameters); | 3179 JUnitTestCase.assertNotNull(expression.parameters); |
| 3180 JUnitTestCase.assertNotNull(expression.body); | 3180 JUnitTestCase.assertNotNull(expression.body); |
| 3181 ArgumentList list = invocation.argumentList; | 3181 ArgumentList list = invocation.argumentList; |
| 3182 JUnitTestCase.assertNotNull(list); | 3182 JUnitTestCase.assertNotNull(list); |
| 3183 EngineTestCase.assertSize(1, list.arguments); | 3183 EngineTestCase.assertSize(1, list.arguments); |
| 3184 } | 3184 } |
| 3185 | 3185 |
| 3186 void test_parseNonLabeledStatement_null() { | 3186 void test_parseNonLabeledStatement_null() { |
| 3187 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "null;", []); | 3187 ExpressionStatement statement = ParserTestCase.parse4("parseNonLabeledStatem
ent", "null;", []); |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4235 JUnitTestCase.assertNotNull(declaration.initializer); | 4235 JUnitTestCase.assertNotNull(declaration.initializer); |
| 4236 } | 4236 } |
| 4237 | 4237 |
| 4238 void test_parseVariableDeclaration_noEquals() { | 4238 void test_parseVariableDeclaration_noEquals() { |
| 4239 VariableDeclaration declaration = ParserTestCase.parse4("parseVariableDeclar
ation", "a", []); | 4239 VariableDeclaration declaration = ParserTestCase.parse4("parseVariableDeclar
ation", "a", []); |
| 4240 JUnitTestCase.assertNotNull(declaration.name); | 4240 JUnitTestCase.assertNotNull(declaration.name); |
| 4241 JUnitTestCase.assertNull(declaration.equals); | 4241 JUnitTestCase.assertNull(declaration.equals); |
| 4242 JUnitTestCase.assertNull(declaration.initializer); | 4242 JUnitTestCase.assertNull(declaration.initializer); |
| 4243 } | 4243 } |
| 4244 | 4244 |
| 4245 void test_parseVariableDeclarationList_const_noType() { | 4245 void test_parseVariableDeclarationListAfterMetadata_const_noType() { |
| 4246 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "const a"); | 4246 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "const a")
; |
| 4247 JUnitTestCase.assertNotNull(declarationList.keyword); | 4247 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4248 JUnitTestCase.assertNull(declarationList.type); | 4248 JUnitTestCase.assertNull(declarationList.type); |
| 4249 EngineTestCase.assertSize(1, declarationList.variables); | 4249 EngineTestCase.assertSize(1, declarationList.variables); |
| 4250 } | 4250 } |
| 4251 | 4251 |
| 4252 void test_parseVariableDeclarationList_const_type() { | 4252 void test_parseVariableDeclarationListAfterMetadata_const_type() { |
| 4253 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "const A a"); | 4253 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "const A a
"); |
| 4254 JUnitTestCase.assertNotNull(declarationList.keyword); | 4254 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4255 JUnitTestCase.assertNotNull(declarationList.type); | 4255 JUnitTestCase.assertNotNull(declarationList.type); |
| 4256 EngineTestCase.assertSize(1, declarationList.variables); | 4256 EngineTestCase.assertSize(1, declarationList.variables); |
| 4257 } | 4257 } |
| 4258 | 4258 |
| 4259 void test_parseVariableDeclarationList_final_noType() { | 4259 void test_parseVariableDeclarationListAfterMetadata_final_noType() { |
| 4260 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "final a"); | 4260 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "final a")
; |
| 4261 JUnitTestCase.assertNotNull(declarationList.keyword); | 4261 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4262 JUnitTestCase.assertNull(declarationList.type); | 4262 JUnitTestCase.assertNull(declarationList.type); |
| 4263 EngineTestCase.assertSize(1, declarationList.variables); | 4263 EngineTestCase.assertSize(1, declarationList.variables); |
| 4264 } | 4264 } |
| 4265 | 4265 |
| 4266 void test_parseVariableDeclarationList_final_type() { | 4266 void test_parseVariableDeclarationListAfterMetadata_final_type() { |
| 4267 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "final A a"); | 4267 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "final A a
"); |
| 4268 JUnitTestCase.assertNotNull(declarationList.keyword); | 4268 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4269 JUnitTestCase.assertNotNull(declarationList.type); | 4269 JUnitTestCase.assertNotNull(declarationList.type); |
| 4270 EngineTestCase.assertSize(1, declarationList.variables); | 4270 EngineTestCase.assertSize(1, declarationList.variables); |
| 4271 } | 4271 } |
| 4272 | 4272 |
| 4273 void test_parseVariableDeclarationList_type_multiple() { | 4273 void test_parseVariableDeclarationListAfterMetadata_type_multiple() { |
| 4274 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "A a, b, c"); | 4274 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "A a, b, c
"); |
| 4275 JUnitTestCase.assertNull(declarationList.keyword); | 4275 JUnitTestCase.assertNull(declarationList.keyword); |
| 4276 JUnitTestCase.assertNotNull(declarationList.type); | 4276 JUnitTestCase.assertNotNull(declarationList.type); |
| 4277 EngineTestCase.assertSize(3, declarationList.variables); | 4277 EngineTestCase.assertSize(3, declarationList.variables); |
| 4278 } | 4278 } |
| 4279 | 4279 |
| 4280 void test_parseVariableDeclarationList_type_single() { | 4280 void test_parseVariableDeclarationListAfterMetadata_type_single() { |
| 4281 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "A a"); | 4281 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "A a"); |
| 4282 JUnitTestCase.assertNull(declarationList.keyword); | 4282 JUnitTestCase.assertNull(declarationList.keyword); |
| 4283 JUnitTestCase.assertNotNull(declarationList.type); | 4283 JUnitTestCase.assertNotNull(declarationList.type); |
| 4284 EngineTestCase.assertSize(1, declarationList.variables); | 4284 EngineTestCase.assertSize(1, declarationList.variables); |
| 4285 } | 4285 } |
| 4286 | 4286 |
| 4287 void test_parseVariableDeclarationList_var_multiple() { | 4287 void test_parseVariableDeclarationListAfterMetadata_var_multiple() { |
| 4288 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "var a, b, c"); | 4288 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "var a, b,
c"); |
| 4289 JUnitTestCase.assertNotNull(declarationList.keyword); | 4289 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4290 JUnitTestCase.assertNull(declarationList.type); | 4290 JUnitTestCase.assertNull(declarationList.type); |
| 4291 EngineTestCase.assertSize(3, declarationList.variables); | 4291 EngineTestCase.assertSize(3, declarationList.variables); |
| 4292 } | 4292 } |
| 4293 | 4293 |
| 4294 void test_parseVariableDeclarationList_var_single() { | 4294 void test_parseVariableDeclarationListAfterMetadata_var_single() { |
| 4295 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata()], "var a"); | 4295 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterMetadata", <Object> [emptyCommentAndMetadata()], "var a"); |
| 4296 JUnitTestCase.assertNotNull(declarationList.keyword); | 4296 JUnitTestCase.assertNotNull(declarationList.keyword); |
| 4297 JUnitTestCase.assertNull(declarationList.type); | 4297 JUnitTestCase.assertNull(declarationList.type); |
| 4298 EngineTestCase.assertSize(1, declarationList.variables); | 4298 EngineTestCase.assertSize(1, declarationList.variables); |
| 4299 } | 4299 } |
| 4300 | 4300 |
| 4301 void test_parseVariableDeclarationList2_type() { | 4301 void test_parseVariableDeclarationListAfterType_type() { |
| 4302 TypeName type = new TypeName(new SimpleIdentifier(null), null); | 4302 TypeName type = new TypeName(new SimpleIdentifier(null), null); |
| 4303 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata(), null, type], "a"); | 4303 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterType", <Object> [emptyCommentAndMetadata(), null, type], "a
"); |
| 4304 JUnitTestCase.assertNull(declarationList.keyword); | 4304 JUnitTestCase.assertNull(declarationList.keyword); |
| 4305 JUnitTestCase.assertEquals(type, declarationList.type); | 4305 JUnitTestCase.assertEquals(type, declarationList.type); |
| 4306 EngineTestCase.assertSize(1, declarationList.variables); | 4306 EngineTestCase.assertSize(1, declarationList.variables); |
| 4307 } | 4307 } |
| 4308 | 4308 |
| 4309 void test_parseVariableDeclarationList2_var() { | 4309 void test_parseVariableDeclarationListAfterType_var() { |
| 4310 Token keyword = TokenFactory.token(Keyword.VAR); | 4310 Token keyword = TokenFactory.token(Keyword.VAR); |
| 4311 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationList", <Object> [emptyCommentAndMetadata(), keyword, null], "a, b, c
"); | 4311 VariableDeclarationList declarationList = ParserTestCase.parse("parseVariabl
eDeclarationListAfterType", <Object> [emptyCommentAndMetadata(), keyword, null],
"a, b, c"); |
| 4312 JUnitTestCase.assertEquals(keyword, declarationList.keyword); | 4312 JUnitTestCase.assertEquals(keyword, declarationList.keyword); |
| 4313 JUnitTestCase.assertNull(declarationList.type); | 4313 JUnitTestCase.assertNull(declarationList.type); |
| 4314 EngineTestCase.assertSize(3, declarationList.variables); | 4314 EngineTestCase.assertSize(3, declarationList.variables); |
| 4315 } | 4315 } |
| 4316 | 4316 |
| 4317 void test_parseVariableDeclarationStatement_multiple() { | 4317 void test_parseVariableDeclarationStatementAfterMetadata_multiple() { |
| 4318 VariableDeclarationStatement statement = ParserTestCase.parse("parseVariable
DeclarationStatement", <Object> [emptyCommentAndMetadata()], "var x, y, z;"); | 4318 VariableDeclarationStatement statement = ParserTestCase.parse("parseVariable
DeclarationStatementAfterMetadata", <Object> [emptyCommentAndMetadata()], "var x
, y, z;"); |
| 4319 JUnitTestCase.assertNotNull(statement.semicolon); | 4319 JUnitTestCase.assertNotNull(statement.semicolon); |
| 4320 VariableDeclarationList variableList = statement.variables; | 4320 VariableDeclarationList variableList = statement.variables; |
| 4321 JUnitTestCase.assertNotNull(variableList); | 4321 JUnitTestCase.assertNotNull(variableList); |
| 4322 EngineTestCase.assertSize(3, variableList.variables); | 4322 EngineTestCase.assertSize(3, variableList.variables); |
| 4323 } | 4323 } |
| 4324 | 4324 |
| 4325 void test_parseVariableDeclarationStatement_single() { | 4325 void test_parseVariableDeclarationStatementAfterMetadata_single() { |
| 4326 VariableDeclarationStatement statement = ParserTestCase.parse("parseVariable
DeclarationStatement", <Object> [emptyCommentAndMetadata()], "var x;"); | 4326 VariableDeclarationStatement statement = ParserTestCase.parse("parseVariable
DeclarationStatementAfterMetadata", <Object> [emptyCommentAndMetadata()], "var x
;"); |
| 4327 JUnitTestCase.assertNotNull(statement.semicolon); | 4327 JUnitTestCase.assertNotNull(statement.semicolon); |
| 4328 VariableDeclarationList variableList = statement.variables; | 4328 VariableDeclarationList variableList = statement.variables; |
| 4329 JUnitTestCase.assertNotNull(variableList); | 4329 JUnitTestCase.assertNotNull(variableList); |
| 4330 EngineTestCase.assertSize(1, variableList.variables); | 4330 EngineTestCase.assertSize(1, variableList.variables); |
| 4331 } | 4331 } |
| 4332 | 4332 |
| 4333 void test_parseWhileStatement() { | 4333 void test_parseWhileStatement() { |
| 4334 WhileStatement statement = ParserTestCase.parse4("parseWhileStatement", "whi
le (x) {}", []); | 4334 WhileStatement statement = ParserTestCase.parse4("parseWhileStatement", "whi
le (x) {}", []); |
| 4335 JUnitTestCase.assertNotNull(statement.keyword); | 4335 JUnitTestCase.assertNotNull(statement.keyword); |
| 4336 JUnitTestCase.assertNotNull(statement.leftParenthesis); | 4336 JUnitTestCase.assertNotNull(statement.leftParenthesis); |
| (...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6620 runJUnitTest(__test, __test.test_parseUnaryExpression_not_super); | 6620 runJUnitTest(__test, __test.test_parseUnaryExpression_not_super); |
| 6621 }); | 6621 }); |
| 6622 _ut.test('test_parseUnaryExpression_tilda_normal', () { | 6622 _ut.test('test_parseUnaryExpression_tilda_normal', () { |
| 6623 final __test = new SimpleParserTest(); | 6623 final __test = new SimpleParserTest(); |
| 6624 runJUnitTest(__test, __test.test_parseUnaryExpression_tilda_normal); | 6624 runJUnitTest(__test, __test.test_parseUnaryExpression_tilda_normal); |
| 6625 }); | 6625 }); |
| 6626 _ut.test('test_parseUnaryExpression_tilda_super', () { | 6626 _ut.test('test_parseUnaryExpression_tilda_super', () { |
| 6627 final __test = new SimpleParserTest(); | 6627 final __test = new SimpleParserTest(); |
| 6628 runJUnitTest(__test, __test.test_parseUnaryExpression_tilda_super); | 6628 runJUnitTest(__test, __test.test_parseUnaryExpression_tilda_super); |
| 6629 }); | 6629 }); |
| 6630 _ut.test('test_parseVariableDeclarationList2_type', () { | 6630 _ut.test('test_parseVariableDeclarationListAfterMetadata_const_noType', ()
{ |
| 6631 final __test = new SimpleParserTest(); | 6631 final __test = new SimpleParserTest(); |
| 6632 runJUnitTest(__test, __test.test_parseVariableDeclarationList2_type); | 6632 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_const_noType); |
| 6633 }); | 6633 }); |
| 6634 _ut.test('test_parseVariableDeclarationList2_var', () { | 6634 _ut.test('test_parseVariableDeclarationListAfterMetadata_const_type', () { |
| 6635 final __test = new SimpleParserTest(); | 6635 final __test = new SimpleParserTest(); |
| 6636 runJUnitTest(__test, __test.test_parseVariableDeclarationList2_var); | 6636 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_const_type); |
| 6637 }); | 6637 }); |
| 6638 _ut.test('test_parseVariableDeclarationList_const_noType', () { | 6638 _ut.test('test_parseVariableDeclarationListAfterMetadata_final_noType', ()
{ |
| 6639 final __test = new SimpleParserTest(); | 6639 final __test = new SimpleParserTest(); |
| 6640 runJUnitTest(__test, __test.test_parseVariableDeclarationList_const_noTy
pe); | 6640 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_final_noType); |
| 6641 }); | 6641 }); |
| 6642 _ut.test('test_parseVariableDeclarationList_const_type', () { | 6642 _ut.test('test_parseVariableDeclarationListAfterMetadata_final_type', () { |
| 6643 final __test = new SimpleParserTest(); | 6643 final __test = new SimpleParserTest(); |
| 6644 runJUnitTest(__test, __test.test_parseVariableDeclarationList_const_type
); | 6644 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_final_type); |
| 6645 }); | 6645 }); |
| 6646 _ut.test('test_parseVariableDeclarationList_final_noType', () { | 6646 _ut.test('test_parseVariableDeclarationListAfterMetadata_type_multiple', (
) { |
| 6647 final __test = new SimpleParserTest(); | 6647 final __test = new SimpleParserTest(); |
| 6648 runJUnitTest(__test, __test.test_parseVariableDeclarationList_final_noTy
pe); | 6648 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_type_multiple); |
| 6649 }); | 6649 }); |
| 6650 _ut.test('test_parseVariableDeclarationList_final_type', () { | 6650 _ut.test('test_parseVariableDeclarationListAfterMetadata_type_single', ()
{ |
| 6651 final __test = new SimpleParserTest(); | 6651 final __test = new SimpleParserTest(); |
| 6652 runJUnitTest(__test, __test.test_parseVariableDeclarationList_final_type
); | 6652 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_type_single); |
| 6653 }); | 6653 }); |
| 6654 _ut.test('test_parseVariableDeclarationList_type_multiple', () { | 6654 _ut.test('test_parseVariableDeclarationListAfterMetadata_var_multiple', ()
{ |
| 6655 final __test = new SimpleParserTest(); | 6655 final __test = new SimpleParserTest(); |
| 6656 runJUnitTest(__test, __test.test_parseVariableDeclarationList_type_multi
ple); | 6656 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_var_multiple); |
| 6657 }); | 6657 }); |
| 6658 _ut.test('test_parseVariableDeclarationList_type_single', () { | 6658 _ut.test('test_parseVariableDeclarationListAfterMetadata_var_single', () { |
| 6659 final __test = new SimpleParserTest(); | 6659 final __test = new SimpleParserTest(); |
| 6660 runJUnitTest(__test, __test.test_parseVariableDeclarationList_type_singl
e); | 6660 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterMetada
ta_var_single); |
| 6661 }); | 6661 }); |
| 6662 _ut.test('test_parseVariableDeclarationList_var_multiple', () { | 6662 _ut.test('test_parseVariableDeclarationListAfterType_type', () { |
| 6663 final __test = new SimpleParserTest(); | 6663 final __test = new SimpleParserTest(); |
| 6664 runJUnitTest(__test, __test.test_parseVariableDeclarationList_var_multip
le); | 6664 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterType_t
ype); |
| 6665 }); | 6665 }); |
| 6666 _ut.test('test_parseVariableDeclarationList_var_single', () { | 6666 _ut.test('test_parseVariableDeclarationListAfterType_var', () { |
| 6667 final __test = new SimpleParserTest(); | 6667 final __test = new SimpleParserTest(); |
| 6668 runJUnitTest(__test, __test.test_parseVariableDeclarationList_var_single
); | 6668 runJUnitTest(__test, __test.test_parseVariableDeclarationListAfterType_v
ar); |
| 6669 }); | 6669 }); |
| 6670 _ut.test('test_parseVariableDeclarationStatement_multiple', () { | 6670 _ut.test('test_parseVariableDeclarationStatementAfterMetadata_multiple', (
) { |
| 6671 final __test = new SimpleParserTest(); | 6671 final __test = new SimpleParserTest(); |
| 6672 runJUnitTest(__test, __test.test_parseVariableDeclarationStatement_multi
ple); | 6672 runJUnitTest(__test, __test.test_parseVariableDeclarationStatementAfterM
etadata_multiple); |
| 6673 }); | 6673 }); |
| 6674 _ut.test('test_parseVariableDeclarationStatement_single', () { | 6674 _ut.test('test_parseVariableDeclarationStatementAfterMetadata_single', ()
{ |
| 6675 final __test = new SimpleParserTest(); | 6675 final __test = new SimpleParserTest(); |
| 6676 runJUnitTest(__test, __test.test_parseVariableDeclarationStatement_singl
e); | 6676 runJUnitTest(__test, __test.test_parseVariableDeclarationStatementAfterM
etadata_single); |
| 6677 }); | 6677 }); |
| 6678 _ut.test('test_parseVariableDeclaration_equals', () { | 6678 _ut.test('test_parseVariableDeclaration_equals', () { |
| 6679 final __test = new SimpleParserTest(); | 6679 final __test = new SimpleParserTest(); |
| 6680 runJUnitTest(__test, __test.test_parseVariableDeclaration_equals); | 6680 runJUnitTest(__test, __test.test_parseVariableDeclaration_equals); |
| 6681 }); | 6681 }); |
| 6682 _ut.test('test_parseVariableDeclaration_noEquals', () { | 6682 _ut.test('test_parseVariableDeclaration_noEquals', () { |
| 6683 final __test = new SimpleParserTest(); | 6683 final __test = new SimpleParserTest(); |
| 6684 runJUnitTest(__test, __test.test_parseVariableDeclaration_noEquals); | 6684 runJUnitTest(__test, __test.test_parseVariableDeclaration_noEquals); |
| 6685 }); | 6685 }); |
| 6686 _ut.test('test_parseWhileStatement', () { | 6686 _ut.test('test_parseWhileStatement', () { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6799 /** | 6799 /** |
| 6800 * The class `ComplexParserTest` defines parser tests that test the parsing of m
ore complex | 6800 * The class `ComplexParserTest` defines parser tests that test the parsing of m
ore complex |
| 6801 * code fragments or the interactions between multiple parsing methods. For exam
ple, tests to ensure | 6801 * code fragments or the interactions between multiple parsing methods. For exam
ple, tests to ensure |
| 6802 * that the precedence of operations is being handled correctly should be define
d in this class. | 6802 * that the precedence of operations is being handled correctly should be define
d in this class. |
| 6803 * | 6803 * |
| 6804 * Simpler tests should be defined in the class [SimpleParserTest]. | 6804 * Simpler tests should be defined in the class [SimpleParserTest]. |
| 6805 */ | 6805 */ |
| 6806 class ComplexParserTest extends ParserTestCase { | 6806 class ComplexParserTest extends ParserTestCase { |
| 6807 void test_additiveExpression_normal() { | 6807 void test_additiveExpression_normal() { |
| 6808 BinaryExpression expression = ParserTestCase.parseExpression("x + y - z", []
); | 6808 BinaryExpression expression = ParserTestCase.parseExpression("x + y - z", []
); |
| 6809 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6809 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6810 } | 6810 } |
| 6811 | 6811 |
| 6812 void test_additiveExpression_noSpaces() { | 6812 void test_additiveExpression_noSpaces() { |
| 6813 BinaryExpression expression = ParserTestCase.parseExpression("i+1", []); | 6813 BinaryExpression expression = ParserTestCase.parseExpression("i+1", []); |
| 6814 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 6814 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 6815 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightOperand); | 6815 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, expression.rightOperand); |
| 6816 } | 6816 } |
| 6817 | 6817 |
| 6818 void test_additiveExpression_precedence_multiplicative_left() { | 6818 void test_additiveExpression_precedence_multiplicative_left() { |
| 6819 BinaryExpression expression = ParserTestCase.parseExpression("x * y + z", []
); | 6819 BinaryExpression expression = ParserTestCase.parseExpression("x * y + z", []
); |
| 6820 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6820 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6821 } | 6821 } |
| 6822 | 6822 |
| 6823 void test_additiveExpression_precedence_multiplicative_left_withSuper() { | 6823 void test_additiveExpression_precedence_multiplicative_left_withSuper() { |
| 6824 BinaryExpression expression = ParserTestCase.parseExpression("super * y - z"
, []); | 6824 BinaryExpression expression = ParserTestCase.parseExpression("super * y - z"
, []); |
| 6825 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6825 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6826 } | 6826 } |
| 6827 | 6827 |
| 6828 void test_additiveExpression_precedence_multiplicative_right() { | 6828 void test_additiveExpression_precedence_multiplicative_right() { |
| 6829 BinaryExpression expression = ParserTestCase.parseExpression("x + y * z", []
); | 6829 BinaryExpression expression = ParserTestCase.parseExpression("x + y * z", []
); |
| 6830 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 6830 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 6831 } | 6831 } |
| 6832 | 6832 |
| 6833 void test_additiveExpression_super() { | 6833 void test_additiveExpression_super() { |
| 6834 BinaryExpression expression = ParserTestCase.parseExpression("super + y - z"
, []); | 6834 BinaryExpression expression = ParserTestCase.parseExpression("super + y - z"
, []); |
| 6835 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6835 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6836 } | 6836 } |
| 6837 | 6837 |
| 6838 void test_assignableExpression_arguments_normal_chain() { | 6838 void test_assignableExpression_arguments_normal_chain() { |
| 6839 PropertyAccess propertyAccess1 = ParserTestCase.parseExpression("a(b)(c).d(e
).f", []); | 6839 PropertyAccess propertyAccess1 = ParserTestCase.parseExpression("a(b)(c).d(e
).f", []); |
| 6840 JUnitTestCase.assertEquals("f", propertyAccess1.propertyName.name); | 6840 JUnitTestCase.assertEquals("f", propertyAccess1.propertyName.name); |
| 6841 // | 6841 // |
| 6842 // a(b)(c).d(e) | 6842 // a(b)(c).d(e) |
| 6843 // | 6843 // |
| 6844 MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(MethodInvocat
ion, propertyAccess1.target); | 6844 MethodInvocation invocation2 = EngineTestCase.assertInstanceOf((obj) => obj
is MethodInvocation, MethodInvocation, propertyAccess1.target); |
| 6845 JUnitTestCase.assertEquals("d", invocation2.methodName.name); | 6845 JUnitTestCase.assertEquals("d", invocation2.methodName.name); |
| 6846 ArgumentList argumentList2 = invocation2.argumentList; | 6846 ArgumentList argumentList2 = invocation2.argumentList; |
| 6847 JUnitTestCase.assertNotNull(argumentList2); | 6847 JUnitTestCase.assertNotNull(argumentList2); |
| 6848 EngineTestCase.assertSize(1, argumentList2.arguments); | 6848 EngineTestCase.assertSize(1, argumentList2.arguments); |
| 6849 // | 6849 // |
| 6850 // a(b)(c) | 6850 // a(b)(c) |
| 6851 // | 6851 // |
| 6852 FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(F
unctionExpressionInvocation, invocation2.target); | 6852 FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf((
obj) => obj is FunctionExpressionInvocation, FunctionExpressionInvocation, invoc
ation2.target); |
| 6853 ArgumentList argumentList3 = invocation3.argumentList; | 6853 ArgumentList argumentList3 = invocation3.argumentList; |
| 6854 JUnitTestCase.assertNotNull(argumentList3); | 6854 JUnitTestCase.assertNotNull(argumentList3); |
| 6855 EngineTestCase.assertSize(1, argumentList3.arguments); | 6855 EngineTestCase.assertSize(1, argumentList3.arguments); |
| 6856 // | 6856 // |
| 6857 // a(b) | 6857 // a(b) |
| 6858 // | 6858 // |
| 6859 MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(MethodInvocat
ion, invocation3.function); | 6859 MethodInvocation invocation4 = EngineTestCase.assertInstanceOf((obj) => obj
is MethodInvocation, MethodInvocation, invocation3.function); |
| 6860 JUnitTestCase.assertEquals("a", invocation4.methodName.name); | 6860 JUnitTestCase.assertEquals("a", invocation4.methodName.name); |
| 6861 ArgumentList argumentList4 = invocation4.argumentList; | 6861 ArgumentList argumentList4 = invocation4.argumentList; |
| 6862 JUnitTestCase.assertNotNull(argumentList4); | 6862 JUnitTestCase.assertNotNull(argumentList4); |
| 6863 EngineTestCase.assertSize(1, argumentList4.arguments); | 6863 EngineTestCase.assertSize(1, argumentList4.arguments); |
| 6864 } | 6864 } |
| 6865 | 6865 |
| 6866 void test_assignmentExpression_compound() { | 6866 void test_assignmentExpression_compound() { |
| 6867 AssignmentExpression expression = ParserTestCase.parseExpression("x = y = 0"
, []); | 6867 AssignmentExpression expression = ParserTestCase.parseExpression("x = y = 0"
, []); |
| 6868 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide); | 6868 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftHandSide); |
| 6869 EngineTestCase.assertInstanceOf(AssignmentExpression, expression.rightHandSi
de); | 6869 EngineTestCase.assertInstanceOf((obj) => obj is AssignmentExpression, Assign
mentExpression, expression.rightHandSide); |
| 6870 } | 6870 } |
| 6871 | 6871 |
| 6872 void test_assignmentExpression_indexExpression() { | 6872 void test_assignmentExpression_indexExpression() { |
| 6873 AssignmentExpression expression = ParserTestCase.parseExpression("x[1] = 0",
[]); | 6873 AssignmentExpression expression = ParserTestCase.parseExpression("x[1] = 0",
[]); |
| 6874 EngineTestCase.assertInstanceOf(IndexExpression, expression.leftHandSide); | 6874 EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpres
sion, expression.leftHandSide); |
| 6875 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide); | 6875 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, expression.rightHandSide); |
| 6876 } | 6876 } |
| 6877 | 6877 |
| 6878 void test_assignmentExpression_prefixedIdentifier() { | 6878 void test_assignmentExpression_prefixedIdentifier() { |
| 6879 AssignmentExpression expression = ParserTestCase.parseExpression("x.y = 0",
[]); | 6879 AssignmentExpression expression = ParserTestCase.parseExpression("x.y = 0",
[]); |
| 6880 EngineTestCase.assertInstanceOf(PrefixedIdentifier, expression.leftHandSide)
; | 6880 EngineTestCase.assertInstanceOf((obj) => obj is PrefixedIdentifier, Prefixed
Identifier, expression.leftHandSide); |
| 6881 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide); | 6881 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, expression.rightHandSide); |
| 6882 } | 6882 } |
| 6883 | 6883 |
| 6884 void test_assignmentExpression_propertyAccess() { | 6884 void test_assignmentExpression_propertyAccess() { |
| 6885 AssignmentExpression expression = ParserTestCase.parseExpression("super.y =
0", []); | 6885 AssignmentExpression expression = ParserTestCase.parseExpression("super.y =
0", []); |
| 6886 EngineTestCase.assertInstanceOf(PropertyAccess, expression.leftHandSide); | 6886 EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccess, PropertyAcce
ss, expression.leftHandSide); |
| 6887 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide); | 6887 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, expression.rightHandSide); |
| 6888 } | 6888 } |
| 6889 | 6889 |
| 6890 void test_bitwiseAndExpression_normal() { | 6890 void test_bitwiseAndExpression_normal() { |
| 6891 BinaryExpression expression = ParserTestCase.parseExpression("x & y & z", []
); | 6891 BinaryExpression expression = ParserTestCase.parseExpression("x & y & z", []
); |
| 6892 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6892 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6893 } | 6893 } |
| 6894 | 6894 |
| 6895 void test_bitwiseAndExpression_precedence_equality_left() { | 6895 void test_bitwiseAndExpression_precedence_equality_left() { |
| 6896 BinaryExpression expression = ParserTestCase.parseExpression("x == y && z",
[]); | 6896 BinaryExpression expression = ParserTestCase.parseExpression("x == y && z",
[]); |
| 6897 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6897 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6898 } | 6898 } |
| 6899 | 6899 |
| 6900 void test_bitwiseAndExpression_precedence_equality_right() { | 6900 void test_bitwiseAndExpression_precedence_equality_right() { |
| 6901 BinaryExpression expression = ParserTestCase.parseExpression("x && y == z",
[]); | 6901 BinaryExpression expression = ParserTestCase.parseExpression("x && y == z",
[]); |
| 6902 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 6902 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 6903 } | 6903 } |
| 6904 | 6904 |
| 6905 void test_bitwiseAndExpression_super() { | 6905 void test_bitwiseAndExpression_super() { |
| 6906 BinaryExpression expression = ParserTestCase.parseExpression("super & y & z"
, []); | 6906 BinaryExpression expression = ParserTestCase.parseExpression("super & y & z"
, []); |
| 6907 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6907 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6908 } | 6908 } |
| 6909 | 6909 |
| 6910 void test_bitwiseOrExpression_normal() { | 6910 void test_bitwiseOrExpression_normal() { |
| 6911 BinaryExpression expression = ParserTestCase.parseExpression("x | y | z", []
); | 6911 BinaryExpression expression = ParserTestCase.parseExpression("x | y | z", []
); |
| 6912 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6912 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6913 } | 6913 } |
| 6914 | 6914 |
| 6915 void test_bitwiseOrExpression_precedence_xor_left() { | 6915 void test_bitwiseOrExpression_precedence_xor_left() { |
| 6916 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y | z", []
); | 6916 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y | z", []
); |
| 6917 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6917 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6918 } | 6918 } |
| 6919 | 6919 |
| 6920 void test_bitwiseOrExpression_precedence_xor_right() { | 6920 void test_bitwiseOrExpression_precedence_xor_right() { |
| 6921 BinaryExpression expression = ParserTestCase.parseExpression("x | y ^ z", []
); | 6921 BinaryExpression expression = ParserTestCase.parseExpression("x | y ^ z", []
); |
| 6922 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 6922 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 6923 } | 6923 } |
| 6924 | 6924 |
| 6925 void test_bitwiseOrExpression_super() { | 6925 void test_bitwiseOrExpression_super() { |
| 6926 BinaryExpression expression = ParserTestCase.parseExpression("super | y | z"
, []); | 6926 BinaryExpression expression = ParserTestCase.parseExpression("super | y | z"
, []); |
| 6927 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6927 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6928 } | 6928 } |
| 6929 | 6929 |
| 6930 void test_bitwiseXorExpression_normal() { | 6930 void test_bitwiseXorExpression_normal() { |
| 6931 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y ^ z", []
); | 6931 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y ^ z", []
); |
| 6932 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6932 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6933 } | 6933 } |
| 6934 | 6934 |
| 6935 void test_bitwiseXorExpression_precedence_and_left() { | 6935 void test_bitwiseXorExpression_precedence_and_left() { |
| 6936 BinaryExpression expression = ParserTestCase.parseExpression("x & y ^ z", []
); | 6936 BinaryExpression expression = ParserTestCase.parseExpression("x & y ^ z", []
); |
| 6937 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6937 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6938 } | 6938 } |
| 6939 | 6939 |
| 6940 void test_bitwiseXorExpression_precedence_and_right() { | 6940 void test_bitwiseXorExpression_precedence_and_right() { |
| 6941 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y & z", []
); | 6941 BinaryExpression expression = ParserTestCase.parseExpression("x ^ y & z", []
); |
| 6942 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 6942 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 6943 } | 6943 } |
| 6944 | 6944 |
| 6945 void test_bitwiseXorExpression_super() { | 6945 void test_bitwiseXorExpression_super() { |
| 6946 BinaryExpression expression = ParserTestCase.parseExpression("super ^ y ^ z"
, []); | 6946 BinaryExpression expression = ParserTestCase.parseExpression("super ^ y ^ z"
, []); |
| 6947 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6947 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6948 } | 6948 } |
| 6949 | 6949 |
| 6950 void test_cascade_withAssignment() { | 6950 void test_cascade_withAssignment() { |
| 6951 CascadeExpression cascade = ParserTestCase.parseExpression("new Map()..[3] =
4 ..[0] = 11;", []); | 6951 CascadeExpression cascade = ParserTestCase.parseExpression("new Map()..[3] =
4 ..[0] = 11;", []); |
| 6952 Expression target = cascade.target; | 6952 Expression target = cascade.target; |
| 6953 for (Expression section in cascade.cascadeSections) { | 6953 for (Expression section in cascade.cascadeSections) { |
| 6954 EngineTestCase.assertInstanceOf(AssignmentExpression, section); | 6954 EngineTestCase.assertInstanceOf((obj) => obj is AssignmentExpression, Assi
gnmentExpression, section); |
| 6955 Expression lhs = (section as AssignmentExpression).leftHandSide; | 6955 Expression lhs = (section as AssignmentExpression).leftHandSide; |
| 6956 EngineTestCase.assertInstanceOf(IndexExpression, lhs); | 6956 EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression, IndexExpr
ession, lhs); |
| 6957 IndexExpression index = lhs as IndexExpression; | 6957 IndexExpression index = lhs as IndexExpression; |
| 6958 JUnitTestCase.assertTrue(index.isCascaded); | 6958 JUnitTestCase.assertTrue(index.isCascaded); |
| 6959 JUnitTestCase.assertSame(target, index.realTarget); | 6959 JUnitTestCase.assertSame(target, index.realTarget); |
| 6960 } | 6960 } |
| 6961 } | 6961 } |
| 6962 | 6962 |
| 6963 void test_conditionalExpression_precedence_logicalOrExpression() { | 6963 void test_conditionalExpression_precedence_logicalOrExpression() { |
| 6964 ConditionalExpression expression = ParserTestCase.parseExpression("a | b ? y
: z", []); | 6964 ConditionalExpression expression = ParserTestCase.parseExpression("a | b ? y
: z", []); |
| 6965 EngineTestCase.assertInstanceOf(BinaryExpression, expression.condition); | 6965 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.condition); |
| 6966 } | 6966 } |
| 6967 | 6967 |
| 6968 void test_constructor_initializer_withParenthesizedExpression() { | 6968 void test_constructor_initializer_withParenthesizedExpression() { |
| 6969 CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.cr
eateSource([ | 6969 CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.cr
eateSource([ |
| 6970 "class C {", | 6970 "class C {", |
| 6971 " C() :", | 6971 " C() :", |
| 6972 " this.a = (b == null ? c : d) {", | 6972 " this.a = (b == null ? c : d) {", |
| 6973 " }", | 6973 " }", |
| 6974 "}"]), []); | 6974 "}"]), []); |
| 6975 NodeList<CompilationUnitMember> declarations = unit.declarations; | 6975 NodeList<CompilationUnitMember> declarations = unit.declarations; |
| 6976 EngineTestCase.assertSize(1, declarations); | 6976 EngineTestCase.assertSize(1, declarations); |
| 6977 } | 6977 } |
| 6978 | 6978 |
| 6979 void test_equalityExpression_normal() { | 6979 void test_equalityExpression_normal() { |
| 6980 BinaryExpression expression = ParserTestCase.parseExpression("x == y != z",
[ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); | 6980 BinaryExpression expression = ParserTestCase.parseExpression("x == y != z",
[ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); |
| 6981 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6981 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6982 } | 6982 } |
| 6983 | 6983 |
| 6984 void test_equalityExpression_precedence_relational_left() { | 6984 void test_equalityExpression_precedence_relational_left() { |
| 6985 BinaryExpression expression = ParserTestCase.parseExpression("x is y == z",
[]); | 6985 BinaryExpression expression = ParserTestCase.parseExpression("x is y == z",
[]); |
| 6986 EngineTestCase.assertInstanceOf(IsExpression, expression.leftOperand); | 6986 EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression,
expression.leftOperand); |
| 6987 } | 6987 } |
| 6988 | 6988 |
| 6989 void test_equalityExpression_precedence_relational_right() { | 6989 void test_equalityExpression_precedence_relational_right() { |
| 6990 BinaryExpression expression = ParserTestCase.parseExpression("x == y is z",
[]); | 6990 BinaryExpression expression = ParserTestCase.parseExpression("x == y is z",
[]); |
| 6991 EngineTestCase.assertInstanceOf(IsExpression, expression.rightOperand); | 6991 EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression,
expression.rightOperand); |
| 6992 } | 6992 } |
| 6993 | 6993 |
| 6994 void test_equalityExpression_super() { | 6994 void test_equalityExpression_super() { |
| 6995 BinaryExpression expression = ParserTestCase.parseExpression("super == y !=
z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); | 6995 BinaryExpression expression = ParserTestCase.parseExpression("super == y !=
z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); |
| 6996 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 6996 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 6997 } | 6997 } |
| 6998 | 6998 |
| 6999 void test_logicalAndExpression() { | 6999 void test_logicalAndExpression() { |
| 7000 BinaryExpression expression = ParserTestCase.parseExpression("x && y && z",
[]); | 7000 BinaryExpression expression = ParserTestCase.parseExpression("x && y && z",
[]); |
| 7001 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7001 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7002 } | 7002 } |
| 7003 | 7003 |
| 7004 void test_logicalAndExpression_precedence_bitwiseOr_left() { | 7004 void test_logicalAndExpression_precedence_bitwiseOr_left() { |
| 7005 BinaryExpression expression = ParserTestCase.parseExpression("x | y < z", []
); | 7005 BinaryExpression expression = ParserTestCase.parseExpression("x | y < z", []
); |
| 7006 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7006 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7007 } | 7007 } |
| 7008 | 7008 |
| 7009 void test_logicalAndExpression_precedence_bitwiseOr_right() { | 7009 void test_logicalAndExpression_precedence_bitwiseOr_right() { |
| 7010 BinaryExpression expression = ParserTestCase.parseExpression("x < y | z", []
); | 7010 BinaryExpression expression = ParserTestCase.parseExpression("x < y | z", []
); |
| 7011 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 7011 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 7012 } | 7012 } |
| 7013 | 7013 |
| 7014 void test_logicalOrExpression() { | 7014 void test_logicalOrExpression() { |
| 7015 BinaryExpression expression = ParserTestCase.parseExpression("x || y || z",
[]); | 7015 BinaryExpression expression = ParserTestCase.parseExpression("x || y || z",
[]); |
| 7016 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7016 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7017 } | 7017 } |
| 7018 | 7018 |
| 7019 void test_logicalOrExpression_precedence_logicalAnd_left() { | 7019 void test_logicalOrExpression_precedence_logicalAnd_left() { |
| 7020 BinaryExpression expression = ParserTestCase.parseExpression("x && y || z",
[]); | 7020 BinaryExpression expression = ParserTestCase.parseExpression("x && y || z",
[]); |
| 7021 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7021 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7022 } | 7022 } |
| 7023 | 7023 |
| 7024 void test_logicalOrExpression_precedence_logicalAnd_right() { | 7024 void test_logicalOrExpression_precedence_logicalAnd_right() { |
| 7025 BinaryExpression expression = ParserTestCase.parseExpression("x || y && z",
[]); | 7025 BinaryExpression expression = ParserTestCase.parseExpression("x || y && z",
[]); |
| 7026 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 7026 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 7027 } | 7027 } |
| 7028 | 7028 |
| 7029 void test_multipleLabels_statement() { | 7029 void test_multipleLabels_statement() { |
| 7030 LabeledStatement statement = ParserTestCase.parseStatement("a: b: c: return
x;", []); | 7030 LabeledStatement statement = ParserTestCase.parseStatement("a: b: c: return
x;", []); |
| 7031 EngineTestCase.assertSize(3, statement.labels); | 7031 EngineTestCase.assertSize(3, statement.labels); |
| 7032 EngineTestCase.assertInstanceOf(ReturnStatement, statement.statement); | 7032 EngineTestCase.assertInstanceOf((obj) => obj is ReturnStatement, ReturnState
ment, statement.statement); |
| 7033 } | 7033 } |
| 7034 | 7034 |
| 7035 void test_multiplicativeExpression_normal() { | 7035 void test_multiplicativeExpression_normal() { |
| 7036 BinaryExpression expression = ParserTestCase.parseExpression("x * y / z", []
); | 7036 BinaryExpression expression = ParserTestCase.parseExpression("x * y / z", []
); |
| 7037 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7037 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7038 } | 7038 } |
| 7039 | 7039 |
| 7040 void test_multiplicativeExpression_precedence_unary_left() { | 7040 void test_multiplicativeExpression_precedence_unary_left() { |
| 7041 BinaryExpression expression = ParserTestCase.parseExpression("-x * y", []); | 7041 BinaryExpression expression = ParserTestCase.parseExpression("-x * y", []); |
| 7042 EngineTestCase.assertInstanceOf(PrefixExpression, expression.leftOperand); | 7042 EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpr
ession, expression.leftOperand); |
| 7043 } | 7043 } |
| 7044 | 7044 |
| 7045 void test_multiplicativeExpression_precedence_unary_right() { | 7045 void test_multiplicativeExpression_precedence_unary_right() { |
| 7046 BinaryExpression expression = ParserTestCase.parseExpression("x * -y", []); | 7046 BinaryExpression expression = ParserTestCase.parseExpression("x * -y", []); |
| 7047 EngineTestCase.assertInstanceOf(PrefixExpression, expression.rightOperand); | 7047 EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpr
ession, expression.rightOperand); |
| 7048 } | 7048 } |
| 7049 | 7049 |
| 7050 void test_multiplicativeExpression_super() { | 7050 void test_multiplicativeExpression_super() { |
| 7051 BinaryExpression expression = ParserTestCase.parseExpression("super * y / z"
, []); | 7051 BinaryExpression expression = ParserTestCase.parseExpression("super * y / z"
, []); |
| 7052 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7052 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7053 } | 7053 } |
| 7054 | 7054 |
| 7055 void test_relationalExpression_precedence_shift_right() { | 7055 void test_relationalExpression_precedence_shift_right() { |
| 7056 IsExpression expression = ParserTestCase.parseExpression("x << y is z", []); | 7056 IsExpression expression = ParserTestCase.parseExpression("x << y is z", []); |
| 7057 EngineTestCase.assertInstanceOf(BinaryExpression, expression.expression); | 7057 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.expression); |
| 7058 } | 7058 } |
| 7059 | 7059 |
| 7060 void test_shiftExpression_normal() { | 7060 void test_shiftExpression_normal() { |
| 7061 BinaryExpression expression = ParserTestCase.parseExpression("x >> 4 << 3",
[]); | 7061 BinaryExpression expression = ParserTestCase.parseExpression("x >> 4 << 3",
[]); |
| 7062 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7062 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7063 } | 7063 } |
| 7064 | 7064 |
| 7065 void test_shiftExpression_precedence_additive_left() { | 7065 void test_shiftExpression_precedence_additive_left() { |
| 7066 BinaryExpression expression = ParserTestCase.parseExpression("x + y << z", [
]); | 7066 BinaryExpression expression = ParserTestCase.parseExpression("x + y << z", [
]); |
| 7067 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7067 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7068 } | 7068 } |
| 7069 | 7069 |
| 7070 void test_shiftExpression_precedence_additive_right() { | 7070 void test_shiftExpression_precedence_additive_right() { |
| 7071 BinaryExpression expression = ParserTestCase.parseExpression("x << y + z", [
]); | 7071 BinaryExpression expression = ParserTestCase.parseExpression("x << y + z", [
]); |
| 7072 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 7072 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 7073 } | 7073 } |
| 7074 | 7074 |
| 7075 void test_shiftExpression_super() { | 7075 void test_shiftExpression_super() { |
| 7076 BinaryExpression expression = ParserTestCase.parseExpression("super >> 4 <<
3", []); | 7076 BinaryExpression expression = ParserTestCase.parseExpression("super >> 4 <<
3", []); |
| 7077 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 7077 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 7078 } | 7078 } |
| 7079 | 7079 |
| 7080 void test_topLevelVariable_withMetadata() { | 7080 void test_topLevelVariable_withMetadata() { |
| 7081 ParserTestCase.parseCompilationUnit("String @A string;", []); | 7081 ParserTestCase.parseCompilationUnit("String @A string;", []); |
| 7082 } | 7082 } |
| 7083 | 7083 |
| 7084 static dartSuite() { | 7084 static dartSuite() { |
| 7085 _ut.group('ComplexParserTest', () { | 7085 _ut.group('ComplexParserTest', () { |
| 7086 _ut.test('test_additiveExpression_noSpaces', () { | 7086 _ut.test('test_additiveExpression_noSpaces', () { |
| 7087 final __test = new ComplexParserTest(); | 7087 final __test = new ComplexParserTest(); |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8358 " Map<Symbol, dynamic> result = new Map<Symbol, dynamic>();", | 8358 " Map<Symbol, dynamic> result = new Map<Symbol, dynamic>();", |
| 8359 " map.forEach((name, value) {", | 8359 " map.forEach((name, value) {", |
| 8360 " result[new Symbol(name)] = value;", | 8360 " result[new Symbol(name)] = value;", |
| 8361 " });", | 8361 " });", |
| 8362 " return result;", | 8362 " return result;", |
| 8363 "}"]), []); | 8363 "}"]), []); |
| 8364 } | 8364 } |
| 8365 | 8365 |
| 8366 void test_additiveExpression_missing_LHS() { | 8366 void test_additiveExpression_missing_LHS() { |
| 8367 BinaryExpression expression = ParserTestCase.parseExpression("+ y", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8367 BinaryExpression expression = ParserTestCase.parseExpression("+ y", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8368 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8368 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8369 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8369 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8370 } | 8370 } |
| 8371 | 8371 |
| 8372 void test_additiveExpression_missing_LHS_RHS() { | 8372 void test_additiveExpression_missing_LHS_RHS() { |
| 8373 BinaryExpression expression = ParserTestCase.parseExpression("+", [ | 8373 BinaryExpression expression = ParserTestCase.parseExpression("+", [ |
| 8374 ParserErrorCode.MISSING_IDENTIFIER, | 8374 ParserErrorCode.MISSING_IDENTIFIER, |
| 8375 ParserErrorCode.MISSING_IDENTIFIER]); | 8375 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8376 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8376 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8377 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8377 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8378 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8378 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8379 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8379 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8380 } | 8380 } |
| 8381 | 8381 |
| 8382 void test_additiveExpression_missing_RHS() { | 8382 void test_additiveExpression_missing_RHS() { |
| 8383 BinaryExpression expression = ParserTestCase.parseExpression("x +", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8383 BinaryExpression expression = ParserTestCase.parseExpression("x +", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8384 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8384 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8385 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8385 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8386 } | 8386 } |
| 8387 | 8387 |
| 8388 void test_additiveExpression_missing_RHS_super() { | 8388 void test_additiveExpression_missing_RHS_super() { |
| 8389 BinaryExpression expression = ParserTestCase.parseExpression("super +", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8389 BinaryExpression expression = ParserTestCase.parseExpression("super +", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8390 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8390 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8391 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8391 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8392 } | 8392 } |
| 8393 | 8393 |
| 8394 void test_additiveExpression_precedence_multiplicative_left() { | 8394 void test_additiveExpression_precedence_multiplicative_left() { |
| 8395 BinaryExpression expression = ParserTestCase.parseExpression("* +", [ | 8395 BinaryExpression expression = ParserTestCase.parseExpression("* +", [ |
| 8396 ParserErrorCode.MISSING_IDENTIFIER, | 8396 ParserErrorCode.MISSING_IDENTIFIER, |
| 8397 ParserErrorCode.MISSING_IDENTIFIER, | 8397 ParserErrorCode.MISSING_IDENTIFIER, |
| 8398 ParserErrorCode.MISSING_IDENTIFIER]); | 8398 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8399 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8399 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8400 } | 8400 } |
| 8401 | 8401 |
| 8402 void test_additiveExpression_precedence_multiplicative_right() { | 8402 void test_additiveExpression_precedence_multiplicative_right() { |
| 8403 BinaryExpression expression = ParserTestCase.parseExpression("+ *", [ | 8403 BinaryExpression expression = ParserTestCase.parseExpression("+ *", [ |
| 8404 ParserErrorCode.MISSING_IDENTIFIER, | 8404 ParserErrorCode.MISSING_IDENTIFIER, |
| 8405 ParserErrorCode.MISSING_IDENTIFIER, | 8405 ParserErrorCode.MISSING_IDENTIFIER, |
| 8406 ParserErrorCode.MISSING_IDENTIFIER]); | 8406 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8407 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8407 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8408 } | 8408 } |
| 8409 | 8409 |
| 8410 void test_additiveExpression_super() { | 8410 void test_additiveExpression_super() { |
| 8411 BinaryExpression expression = ParserTestCase.parseExpression("super + +", [ | 8411 BinaryExpression expression = ParserTestCase.parseExpression("super + +", [ |
| 8412 ParserErrorCode.MISSING_IDENTIFIER, | 8412 ParserErrorCode.MISSING_IDENTIFIER, |
| 8413 ParserErrorCode.MISSING_IDENTIFIER]); | 8413 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8414 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8414 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8415 } | 8415 } |
| 8416 | 8416 |
| 8417 void test_assignmentExpression_missing_compound1() { | 8417 void test_assignmentExpression_missing_compound1() { |
| 8418 AssignmentExpression expression = ParserTestCase.parseExpression("= y = 0",
[ParserErrorCode.MISSING_IDENTIFIER]); | 8418 AssignmentExpression expression = ParserTestCase.parseExpression("= y = 0",
[ParserErrorCode.MISSING_IDENTIFIER]); |
| 8419 Expression syntheticExpression = expression.leftHandSide; | 8419 Expression syntheticExpression = expression.leftHandSide; |
| 8420 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8420 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8421 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8421 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8422 } | 8422 } |
| 8423 | 8423 |
| 8424 void test_assignmentExpression_missing_compound2() { | 8424 void test_assignmentExpression_missing_compound2() { |
| 8425 AssignmentExpression expression = ParserTestCase.parseExpression("x = = 0",
[ParserErrorCode.MISSING_IDENTIFIER]); | 8425 AssignmentExpression expression = ParserTestCase.parseExpression("x = = 0",
[ParserErrorCode.MISSING_IDENTIFIER]); |
| 8426 Expression syntheticExpression = (expression.rightHandSide as AssignmentExpr
ession).leftHandSide; | 8426 Expression syntheticExpression = (expression.rightHandSide as AssignmentExpr
ession).leftHandSide; |
| 8427 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8427 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8428 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8428 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8429 } | 8429 } |
| 8430 | 8430 |
| 8431 void test_assignmentExpression_missing_compound3() { | 8431 void test_assignmentExpression_missing_compound3() { |
| 8432 AssignmentExpression expression = ParserTestCase.parseExpression("x = y =",
[ParserErrorCode.MISSING_IDENTIFIER]); | 8432 AssignmentExpression expression = ParserTestCase.parseExpression("x = y =",
[ParserErrorCode.MISSING_IDENTIFIER]); |
| 8433 Expression syntheticExpression = (expression.rightHandSide as AssignmentExpr
ession).rightHandSide; | 8433 Expression syntheticExpression = (expression.rightHandSide as AssignmentExpr
ession).rightHandSide; |
| 8434 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8434 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8435 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8435 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8436 } | 8436 } |
| 8437 | 8437 |
| 8438 void test_assignmentExpression_missing_LHS() { | 8438 void test_assignmentExpression_missing_LHS() { |
| 8439 AssignmentExpression expression = ParserTestCase.parseExpression("= 0", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8439 AssignmentExpression expression = ParserTestCase.parseExpression("= 0", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8440 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide); | 8440 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftHandSide); |
| 8441 JUnitTestCase.assertTrue(expression.leftHandSide.isSynthetic); | 8441 JUnitTestCase.assertTrue(expression.leftHandSide.isSynthetic); |
| 8442 } | 8442 } |
| 8443 | 8443 |
| 8444 void test_assignmentExpression_missing_RHS() { | 8444 void test_assignmentExpression_missing_RHS() { |
| 8445 AssignmentExpression expression = ParserTestCase.parseExpression("x =", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8445 AssignmentExpression expression = ParserTestCase.parseExpression("x =", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8446 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftHandSide); | 8446 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftHandSide); |
| 8447 JUnitTestCase.assertTrue(expression.rightHandSide.isSynthetic); | 8447 JUnitTestCase.assertTrue(expression.rightHandSide.isSynthetic); |
| 8448 } | 8448 } |
| 8449 | 8449 |
| 8450 void test_bitwiseAndExpression_missing_LHS() { | 8450 void test_bitwiseAndExpression_missing_LHS() { |
| 8451 BinaryExpression expression = ParserTestCase.parseExpression("& y", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8451 BinaryExpression expression = ParserTestCase.parseExpression("& y", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8452 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8452 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8453 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8453 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8454 } | 8454 } |
| 8455 | 8455 |
| 8456 void test_bitwiseAndExpression_missing_LHS_RHS() { | 8456 void test_bitwiseAndExpression_missing_LHS_RHS() { |
| 8457 BinaryExpression expression = ParserTestCase.parseExpression("&", [ | 8457 BinaryExpression expression = ParserTestCase.parseExpression("&", [ |
| 8458 ParserErrorCode.MISSING_IDENTIFIER, | 8458 ParserErrorCode.MISSING_IDENTIFIER, |
| 8459 ParserErrorCode.MISSING_IDENTIFIER]); | 8459 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8460 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8460 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8461 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8461 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8462 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8462 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8463 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8463 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8464 } | 8464 } |
| 8465 | 8465 |
| 8466 void test_bitwiseAndExpression_missing_RHS() { | 8466 void test_bitwiseAndExpression_missing_RHS() { |
| 8467 BinaryExpression expression = ParserTestCase.parseExpression("x &", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8467 BinaryExpression expression = ParserTestCase.parseExpression("x &", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8468 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8468 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8469 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8469 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8470 } | 8470 } |
| 8471 | 8471 |
| 8472 void test_bitwiseAndExpression_missing_RHS_super() { | 8472 void test_bitwiseAndExpression_missing_RHS_super() { |
| 8473 BinaryExpression expression = ParserTestCase.parseExpression("super &", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8473 BinaryExpression expression = ParserTestCase.parseExpression("super &", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8474 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8474 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8475 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8475 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8476 } | 8476 } |
| 8477 | 8477 |
| 8478 void test_bitwiseAndExpression_precedence_equality_left() { | 8478 void test_bitwiseAndExpression_precedence_equality_left() { |
| 8479 BinaryExpression expression = ParserTestCase.parseExpression("== &&", [ | 8479 BinaryExpression expression = ParserTestCase.parseExpression("== &&", [ |
| 8480 ParserErrorCode.MISSING_IDENTIFIER, | 8480 ParserErrorCode.MISSING_IDENTIFIER, |
| 8481 ParserErrorCode.MISSING_IDENTIFIER, | 8481 ParserErrorCode.MISSING_IDENTIFIER, |
| 8482 ParserErrorCode.MISSING_IDENTIFIER]); | 8482 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8483 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8483 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8484 } | 8484 } |
| 8485 | 8485 |
| 8486 void test_bitwiseAndExpression_precedence_equality_right() { | 8486 void test_bitwiseAndExpression_precedence_equality_right() { |
| 8487 BinaryExpression expression = ParserTestCase.parseExpression("&& ==", [ | 8487 BinaryExpression expression = ParserTestCase.parseExpression("&& ==", [ |
| 8488 ParserErrorCode.MISSING_IDENTIFIER, | 8488 ParserErrorCode.MISSING_IDENTIFIER, |
| 8489 ParserErrorCode.MISSING_IDENTIFIER, | 8489 ParserErrorCode.MISSING_IDENTIFIER, |
| 8490 ParserErrorCode.MISSING_IDENTIFIER]); | 8490 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8491 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8491 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8492 } | 8492 } |
| 8493 | 8493 |
| 8494 void test_bitwiseAndExpression_super() { | 8494 void test_bitwiseAndExpression_super() { |
| 8495 BinaryExpression expression = ParserTestCase.parseExpression("super & &", [ | 8495 BinaryExpression expression = ParserTestCase.parseExpression("super & &", [ |
| 8496 ParserErrorCode.MISSING_IDENTIFIER, | 8496 ParserErrorCode.MISSING_IDENTIFIER, |
| 8497 ParserErrorCode.MISSING_IDENTIFIER]); | 8497 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8498 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8498 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8499 } | 8499 } |
| 8500 | 8500 |
| 8501 void test_bitwiseOrExpression_missing_LHS() { | 8501 void test_bitwiseOrExpression_missing_LHS() { |
| 8502 BinaryExpression expression = ParserTestCase.parseExpression("| y", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8502 BinaryExpression expression = ParserTestCase.parseExpression("| y", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8503 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8503 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8504 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8504 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8505 } | 8505 } |
| 8506 | 8506 |
| 8507 void test_bitwiseOrExpression_missing_LHS_RHS() { | 8507 void test_bitwiseOrExpression_missing_LHS_RHS() { |
| 8508 BinaryExpression expression = ParserTestCase.parseExpression("|", [ | 8508 BinaryExpression expression = ParserTestCase.parseExpression("|", [ |
| 8509 ParserErrorCode.MISSING_IDENTIFIER, | 8509 ParserErrorCode.MISSING_IDENTIFIER, |
| 8510 ParserErrorCode.MISSING_IDENTIFIER]); | 8510 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8511 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8511 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8512 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8512 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8513 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8513 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8514 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8514 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8515 } | 8515 } |
| 8516 | 8516 |
| 8517 void test_bitwiseOrExpression_missing_RHS() { | 8517 void test_bitwiseOrExpression_missing_RHS() { |
| 8518 BinaryExpression expression = ParserTestCase.parseExpression("x |", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8518 BinaryExpression expression = ParserTestCase.parseExpression("x |", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8519 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8519 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8520 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8520 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8521 } | 8521 } |
| 8522 | 8522 |
| 8523 void test_bitwiseOrExpression_missing_RHS_super() { | 8523 void test_bitwiseOrExpression_missing_RHS_super() { |
| 8524 BinaryExpression expression = ParserTestCase.parseExpression("super |", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8524 BinaryExpression expression = ParserTestCase.parseExpression("super |", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8525 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8525 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8526 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8526 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8527 } | 8527 } |
| 8528 | 8528 |
| 8529 void test_bitwiseOrExpression_precedence_xor_left() { | 8529 void test_bitwiseOrExpression_precedence_xor_left() { |
| 8530 BinaryExpression expression = ParserTestCase.parseExpression("^ |", [ | 8530 BinaryExpression expression = ParserTestCase.parseExpression("^ |", [ |
| 8531 ParserErrorCode.MISSING_IDENTIFIER, | 8531 ParserErrorCode.MISSING_IDENTIFIER, |
| 8532 ParserErrorCode.MISSING_IDENTIFIER, | 8532 ParserErrorCode.MISSING_IDENTIFIER, |
| 8533 ParserErrorCode.MISSING_IDENTIFIER]); | 8533 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8534 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8534 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8535 } | 8535 } |
| 8536 | 8536 |
| 8537 void test_bitwiseOrExpression_precedence_xor_right() { | 8537 void test_bitwiseOrExpression_precedence_xor_right() { |
| 8538 BinaryExpression expression = ParserTestCase.parseExpression("| ^", [ | 8538 BinaryExpression expression = ParserTestCase.parseExpression("| ^", [ |
| 8539 ParserErrorCode.MISSING_IDENTIFIER, | 8539 ParserErrorCode.MISSING_IDENTIFIER, |
| 8540 ParserErrorCode.MISSING_IDENTIFIER, | 8540 ParserErrorCode.MISSING_IDENTIFIER, |
| 8541 ParserErrorCode.MISSING_IDENTIFIER]); | 8541 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8542 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8542 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8543 } | 8543 } |
| 8544 | 8544 |
| 8545 void test_bitwiseOrExpression_super() { | 8545 void test_bitwiseOrExpression_super() { |
| 8546 BinaryExpression expression = ParserTestCase.parseExpression("super | |", [ | 8546 BinaryExpression expression = ParserTestCase.parseExpression("super | |", [ |
| 8547 ParserErrorCode.MISSING_IDENTIFIER, | 8547 ParserErrorCode.MISSING_IDENTIFIER, |
| 8548 ParserErrorCode.MISSING_IDENTIFIER]); | 8548 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8549 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8549 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8550 } | 8550 } |
| 8551 | 8551 |
| 8552 void test_bitwiseXorExpression_missing_LHS() { | 8552 void test_bitwiseXorExpression_missing_LHS() { |
| 8553 BinaryExpression expression = ParserTestCase.parseExpression("^ y", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8553 BinaryExpression expression = ParserTestCase.parseExpression("^ y", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8554 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8554 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8555 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8555 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8556 } | 8556 } |
| 8557 | 8557 |
| 8558 void test_bitwiseXorExpression_missing_LHS_RHS() { | 8558 void test_bitwiseXorExpression_missing_LHS_RHS() { |
| 8559 BinaryExpression expression = ParserTestCase.parseExpression("^", [ | 8559 BinaryExpression expression = ParserTestCase.parseExpression("^", [ |
| 8560 ParserErrorCode.MISSING_IDENTIFIER, | 8560 ParserErrorCode.MISSING_IDENTIFIER, |
| 8561 ParserErrorCode.MISSING_IDENTIFIER]); | 8561 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8562 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8562 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8563 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8563 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8564 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8564 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8565 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8565 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8566 } | 8566 } |
| 8567 | 8567 |
| 8568 void test_bitwiseXorExpression_missing_RHS() { | 8568 void test_bitwiseXorExpression_missing_RHS() { |
| 8569 BinaryExpression expression = ParserTestCase.parseExpression("x ^", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8569 BinaryExpression expression = ParserTestCase.parseExpression("x ^", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8570 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8570 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8571 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8571 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8572 } | 8572 } |
| 8573 | 8573 |
| 8574 void test_bitwiseXorExpression_missing_RHS_super() { | 8574 void test_bitwiseXorExpression_missing_RHS_super() { |
| 8575 BinaryExpression expression = ParserTestCase.parseExpression("super ^", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8575 BinaryExpression expression = ParserTestCase.parseExpression("super ^", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8576 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8576 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8577 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8577 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8578 } | 8578 } |
| 8579 | 8579 |
| 8580 void test_bitwiseXorExpression_precedence_and_left() { | 8580 void test_bitwiseXorExpression_precedence_and_left() { |
| 8581 BinaryExpression expression = ParserTestCase.parseExpression("& ^", [ | 8581 BinaryExpression expression = ParserTestCase.parseExpression("& ^", [ |
| 8582 ParserErrorCode.MISSING_IDENTIFIER, | 8582 ParserErrorCode.MISSING_IDENTIFIER, |
| 8583 ParserErrorCode.MISSING_IDENTIFIER, | 8583 ParserErrorCode.MISSING_IDENTIFIER, |
| 8584 ParserErrorCode.MISSING_IDENTIFIER]); | 8584 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8585 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8585 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8586 } | 8586 } |
| 8587 | 8587 |
| 8588 void test_bitwiseXorExpression_precedence_and_right() { | 8588 void test_bitwiseXorExpression_precedence_and_right() { |
| 8589 BinaryExpression expression = ParserTestCase.parseExpression("^ &", [ | 8589 BinaryExpression expression = ParserTestCase.parseExpression("^ &", [ |
| 8590 ParserErrorCode.MISSING_IDENTIFIER, | 8590 ParserErrorCode.MISSING_IDENTIFIER, |
| 8591 ParserErrorCode.MISSING_IDENTIFIER, | 8591 ParserErrorCode.MISSING_IDENTIFIER, |
| 8592 ParserErrorCode.MISSING_IDENTIFIER]); | 8592 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8593 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8593 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8594 } | 8594 } |
| 8595 | 8595 |
| 8596 void test_bitwiseXorExpression_super() { | 8596 void test_bitwiseXorExpression_super() { |
| 8597 BinaryExpression expression = ParserTestCase.parseExpression("super ^ ^", [ | 8597 BinaryExpression expression = ParserTestCase.parseExpression("super ^ ^", [ |
| 8598 ParserErrorCode.MISSING_IDENTIFIER, | 8598 ParserErrorCode.MISSING_IDENTIFIER, |
| 8599 ParserErrorCode.MISSING_IDENTIFIER]); | 8599 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8600 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8600 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8601 } | 8601 } |
| 8602 | 8602 |
| 8603 void test_classTypeAlias_withBody() { | 8603 void test_classTypeAlias_withBody() { |
| 8604 ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["class A {}
", "class B = Object with A {}"]), [ParserErrorCode.EXPECTED_TOKEN]); | 8604 ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["class A {}
", "class B = Object with A {}"]), [ParserErrorCode.EXPECTED_TOKEN]); |
| 8605 } | 8605 } |
| 8606 | 8606 |
| 8607 void test_conditionalExpression_missingElse() { | 8607 void test_conditionalExpression_missingElse() { |
| 8608 ConditionalExpression expression = ParserTestCase.parse4("parseConditionalEx
pression", "x ? y :", [ParserErrorCode.MISSING_IDENTIFIER]); | 8608 ConditionalExpression expression = ParserTestCase.parse4("parseConditionalEx
pression", "x ? y :", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 8609 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.elseExpression)
; | 8609 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.elseExpression); |
| 8610 JUnitTestCase.assertTrue(expression.elseExpression.isSynthetic); | 8610 JUnitTestCase.assertTrue(expression.elseExpression.isSynthetic); |
| 8611 } | 8611 } |
| 8612 | 8612 |
| 8613 void test_conditionalExpression_missingThen() { | 8613 void test_conditionalExpression_missingThen() { |
| 8614 ConditionalExpression expression = ParserTestCase.parse4("parseConditionalEx
pression", "x ? : z", [ParserErrorCode.MISSING_IDENTIFIER]); | 8614 ConditionalExpression expression = ParserTestCase.parse4("parseConditionalEx
pression", "x ? : z", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 8615 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.thenExpression)
; | 8615 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.thenExpression); |
| 8616 JUnitTestCase.assertTrue(expression.thenExpression.isSynthetic); | 8616 JUnitTestCase.assertTrue(expression.thenExpression.isSynthetic); |
| 8617 } | 8617 } |
| 8618 | 8618 |
| 8619 void test_equalityExpression_missing_LHS() { | 8619 void test_equalityExpression_missing_LHS() { |
| 8620 BinaryExpression expression = ParserTestCase.parseExpression("== y", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8620 BinaryExpression expression = ParserTestCase.parseExpression("== y", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8621 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8621 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8622 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8622 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8623 } | 8623 } |
| 8624 | 8624 |
| 8625 void test_equalityExpression_missing_LHS_RHS() { | 8625 void test_equalityExpression_missing_LHS_RHS() { |
| 8626 BinaryExpression expression = ParserTestCase.parseExpression("==", [ | 8626 BinaryExpression expression = ParserTestCase.parseExpression("==", [ |
| 8627 ParserErrorCode.MISSING_IDENTIFIER, | 8627 ParserErrorCode.MISSING_IDENTIFIER, |
| 8628 ParserErrorCode.MISSING_IDENTIFIER]); | 8628 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8629 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8629 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8630 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8630 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8631 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8631 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8632 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8632 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8633 } | 8633 } |
| 8634 | 8634 |
| 8635 void test_equalityExpression_missing_RHS() { | 8635 void test_equalityExpression_missing_RHS() { |
| 8636 BinaryExpression expression = ParserTestCase.parseExpression("x ==", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8636 BinaryExpression expression = ParserTestCase.parseExpression("x ==", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8637 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8637 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8638 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8638 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8639 } | 8639 } |
| 8640 | 8640 |
| 8641 void test_equalityExpression_missing_RHS_super() { | 8641 void test_equalityExpression_missing_RHS_super() { |
| 8642 BinaryExpression expression = ParserTestCase.parseExpression("super ==", [Pa
rserErrorCode.MISSING_IDENTIFIER]); | 8642 BinaryExpression expression = ParserTestCase.parseExpression("super ==", [Pa
rserErrorCode.MISSING_IDENTIFIER]); |
| 8643 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8643 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8644 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8644 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8645 } | 8645 } |
| 8646 | 8646 |
| 8647 void test_equalityExpression_precedence_relational_left() { | 8647 void test_equalityExpression_precedence_relational_left() { |
| 8648 BinaryExpression expression = ParserTestCase.parseExpression("is ==", [ | 8648 BinaryExpression expression = ParserTestCase.parseExpression("is ==", [ |
| 8649 ParserErrorCode.EXPECTED_TYPE_NAME, | 8649 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8650 ParserErrorCode.MISSING_IDENTIFIER, | 8650 ParserErrorCode.MISSING_IDENTIFIER, |
| 8651 ParserErrorCode.MISSING_IDENTIFIER]); | 8651 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8652 EngineTestCase.assertInstanceOf(IsExpression, expression.leftOperand); | 8652 EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression,
expression.leftOperand); |
| 8653 } | 8653 } |
| 8654 | 8654 |
| 8655 void test_equalityExpression_precedence_relational_right() { | 8655 void test_equalityExpression_precedence_relational_right() { |
| 8656 BinaryExpression expression = ParserTestCase.parseExpression("== is", [ | 8656 BinaryExpression expression = ParserTestCase.parseExpression("== is", [ |
| 8657 ParserErrorCode.EXPECTED_TYPE_NAME, | 8657 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8658 ParserErrorCode.MISSING_IDENTIFIER, | 8658 ParserErrorCode.MISSING_IDENTIFIER, |
| 8659 ParserErrorCode.MISSING_IDENTIFIER]); | 8659 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8660 EngineTestCase.assertInstanceOf(IsExpression, expression.rightOperand); | 8660 EngineTestCase.assertInstanceOf((obj) => obj is IsExpression, IsExpression,
expression.rightOperand); |
| 8661 } | 8661 } |
| 8662 | 8662 |
| 8663 void test_equalityExpression_super() { | 8663 void test_equalityExpression_super() { |
| 8664 BinaryExpression expression = ParserTestCase.parseExpression("super == ==",
[ | 8664 BinaryExpression expression = ParserTestCase.parseExpression("super == ==",
[ |
| 8665 ParserErrorCode.MISSING_IDENTIFIER, | 8665 ParserErrorCode.MISSING_IDENTIFIER, |
| 8666 ParserErrorCode.MISSING_IDENTIFIER, | 8666 ParserErrorCode.MISSING_IDENTIFIER, |
| 8667 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); | 8667 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); |
| 8668 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8668 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8669 } | 8669 } |
| 8670 | 8670 |
| 8671 void test_expressionList_multiple_end() { | 8671 void test_expressionList_multiple_end() { |
| 8672 List<Expression> result = ParserTestCase.parse4("parseExpressionList", ", 2,
3, 4", [ParserErrorCode.MISSING_IDENTIFIER]); | 8672 List<Expression> result = ParserTestCase.parse4("parseExpressionList", ", 2,
3, 4", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 8673 EngineTestCase.assertSize(4, result); | 8673 EngineTestCase.assertSize(4, result); |
| 8674 Expression syntheticExpression = result[0]; | 8674 Expression syntheticExpression = result[0]; |
| 8675 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8675 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8676 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8676 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8677 } | 8677 } |
| 8678 | 8678 |
| 8679 void test_expressionList_multiple_middle() { | 8679 void test_expressionList_multiple_middle() { |
| 8680 List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2
, , 4", [ParserErrorCode.MISSING_IDENTIFIER]); | 8680 List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2
, , 4", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 8681 EngineTestCase.assertSize(4, result); | 8681 EngineTestCase.assertSize(4, result); |
| 8682 Expression syntheticExpression = result[2]; | 8682 Expression syntheticExpression = result[2]; |
| 8683 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8683 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8684 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8684 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8685 } | 8685 } |
| 8686 | 8686 |
| 8687 void test_expressionList_multiple_start() { | 8687 void test_expressionList_multiple_start() { |
| 8688 List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2
, 3,", [ParserErrorCode.MISSING_IDENTIFIER]); | 8688 List<Expression> result = ParserTestCase.parse4("parseExpressionList", "1, 2
, 3,", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 8689 EngineTestCase.assertSize(4, result); | 8689 EngineTestCase.assertSize(4, result); |
| 8690 Expression syntheticExpression = result[3]; | 8690 Expression syntheticExpression = result[3]; |
| 8691 EngineTestCase.assertInstanceOf(SimpleIdentifier, syntheticExpression); | 8691 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, syntheticExpression); |
| 8692 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); | 8692 JUnitTestCase.assertTrue(syntheticExpression.isSynthetic); |
| 8693 } | 8693 } |
| 8694 | 8694 |
| 8695 void test_incomplete_topLevelVariable() { | 8695 void test_incomplete_topLevelVariable() { |
| 8696 CompilationUnit unit = ParserTestCase.parseCompilationUnit("String", [Parser
ErrorCode.EXPECTED_EXECUTABLE]); | 8696 CompilationUnit unit = ParserTestCase.parseCompilationUnit("String", [Parser
ErrorCode.EXPECTED_EXECUTABLE]); |
| 8697 NodeList<CompilationUnitMember> declarations = unit.declarations; | 8697 NodeList<CompilationUnitMember> declarations = unit.declarations; |
| 8698 EngineTestCase.assertSize(1, declarations); | 8698 EngineTestCase.assertSize(1, declarations); |
| 8699 CompilationUnitMember member = declarations[0]; | 8699 CompilationUnitMember member = declarations[0]; |
| 8700 EngineTestCase.assertInstanceOf(TopLevelVariableDeclaration, member); | 8700 EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
TopLevelVariableDeclaration, member); |
| 8701 NodeList<VariableDeclaration> variables = (member as TopLevelVariableDeclara
tion).variables.variables; | 8701 NodeList<VariableDeclaration> variables = (member as TopLevelVariableDeclara
tion).variables.variables; |
| 8702 EngineTestCase.assertSize(1, variables); | 8702 EngineTestCase.assertSize(1, variables); |
| 8703 SimpleIdentifier name = variables[0].name; | 8703 SimpleIdentifier name = variables[0].name; |
| 8704 JUnitTestCase.assertTrue(name.isSynthetic); | 8704 JUnitTestCase.assertTrue(name.isSynthetic); |
| 8705 } | 8705 } |
| 8706 | 8706 |
| 8707 void test_isExpression_noType() { | 8707 void test_isExpression_noType() { |
| 8708 CompilationUnit unit = ParserTestCase.parseCompilationUnit("class Bar<T exte
nds Foo> {m(x){if (x is ) return;if (x is !)}}", [ | 8708 CompilationUnit unit = ParserTestCase.parseCompilationUnit("class Bar<T exte
nds Foo> {m(x){if (x is ) return;if (x is !)}}", [ |
| 8709 ParserErrorCode.EXPECTED_TYPE_NAME, | 8709 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8710 ParserErrorCode.EXPECTED_TYPE_NAME, | 8710 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8711 ParserErrorCode.MISSING_STATEMENT]); | 8711 ParserErrorCode.MISSING_STATEMENT]); |
| 8712 ClassDeclaration declaration = unit.declarations[0] as ClassDeclaration; | 8712 ClassDeclaration declaration = unit.declarations[0] as ClassDeclaration; |
| 8713 MethodDeclaration method = declaration.members[0] as MethodDeclaration; | 8713 MethodDeclaration method = declaration.members[0] as MethodDeclaration; |
| 8714 BlockFunctionBody body = method.body as BlockFunctionBody; | 8714 BlockFunctionBody body = method.body as BlockFunctionBody; |
| 8715 IfStatement ifStatement = body.block.statements[1] as IfStatement; | 8715 IfStatement ifStatement = body.block.statements[1] as IfStatement; |
| 8716 IsExpression expression = ifStatement.condition as IsExpression; | 8716 IsExpression expression = ifStatement.condition as IsExpression; |
| 8717 JUnitTestCase.assertNotNull(expression.expression); | 8717 JUnitTestCase.assertNotNull(expression.expression); |
| 8718 JUnitTestCase.assertNotNull(expression.isOperator); | 8718 JUnitTestCase.assertNotNull(expression.isOperator); |
| 8719 JUnitTestCase.assertNotNull(expression.notOperator); | 8719 JUnitTestCase.assertNotNull(expression.notOperator); |
| 8720 TypeName type = expression.type; | 8720 TypeName type = expression.type; |
| 8721 JUnitTestCase.assertNotNull(type); | 8721 JUnitTestCase.assertNotNull(type); |
| 8722 JUnitTestCase.assertTrue(type.name.isSynthetic); | 8722 JUnitTestCase.assertTrue(type.name.isSynthetic); |
| 8723 EngineTestCase.assertInstanceOf(EmptyStatement, ifStatement.thenStatement); | 8723 EngineTestCase.assertInstanceOf((obj) => obj is EmptyStatement, EmptyStateme
nt, ifStatement.thenStatement); |
| 8724 } | 8724 } |
| 8725 | 8725 |
| 8726 void test_logicalAndExpression_missing_LHS() { | 8726 void test_logicalAndExpression_missing_LHS() { |
| 8727 BinaryExpression expression = ParserTestCase.parseExpression("&& y", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8727 BinaryExpression expression = ParserTestCase.parseExpression("&& y", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8728 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8728 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8729 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8729 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8730 } | 8730 } |
| 8731 | 8731 |
| 8732 void test_logicalAndExpression_missing_LHS_RHS() { | 8732 void test_logicalAndExpression_missing_LHS_RHS() { |
| 8733 BinaryExpression expression = ParserTestCase.parseExpression("&&", [ | 8733 BinaryExpression expression = ParserTestCase.parseExpression("&&", [ |
| 8734 ParserErrorCode.MISSING_IDENTIFIER, | 8734 ParserErrorCode.MISSING_IDENTIFIER, |
| 8735 ParserErrorCode.MISSING_IDENTIFIER]); | 8735 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8736 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8736 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8737 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8737 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8738 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8738 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8739 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8739 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8740 } | 8740 } |
| 8741 | 8741 |
| 8742 void test_logicalAndExpression_missing_RHS() { | 8742 void test_logicalAndExpression_missing_RHS() { |
| 8743 BinaryExpression expression = ParserTestCase.parseExpression("x &&", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8743 BinaryExpression expression = ParserTestCase.parseExpression("x &&", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8744 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8744 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8745 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8745 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8746 } | 8746 } |
| 8747 | 8747 |
| 8748 void test_logicalAndExpression_precedence_bitwiseOr_left() { | 8748 void test_logicalAndExpression_precedence_bitwiseOr_left() { |
| 8749 BinaryExpression expression = ParserTestCase.parseExpression("| &&", [ | 8749 BinaryExpression expression = ParserTestCase.parseExpression("| &&", [ |
| 8750 ParserErrorCode.MISSING_IDENTIFIER, | 8750 ParserErrorCode.MISSING_IDENTIFIER, |
| 8751 ParserErrorCode.MISSING_IDENTIFIER, | 8751 ParserErrorCode.MISSING_IDENTIFIER, |
| 8752 ParserErrorCode.MISSING_IDENTIFIER]); | 8752 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8753 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8753 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8754 } | 8754 } |
| 8755 | 8755 |
| 8756 void test_logicalAndExpression_precedence_bitwiseOr_right() { | 8756 void test_logicalAndExpression_precedence_bitwiseOr_right() { |
| 8757 BinaryExpression expression = ParserTestCase.parseExpression("&& |", [ | 8757 BinaryExpression expression = ParserTestCase.parseExpression("&& |", [ |
| 8758 ParserErrorCode.MISSING_IDENTIFIER, | 8758 ParserErrorCode.MISSING_IDENTIFIER, |
| 8759 ParserErrorCode.MISSING_IDENTIFIER, | 8759 ParserErrorCode.MISSING_IDENTIFIER, |
| 8760 ParserErrorCode.MISSING_IDENTIFIER]); | 8760 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8761 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8761 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8762 } | 8762 } |
| 8763 | 8763 |
| 8764 void test_logicalOrExpression_missing_LHS() { | 8764 void test_logicalOrExpression_missing_LHS() { |
| 8765 BinaryExpression expression = ParserTestCase.parseExpression("|| y", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8765 BinaryExpression expression = ParserTestCase.parseExpression("|| y", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8766 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8766 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8767 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8767 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8768 } | 8768 } |
| 8769 | 8769 |
| 8770 void test_logicalOrExpression_missing_LHS_RHS() { | 8770 void test_logicalOrExpression_missing_LHS_RHS() { |
| 8771 BinaryExpression expression = ParserTestCase.parseExpression("||", [ | 8771 BinaryExpression expression = ParserTestCase.parseExpression("||", [ |
| 8772 ParserErrorCode.MISSING_IDENTIFIER, | 8772 ParserErrorCode.MISSING_IDENTIFIER, |
| 8773 ParserErrorCode.MISSING_IDENTIFIER]); | 8773 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8774 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8774 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8775 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8775 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8776 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8776 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8777 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8777 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8778 } | 8778 } |
| 8779 | 8779 |
| 8780 void test_logicalOrExpression_missing_RHS() { | 8780 void test_logicalOrExpression_missing_RHS() { |
| 8781 BinaryExpression expression = ParserTestCase.parseExpression("x ||", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8781 BinaryExpression expression = ParserTestCase.parseExpression("x ||", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8782 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8782 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8783 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8783 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8784 } | 8784 } |
| 8785 | 8785 |
| 8786 void test_logicalOrExpression_precedence_logicalAnd_left() { | 8786 void test_logicalOrExpression_precedence_logicalAnd_left() { |
| 8787 BinaryExpression expression = ParserTestCase.parseExpression("&& ||", [ | 8787 BinaryExpression expression = ParserTestCase.parseExpression("&& ||", [ |
| 8788 ParserErrorCode.MISSING_IDENTIFIER, | 8788 ParserErrorCode.MISSING_IDENTIFIER, |
| 8789 ParserErrorCode.MISSING_IDENTIFIER, | 8789 ParserErrorCode.MISSING_IDENTIFIER, |
| 8790 ParserErrorCode.MISSING_IDENTIFIER]); | 8790 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8791 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8791 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8792 } | 8792 } |
| 8793 | 8793 |
| 8794 void test_logicalOrExpression_precedence_logicalAnd_right() { | 8794 void test_logicalOrExpression_precedence_logicalAnd_right() { |
| 8795 BinaryExpression expression = ParserTestCase.parseExpression("|| &&", [ | 8795 BinaryExpression expression = ParserTestCase.parseExpression("|| &&", [ |
| 8796 ParserErrorCode.MISSING_IDENTIFIER, | 8796 ParserErrorCode.MISSING_IDENTIFIER, |
| 8797 ParserErrorCode.MISSING_IDENTIFIER, | 8797 ParserErrorCode.MISSING_IDENTIFIER, |
| 8798 ParserErrorCode.MISSING_IDENTIFIER]); | 8798 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8799 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8799 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8800 } | 8800 } |
| 8801 | 8801 |
| 8802 void test_missingIdentifier_afterAnnotation() { | 8802 void test_missingIdentifier_afterAnnotation() { |
| 8803 MethodDeclaration method = ParserTestCase.parse3("parseClassMember", <Object
> ["C"], "@override }", [ParserErrorCode.EXPECTED_CLASS_MEMBER]); | 8803 MethodDeclaration method = ParserTestCase.parse3("parseClassMember", <Object
> ["C"], "@override }", [ParserErrorCode.EXPECTED_CLASS_MEMBER]); |
| 8804 JUnitTestCase.assertNull(method.documentationComment); | 8804 JUnitTestCase.assertNull(method.documentationComment); |
| 8805 NodeList<Annotation> metadata = method.metadata; | 8805 NodeList<Annotation> metadata = method.metadata; |
| 8806 EngineTestCase.assertSize(1, metadata); | 8806 EngineTestCase.assertSize(1, metadata); |
| 8807 JUnitTestCase.assertEquals("override", metadata[0].name.name); | 8807 JUnitTestCase.assertEquals("override", metadata[0].name.name); |
| 8808 } | 8808 } |
| 8809 | 8809 |
| 8810 void test_multiplicativeExpression_missing_LHS() { | 8810 void test_multiplicativeExpression_missing_LHS() { |
| 8811 BinaryExpression expression = ParserTestCase.parseExpression("* y", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8811 BinaryExpression expression = ParserTestCase.parseExpression("* y", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8812 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8812 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8813 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8813 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8814 } | 8814 } |
| 8815 | 8815 |
| 8816 void test_multiplicativeExpression_missing_LHS_RHS() { | 8816 void test_multiplicativeExpression_missing_LHS_RHS() { |
| 8817 BinaryExpression expression = ParserTestCase.parseExpression("*", [ | 8817 BinaryExpression expression = ParserTestCase.parseExpression("*", [ |
| 8818 ParserErrorCode.MISSING_IDENTIFIER, | 8818 ParserErrorCode.MISSING_IDENTIFIER, |
| 8819 ParserErrorCode.MISSING_IDENTIFIER]); | 8819 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8820 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8820 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8821 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8821 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8822 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8822 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8823 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8823 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8824 } | 8824 } |
| 8825 | 8825 |
| 8826 void test_multiplicativeExpression_missing_RHS() { | 8826 void test_multiplicativeExpression_missing_RHS() { |
| 8827 BinaryExpression expression = ParserTestCase.parseExpression("x *", [ParserE
rrorCode.MISSING_IDENTIFIER]); | 8827 BinaryExpression expression = ParserTestCase.parseExpression("x *", [ParserE
rrorCode.MISSING_IDENTIFIER]); |
| 8828 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8828 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8829 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8829 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8830 } | 8830 } |
| 8831 | 8831 |
| 8832 void test_multiplicativeExpression_missing_RHS_super() { | 8832 void test_multiplicativeExpression_missing_RHS_super() { |
| 8833 BinaryExpression expression = ParserTestCase.parseExpression("super *", [Par
serErrorCode.MISSING_IDENTIFIER]); | 8833 BinaryExpression expression = ParserTestCase.parseExpression("super *", [Par
serErrorCode.MISSING_IDENTIFIER]); |
| 8834 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8834 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8835 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8835 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8836 } | 8836 } |
| 8837 | 8837 |
| 8838 void test_multiplicativeExpression_precedence_unary_left() { | 8838 void test_multiplicativeExpression_precedence_unary_left() { |
| 8839 BinaryExpression expression = ParserTestCase.parseExpression("-x *", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8839 BinaryExpression expression = ParserTestCase.parseExpression("-x *", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8840 EngineTestCase.assertInstanceOf(PrefixExpression, expression.leftOperand); | 8840 EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpr
ession, expression.leftOperand); |
| 8841 } | 8841 } |
| 8842 | 8842 |
| 8843 void test_multiplicativeExpression_precedence_unary_right() { | 8843 void test_multiplicativeExpression_precedence_unary_right() { |
| 8844 BinaryExpression expression = ParserTestCase.parseExpression("* -y", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8844 BinaryExpression expression = ParserTestCase.parseExpression("* -y", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8845 EngineTestCase.assertInstanceOf(PrefixExpression, expression.rightOperand); | 8845 EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression, PrefixExpr
ession, expression.rightOperand); |
| 8846 } | 8846 } |
| 8847 | 8847 |
| 8848 void test_multiplicativeExpression_super() { | 8848 void test_multiplicativeExpression_super() { |
| 8849 BinaryExpression expression = ParserTestCase.parseExpression("super == ==",
[ | 8849 BinaryExpression expression = ParserTestCase.parseExpression("super == ==",
[ |
| 8850 ParserErrorCode.MISSING_IDENTIFIER, | 8850 ParserErrorCode.MISSING_IDENTIFIER, |
| 8851 ParserErrorCode.MISSING_IDENTIFIER, | 8851 ParserErrorCode.MISSING_IDENTIFIER, |
| 8852 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); | 8852 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); |
| 8853 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8853 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8854 } | 8854 } |
| 8855 | 8855 |
| 8856 void test_prefixExpression_missing_operand_minus() { | 8856 void test_prefixExpression_missing_operand_minus() { |
| 8857 PrefixExpression expression = ParserTestCase.parseExpression("-", [ParserErr
orCode.MISSING_IDENTIFIER]); | 8857 PrefixExpression expression = ParserTestCase.parseExpression("-", [ParserErr
orCode.MISSING_IDENTIFIER]); |
| 8858 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.operand); | 8858 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.operand); |
| 8859 JUnitTestCase.assertTrue(expression.operand.isSynthetic); | 8859 JUnitTestCase.assertTrue(expression.operand.isSynthetic); |
| 8860 JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type); | 8860 JUnitTestCase.assertEquals(TokenType.MINUS, expression.operator.type); |
| 8861 } | 8861 } |
| 8862 | 8862 |
| 8863 void test_relationalExpression_missing_LHS() { | 8863 void test_relationalExpression_missing_LHS() { |
| 8864 IsExpression expression = ParserTestCase.parseExpression("is y", [ParserErro
rCode.MISSING_IDENTIFIER]); | 8864 IsExpression expression = ParserTestCase.parseExpression("is y", [ParserErro
rCode.MISSING_IDENTIFIER]); |
| 8865 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.expression); | 8865 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.expression); |
| 8866 JUnitTestCase.assertTrue(expression.expression.isSynthetic); | 8866 JUnitTestCase.assertTrue(expression.expression.isSynthetic); |
| 8867 } | 8867 } |
| 8868 | 8868 |
| 8869 void test_relationalExpression_missing_LHS_RHS() { | 8869 void test_relationalExpression_missing_LHS_RHS() { |
| 8870 IsExpression expression = ParserTestCase.parseExpression("is", [ | 8870 IsExpression expression = ParserTestCase.parseExpression("is", [ |
| 8871 ParserErrorCode.EXPECTED_TYPE_NAME, | 8871 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8872 ParserErrorCode.MISSING_IDENTIFIER]); | 8872 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8873 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.expression); | 8873 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.expression); |
| 8874 JUnitTestCase.assertTrue(expression.expression.isSynthetic); | 8874 JUnitTestCase.assertTrue(expression.expression.isSynthetic); |
| 8875 EngineTestCase.assertInstanceOf(TypeName, expression.type); | 8875 EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, expressi
on.type); |
| 8876 JUnitTestCase.assertTrue(expression.type.isSynthetic); | 8876 JUnitTestCase.assertTrue(expression.type.isSynthetic); |
| 8877 } | 8877 } |
| 8878 | 8878 |
| 8879 void test_relationalExpression_missing_RHS() { | 8879 void test_relationalExpression_missing_RHS() { |
| 8880 IsExpression expression = ParserTestCase.parseExpression("x is", [ParserErro
rCode.EXPECTED_TYPE_NAME]); | 8880 IsExpression expression = ParserTestCase.parseExpression("x is", [ParserErro
rCode.EXPECTED_TYPE_NAME]); |
| 8881 EngineTestCase.assertInstanceOf(TypeName, expression.type); | 8881 EngineTestCase.assertInstanceOf((obj) => obj is TypeName, TypeName, expressi
on.type); |
| 8882 JUnitTestCase.assertTrue(expression.type.isSynthetic); | 8882 JUnitTestCase.assertTrue(expression.type.isSynthetic); |
| 8883 } | 8883 } |
| 8884 | 8884 |
| 8885 void test_relationalExpression_precedence_shift_right() { | 8885 void test_relationalExpression_precedence_shift_right() { |
| 8886 IsExpression expression = ParserTestCase.parseExpression("<< is", [ | 8886 IsExpression expression = ParserTestCase.parseExpression("<< is", [ |
| 8887 ParserErrorCode.EXPECTED_TYPE_NAME, | 8887 ParserErrorCode.EXPECTED_TYPE_NAME, |
| 8888 ParserErrorCode.MISSING_IDENTIFIER, | 8888 ParserErrorCode.MISSING_IDENTIFIER, |
| 8889 ParserErrorCode.MISSING_IDENTIFIER]); | 8889 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8890 EngineTestCase.assertInstanceOf(BinaryExpression, expression.expression); | 8890 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.expression); |
| 8891 } | 8891 } |
| 8892 | 8892 |
| 8893 void test_shiftExpression_missing_LHS() { | 8893 void test_shiftExpression_missing_LHS() { |
| 8894 BinaryExpression expression = ParserTestCase.parseExpression("<< y", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8894 BinaryExpression expression = ParserTestCase.parseExpression("<< y", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8895 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8895 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8896 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8896 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8897 } | 8897 } |
| 8898 | 8898 |
| 8899 void test_shiftExpression_missing_LHS_RHS() { | 8899 void test_shiftExpression_missing_LHS_RHS() { |
| 8900 BinaryExpression expression = ParserTestCase.parseExpression("<<", [ | 8900 BinaryExpression expression = ParserTestCase.parseExpression("<<", [ |
| 8901 ParserErrorCode.MISSING_IDENTIFIER, | 8901 ParserErrorCode.MISSING_IDENTIFIER, |
| 8902 ParserErrorCode.MISSING_IDENTIFIER]); | 8902 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8903 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand); | 8903 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.leftOperand); |
| 8904 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); | 8904 JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic); |
| 8905 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8905 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8906 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8906 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8907 } | 8907 } |
| 8908 | 8908 |
| 8909 void test_shiftExpression_missing_RHS() { | 8909 void test_shiftExpression_missing_RHS() { |
| 8910 BinaryExpression expression = ParserTestCase.parseExpression("x <<", [Parser
ErrorCode.MISSING_IDENTIFIER]); | 8910 BinaryExpression expression = ParserTestCase.parseExpression("x <<", [Parser
ErrorCode.MISSING_IDENTIFIER]); |
| 8911 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8911 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8912 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8912 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8913 } | 8913 } |
| 8914 | 8914 |
| 8915 void test_shiftExpression_missing_RHS_super() { | 8915 void test_shiftExpression_missing_RHS_super() { |
| 8916 BinaryExpression expression = ParserTestCase.parseExpression("super <<", [Pa
rserErrorCode.MISSING_IDENTIFIER]); | 8916 BinaryExpression expression = ParserTestCase.parseExpression("super <<", [Pa
rserErrorCode.MISSING_IDENTIFIER]); |
| 8917 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); | 8917 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression.rightOperand); |
| 8918 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); | 8918 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); |
| 8919 } | 8919 } |
| 8920 | 8920 |
| 8921 void test_shiftExpression_precedence_unary_left() { | 8921 void test_shiftExpression_precedence_unary_left() { |
| 8922 BinaryExpression expression = ParserTestCase.parseExpression("+ <<", [ | 8922 BinaryExpression expression = ParserTestCase.parseExpression("+ <<", [ |
| 8923 ParserErrorCode.MISSING_IDENTIFIER, | 8923 ParserErrorCode.MISSING_IDENTIFIER, |
| 8924 ParserErrorCode.MISSING_IDENTIFIER, | 8924 ParserErrorCode.MISSING_IDENTIFIER, |
| 8925 ParserErrorCode.MISSING_IDENTIFIER]); | 8925 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8926 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8926 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8927 } | 8927 } |
| 8928 | 8928 |
| 8929 void test_shiftExpression_precedence_unary_right() { | 8929 void test_shiftExpression_precedence_unary_right() { |
| 8930 BinaryExpression expression = ParserTestCase.parseExpression("<< +", [ | 8930 BinaryExpression expression = ParserTestCase.parseExpression("<< +", [ |
| 8931 ParserErrorCode.MISSING_IDENTIFIER, | 8931 ParserErrorCode.MISSING_IDENTIFIER, |
| 8932 ParserErrorCode.MISSING_IDENTIFIER, | 8932 ParserErrorCode.MISSING_IDENTIFIER, |
| 8933 ParserErrorCode.MISSING_IDENTIFIER]); | 8933 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8934 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); | 8934 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.rightOperand); |
| 8935 } | 8935 } |
| 8936 | 8936 |
| 8937 void test_shiftExpression_super() { | 8937 void test_shiftExpression_super() { |
| 8938 BinaryExpression expression = ParserTestCase.parseExpression("super << <<",
[ | 8938 BinaryExpression expression = ParserTestCase.parseExpression("super << <<",
[ |
| 8939 ParserErrorCode.MISSING_IDENTIFIER, | 8939 ParserErrorCode.MISSING_IDENTIFIER, |
| 8940 ParserErrorCode.MISSING_IDENTIFIER]); | 8940 ParserErrorCode.MISSING_IDENTIFIER]); |
| 8941 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); | 8941 EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpr
ession, expression.leftOperand); |
| 8942 } | 8942 } |
| 8943 | 8943 |
| 8944 void test_typedef_eof() { | 8944 void test_typedef_eof() { |
| 8945 CompilationUnit unit = ParserTestCase.parseCompilationUnit("typedef n", [ | 8945 CompilationUnit unit = ParserTestCase.parseCompilationUnit("typedef n", [ |
| 8946 ParserErrorCode.EXPECTED_TOKEN, | 8946 ParserErrorCode.EXPECTED_TOKEN, |
| 8947 ParserErrorCode.MISSING_TYPEDEF_PARAMETERS]); | 8947 ParserErrorCode.MISSING_TYPEDEF_PARAMETERS]); |
| 8948 NodeList<CompilationUnitMember> declarations = unit.declarations; | 8948 NodeList<CompilationUnitMember> declarations = unit.declarations; |
| 8949 EngineTestCase.assertSize(1, declarations); | 8949 EngineTestCase.assertSize(1, declarations); |
| 8950 CompilationUnitMember member = declarations[0]; | 8950 CompilationUnitMember member = declarations[0]; |
| 8951 EngineTestCase.assertInstanceOf(FunctionTypeAlias, member); | 8951 EngineTestCase.assertInstanceOf((obj) => obj is FunctionTypeAlias, FunctionT
ypeAlias, member); |
| 8952 } | 8952 } |
| 8953 | 8953 |
| 8954 static dartSuite() { | 8954 static dartSuite() { |
| 8955 _ut.group('RecoveryParserTest', () { | 8955 _ut.group('RecoveryParserTest', () { |
| 8956 _ut.test('test_additiveExpression_missing_LHS', () { | 8956 _ut.test('test_additiveExpression_missing_LHS', () { |
| 8957 final __test = new RecoveryParserTest(); | 8957 final __test = new RecoveryParserTest(); |
| 8958 runJUnitTest(__test, __test.test_additiveExpression_missing_LHS); | 8958 runJUnitTest(__test, __test.test_additiveExpression_missing_LHS); |
| 8959 }); | 8959 }); |
| 8960 _ut.test('test_additiveExpression_missing_LHS_RHS', () { | 8960 _ut.test('test_additiveExpression_missing_LHS_RHS', () { |
| 8961 final __test = new RecoveryParserTest(); | 8961 final __test = new RecoveryParserTest(); |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9715 } | 9715 } |
| 9716 | 9716 |
| 9717 void fail_missingFunctionParameters_local_nonVoid_expression() { | 9717 void fail_missingFunctionParameters_local_nonVoid_expression() { |
| 9718 // The parser does not recognize this as a function declaration, so it tries
to parse it as an | 9718 // The parser does not recognize this as a function declaration, so it tries
to parse it as an |
| 9719 // expression statement. It isn't clear what the best error message is in th
is case. | 9719 // expression statement. It isn't clear what the best error message is in th
is case. |
| 9720 ParserTestCase.parseStatement("int f => x;", [ParserErrorCode.MISSING_FUNCTI
ON_PARAMETERS]); | 9720 ParserTestCase.parseStatement("int f => x;", [ParserErrorCode.MISSING_FUNCTI
ON_PARAMETERS]); |
| 9721 } | 9721 } |
| 9722 | 9722 |
| 9723 void fail_namedFunctionExpression() { | 9723 void fail_namedFunctionExpression() { |
| 9724 Expression expression = ParserTestCase.parse4("parsePrimaryExpression", "f()
{}", [ParserErrorCode.NAMED_FUNCTION_EXPRESSION]); | 9724 Expression expression = ParserTestCase.parse4("parsePrimaryExpression", "f()
{}", [ParserErrorCode.NAMED_FUNCTION_EXPRESSION]); |
| 9725 EngineTestCase.assertInstanceOf(FunctionExpression, expression); | 9725 EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, Function
Expression, expression); |
| 9726 } | 9726 } |
| 9727 | 9727 |
| 9728 void fail_unexpectedToken_invalidPostfixExpression() { | 9728 void fail_unexpectedToken_invalidPostfixExpression() { |
| 9729 // Note: this might not be the right error to produce, but some error should
be produced | 9729 // Note: this might not be the right error to produce, but some error should
be produced |
| 9730 ParserTestCase.parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]); | 9730 ParserTestCase.parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]); |
| 9731 } | 9731 } |
| 9732 | 9732 |
| 9733 void fail_varAndType_local() { | 9733 void fail_varAndType_local() { |
| 9734 // This is currently reporting EXPECTED_TOKEN for a missing semicolon, but t
his would be a | 9734 // This is currently reporting EXPECTED_TOKEN for a missing semicolon, but t
his would be a |
| 9735 // better error message. | 9735 // better error message. |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10651 void test_unexpectedToken_semicolonBetweenClassMembers() { | 10651 void test_unexpectedToken_semicolonBetweenClassMembers() { |
| 10652 ParserTestCase.parse3("parseClassDeclaration", <Object> [emptyCommentAndMeta
data(), null], "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN])
; | 10652 ParserTestCase.parse3("parseClassDeclaration", <Object> [emptyCommentAndMeta
data(), null], "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN])
; |
| 10653 } | 10653 } |
| 10654 | 10654 |
| 10655 void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() { | 10655 void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() { |
| 10656 ParserTestCase.parseCompilationUnit("int x; ; int y;", [ParserErrorCode.UNEX
PECTED_TOKEN]); | 10656 ParserTestCase.parseCompilationUnit("int x; ; int y;", [ParserErrorCode.UNEX
PECTED_TOKEN]); |
| 10657 } | 10657 } |
| 10658 | 10658 |
| 10659 void test_useOfUnaryPlusOperator() { | 10659 void test_useOfUnaryPlusOperator() { |
| 10660 SimpleIdentifier expression = ParserTestCase.parse4("parseUnaryExpression",
"+x", [ParserErrorCode.MISSING_IDENTIFIER]); | 10660 SimpleIdentifier expression = ParserTestCase.parse4("parseUnaryExpression",
"+x", [ParserErrorCode.MISSING_IDENTIFIER]); |
| 10661 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression); | 10661 EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier, SimpleIden
tifier, expression); |
| 10662 JUnitTestCase.assertTrue(expression.isSynthetic); | 10662 JUnitTestCase.assertTrue(expression.isSynthetic); |
| 10663 } | 10663 } |
| 10664 | 10664 |
| 10665 void test_varAndType_field() { | 10665 void test_varAndType_field() { |
| 10666 ParserTestCase.parseCompilationUnit("class C { var int x; }", [ParserErrorCo
de.VAR_AND_TYPE]); | 10666 ParserTestCase.parseCompilationUnit("class C { var int x; }", [ParserErrorCo
de.VAR_AND_TYPE]); |
| 10667 } | 10667 } |
| 10668 | 10668 |
| 10669 void test_varAndType_topLevelVariable() { | 10669 void test_varAndType_topLevelVariable() { |
| 10670 ParserTestCase.parseCompilationUnit("var int x;", [ParserErrorCode.VAR_AND_T
YPE]); | 10670 ParserTestCase.parseCompilationUnit("var int x;", [ParserErrorCode.VAR_AND_T
YPE]); |
| 10671 } | 10671 } |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11763 'parseTypeName_0': new MethodTrampoline(0, (Parser target) => target.parseType
Name()), | 11763 'parseTypeName_0': new MethodTrampoline(0, (Parser target) => target.parseType
Name()), |
| 11764 'parseTypeParameter_0': new MethodTrampoline(0, (Parser target) => target.pars
eTypeParameter()), | 11764 'parseTypeParameter_0': new MethodTrampoline(0, (Parser target) => target.pars
eTypeParameter()), |
| 11765 'parseTypeParameterList_0': new MethodTrampoline(0, (Parser target) => target.
parseTypeParameterList()), | 11765 'parseTypeParameterList_0': new MethodTrampoline(0, (Parser target) => target.
parseTypeParameterList()), |
| 11766 'parseWithClause_0': new MethodTrampoline(0, (Parser target) => target.parseWi
thClause()), | 11766 'parseWithClause_0': new MethodTrampoline(0, (Parser target) => target.parseWi
thClause()), |
| 11767 'advance_0': new MethodTrampoline(0, (Parser target) => target.advance()), | 11767 'advance_0': new MethodTrampoline(0, (Parser target) => target.advance()), |
| 11768 'appendScalarValue_5': new MethodTrampoline(5, (Parser target, arg0, arg1, arg
2, arg3, arg4) => target.appendScalarValue(arg0, arg1, arg2, arg3, arg4)), | 11768 'appendScalarValue_5': new MethodTrampoline(5, (Parser target, arg0, arg1, arg
2, arg3, arg4) => target.appendScalarValue(arg0, arg1, arg2, arg3, arg4)), |
| 11769 'computeStringValue_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target.computeStringValue(arg0, arg1, arg2)), | 11769 'computeStringValue_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target.computeStringValue(arg0, arg1, arg2)), |
| 11770 'convertToFunctionDeclaration_1': new MethodTrampoline(1, (Parser target, arg0
) => target.convertToFunctionDeclaration(arg0)), | 11770 'convertToFunctionDeclaration_1': new MethodTrampoline(1, (Parser target, arg0
) => target.convertToFunctionDeclaration(arg0)), |
| 11771 'couldBeStartOfCompilationUnitMember_0': new MethodTrampoline(0, (Parser targe
t) => target.couldBeStartOfCompilationUnitMember()), | 11771 'couldBeStartOfCompilationUnitMember_0': new MethodTrampoline(0, (Parser targe
t) => target.couldBeStartOfCompilationUnitMember()), |
| 11772 'createSyntheticIdentifier_0': new MethodTrampoline(0, (Parser target) => targ
et.createSyntheticIdentifier()), | 11772 'createSyntheticIdentifier_0': new MethodTrampoline(0, (Parser target) => targ
et.createSyntheticIdentifier()), |
| 11773 'createSyntheticKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget.createSyntheticKeyword(arg0)), |
| 11773 'createSyntheticStringLiteral_0': new MethodTrampoline(0, (Parser target) => t
arget.createSyntheticStringLiteral()), | 11774 'createSyntheticStringLiteral_0': new MethodTrampoline(0, (Parser target) => t
arget.createSyntheticStringLiteral()), |
| 11774 'createSyntheticToken_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.createSyntheticToken(arg0)), | 11775 'createSyntheticToken_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.createSyntheticToken(arg0)), |
| 11775 'ensureAssignable_1': new MethodTrampoline(1, (Parser target, arg0) => target.
ensureAssignable(arg0)), | 11776 'ensureAssignable_1': new MethodTrampoline(1, (Parser target, arg0) => target.
ensureAssignable(arg0)), |
| 11776 'expect_1': new MethodTrampoline(1, (Parser target, arg0) => target.expect(arg
0)), | 11777 'expect_1': new MethodTrampoline(1, (Parser target, arg0) => target.expect(arg
0)), |
| 11778 'expectKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target.exp
ectKeyword(arg0)), |
| 11777 'expectSemicolon_0': new MethodTrampoline(0, (Parser target) => target.expectS
emicolon()), | 11779 'expectSemicolon_0': new MethodTrampoline(0, (Parser target) => target.expectS
emicolon()), |
| 11778 'findRange_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.f
indRange(arg0, arg1)), | 11780 'findRange_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.f
indRange(arg0, arg1)), |
| 11779 'getCodeBlockRanges_1': new MethodTrampoline(1, (Parser target, arg0) => targe
t.getCodeBlockRanges(arg0)), | 11781 'getCodeBlockRanges_1': new MethodTrampoline(1, (Parser target, arg0) => targe
t.getCodeBlockRanges(arg0)), |
| 11780 'getEndToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.getEn
dToken(arg0)), | 11782 'getEndToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.getEn
dToken(arg0)), |
| 11781 'hasReturnTypeInTypeAlias_0': new MethodTrampoline(0, (Parser target) => targe
t.hasReturnTypeInTypeAlias()), | 11783 'hasReturnTypeInTypeAlias_0': new MethodTrampoline(0, (Parser target) => targe
t.hasReturnTypeInTypeAlias()), |
| 11782 'injectToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.injec
tToken(arg0)), | 11784 'injectToken_1': new MethodTrampoline(1, (Parser target, arg0) => target.injec
tToken(arg0)), |
| 11783 'isFunctionDeclaration_0': new MethodTrampoline(0, (Parser target) => target.i
sFunctionDeclaration()), | 11785 'isFunctionDeclaration_0': new MethodTrampoline(0, (Parser target) => target.i
sFunctionDeclaration()), |
| 11784 'isFunctionExpression_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.isFunctionExpression(arg0)), | 11786 'isFunctionExpression_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.isFunctionExpression(arg0)), |
| 11785 'isHexDigit_1': new MethodTrampoline(1, (Parser target, arg0) => target.isHexD
igit(arg0)), | 11787 'isHexDigit_1': new MethodTrampoline(1, (Parser target, arg0) => target.isHexD
igit(arg0)), |
| 11786 'isInitializedVariableDeclaration_0': new MethodTrampoline(0, (Parser target)
=> target.isInitializedVariableDeclaration()), | 11788 'isInitializedVariableDeclaration_0': new MethodTrampoline(0, (Parser target)
=> target.isInitializedVariableDeclaration()), |
| 11787 'isLinkText_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.
isLinkText(arg0, arg1)), | 11789 'isLinkText_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.
isLinkText(arg0, arg1)), |
| 11788 'isOperator_1': new MethodTrampoline(1, (Parser target, arg0) => target.isOper
ator(arg0)), | 11790 'isOperator_1': new MethodTrampoline(1, (Parser target, arg0) => target.isOper
ator(arg0)), |
| 11789 'isSwitchMember_0': new MethodTrampoline(0, (Parser target) => target.isSwitch
Member()), | 11791 'isSwitchMember_0': new MethodTrampoline(0, (Parser target) => target.isSwitch
Member()), |
| 11790 'isTypedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target
.isTypedIdentifier(arg0)), | 11792 'isTypedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target
.isTypedIdentifier(arg0)), |
| 11791 'lexicallyFirst_1': new MethodTrampoline(1, (Parser target, arg0) => target.le
xicallyFirst(arg0)), | 11793 'lexicallyFirst_1': new MethodTrampoline(1, (Parser target, arg0) => target.le
xicallyFirst(arg0)), |
| 11792 'lockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.lockE
rrorListener()), | 11794 'lockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.lockE
rrorListener()), |
| 11793 'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target.matches(a
rg0)), | 11795 'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target.matches(a
rg0)), |
| 11794 'matches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.mat
ches3(arg0, arg1)), | |
| 11795 'matchesAny_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.
matchesAny(arg0, arg1)), | 11796 'matchesAny_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.
matchesAny(arg0, arg1)), |
| 11796 'matchesIdentifier_0': new MethodTrampoline(0, (Parser target) => target.match
esIdentifier()), | 11797 'matchesIdentifier_0': new MethodTrampoline(0, (Parser target) => target.match
esIdentifier()), |
| 11797 'matchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target
.matchesIdentifier2(arg0)), | 11798 'matchesKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target.ma
tchesKeyword(arg0)), |
| 11799 'matchesString_1': new MethodTrampoline(1, (Parser target, arg0) => target.mat
chesString(arg0)), |
| 11798 'optional_1': new MethodTrampoline(1, (Parser target, arg0) => target.optional
(arg0)), | 11800 'optional_1': new MethodTrampoline(1, (Parser target, arg0) => target.optional
(arg0)), |
| 11799 'parseAdditiveExpression_0': new MethodTrampoline(0, (Parser target) => target
.parseAdditiveExpression()), | 11801 'parseAdditiveExpression_0': new MethodTrampoline(0, (Parser target) => target
.parseAdditiveExpression()), |
| 11800 'parseArgumentDefinitionTest_0': new MethodTrampoline(0, (Parser target) => ta
rget.parseArgumentDefinitionTest()), | 11802 'parseArgumentDefinitionTest_0': new MethodTrampoline(0, (Parser target) => ta
rget.parseArgumentDefinitionTest()), |
| 11801 'parseAssertStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseAssertStatement()), | 11803 'parseAssertStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseAssertStatement()), |
| 11802 'parseAssignableExpression_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.parseAssignableExpression(arg0)), | 11804 'parseAssignableExpression_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.parseAssignableExpression(arg0)), |
| 11803 'parseAssignableSelector_2': new MethodTrampoline(2, (Parser target, arg0, arg
1) => target.parseAssignableSelector(arg0, arg1)), | 11805 'parseAssignableSelector_2': new MethodTrampoline(2, (Parser target, arg0, arg
1) => target.parseAssignableSelector(arg0, arg1)), |
| 11804 'parseBitwiseAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseBitwiseAndExpression()), | 11806 'parseBitwiseAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseBitwiseAndExpression()), |
| 11805 'parseBitwiseXorExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseBitwiseXorExpression()), | 11807 'parseBitwiseXorExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseBitwiseXorExpression()), |
| 11806 'parseBreakStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seBreakStatement()), | 11808 'parseBreakStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seBreakStatement()), |
| 11807 'parseCascadeSection_0': new MethodTrampoline(0, (Parser target) => target.par
seCascadeSection()), | 11809 'parseCascadeSection_0': new MethodTrampoline(0, (Parser target) => target.par
seCascadeSection()), |
| (...skipping 15 matching lines...) Expand all Loading... |
| 11823 'parseEmptyStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seEmptyStatement()), | 11825 'parseEmptyStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seEmptyStatement()), |
| 11824 'parseEqualityExpression_0': new MethodTrampoline(0, (Parser target) => target
.parseEqualityExpression()), | 11826 'parseEqualityExpression_0': new MethodTrampoline(0, (Parser target) => target
.parseEqualityExpression()), |
| 11825 'parseExportDirective_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseExportDirective(arg0)), | 11827 'parseExportDirective_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseExportDirective(arg0)), |
| 11826 'parseExpressionList_0': new MethodTrampoline(0, (Parser target) => target.par
seExpressionList()), | 11828 'parseExpressionList_0': new MethodTrampoline(0, (Parser target) => target.par
seExpressionList()), |
| 11827 'parseFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.parseFinalConstVarOrType(arg0)), | 11829 'parseFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.parseFinalConstVarOrType(arg0)), |
| 11828 'parseFormalParameter_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseFormalParameter(arg0)), | 11830 'parseFormalParameter_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseFormalParameter(arg0)), |
| 11829 'parseForStatement_0': new MethodTrampoline(0, (Parser target) => target.parse
ForStatement()), | 11831 'parseForStatement_0': new MethodTrampoline(0, (Parser target) => target.parse
ForStatement()), |
| 11830 'parseFunctionBody_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg
2) => target.parseFunctionBody(arg0, arg1, arg2)), | 11832 'parseFunctionBody_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg
2) => target.parseFunctionBody(arg0, arg1, arg2)), |
| 11831 'parseFunctionDeclaration_3': new MethodTrampoline(3, (Parser target, arg0, ar
g1, arg2) => target.parseFunctionDeclaration(arg0, arg1, arg2)), | 11833 'parseFunctionDeclaration_3': new MethodTrampoline(3, (Parser target, arg0, ar
g1, arg2) => target.parseFunctionDeclaration(arg0, arg1, arg2)), |
| 11832 'parseFunctionDeclarationStatement_0': new MethodTrampoline(0, (Parser target)
=> target.parseFunctionDeclarationStatement()), | 11834 'parseFunctionDeclarationStatement_0': new MethodTrampoline(0, (Parser target)
=> target.parseFunctionDeclarationStatement()), |
| 11833 'parseFunctionDeclarationStatement_2': new MethodTrampoline(2, (Parser target,
arg0, arg1) => target.parseFunctionDeclarationStatement2(arg0, arg1)), | 11835 'parseFunctionDeclarationStatementAfterReturnType_2': new MethodTrampoline(2,
(Parser target, arg0, arg1) => target.parseFunctionDeclarationStatementAfterRetu
rnType(arg0, arg1)), |
| 11834 'parseFunctionTypeAlias_2': new MethodTrampoline(2, (Parser target, arg0, arg1
) => target.parseFunctionTypeAlias(arg0, arg1)), | 11836 'parseFunctionTypeAlias_2': new MethodTrampoline(2, (Parser target, arg0, arg1
) => target.parseFunctionTypeAlias(arg0, arg1)), |
| 11835 'parseGetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg
3) => target.parseGetter(arg0, arg1, arg2, arg3)), | 11837 'parseGetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg
3) => target.parseGetter(arg0, arg1, arg2, arg3)), |
| 11836 'parseIdentifierList_0': new MethodTrampoline(0, (Parser target) => target.par
seIdentifierList()), | 11838 'parseIdentifierList_0': new MethodTrampoline(0, (Parser target) => target.par
seIdentifierList()), |
| 11837 'parseIfStatement_0': new MethodTrampoline(0, (Parser target) => target.parseI
fStatement()), | 11839 'parseIfStatement_0': new MethodTrampoline(0, (Parser target) => target.parseI
fStatement()), |
| 11838 'parseImportDirective_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseImportDirective(arg0)), | 11840 'parseImportDirective_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.parseImportDirective(arg0)), |
| 11839 'parseInitializedIdentifierList_4': new MethodTrampoline(4, (Parser target, ar
g0, arg1, arg2, arg3) => target.parseInitializedIdentifierList(arg0, arg1, arg2,
arg3)), | 11841 'parseInitializedIdentifierList_4': new MethodTrampoline(4, (Parser target, ar
g0, arg1, arg2, arg3) => target.parseInitializedIdentifierList(arg0, arg1, arg2,
arg3)), |
| 11840 'parseInstanceCreationExpression_1': new MethodTrampoline(1, (Parser target, a
rg0) => target.parseInstanceCreationExpression(arg0)), | 11842 'parseInstanceCreationExpression_1': new MethodTrampoline(1, (Parser target, a
rg0) => target.parseInstanceCreationExpression(arg0)), |
| 11841 'parseLibraryDirective_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.parseLibraryDirective(arg0)), | 11843 'parseLibraryDirective_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.parseLibraryDirective(arg0)), |
| 11842 'parseLibraryName_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => t
arget.parseLibraryName(arg0, arg1)), | 11844 'parseLibraryName_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => t
arget.parseLibraryName(arg0, arg1)), |
| 11843 'parseListLiteral_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => t
arget.parseListLiteral(arg0, arg1)), | 11845 'parseListLiteral_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => t
arget.parseListLiteral(arg0, arg1)), |
| 11844 'parseListOrMapLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.parseListOrMapLiteral(arg0)), | 11846 'parseListOrMapLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.parseListOrMapLiteral(arg0)), |
| 11845 'parseLogicalAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseLogicalAndExpression()), | 11847 'parseLogicalAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseLogicalAndExpression()), |
| 11846 'parseMapLiteral_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => ta
rget.parseMapLiteral(arg0, arg1)), | 11848 'parseMapLiteral_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => ta
rget.parseMapLiteral(arg0, arg1)), |
| 11847 'parseMethodDeclaration_4': new MethodTrampoline(4, (Parser target, arg0, arg1
, arg2, arg3) => target.parseMethodDeclaration(arg0, arg1, arg2, arg3)), | 11849 'parseMethodDeclarationAfterParameters_6': new MethodTrampoline(6, (Parser tar
get, arg0, arg1, arg2, arg3, arg4, arg5) => target.parseMethodDeclarationAfterPa
rameters(arg0, arg1, arg2, arg3, arg4, arg5)), |
| 11848 'parseMethodDeclaration_6': new MethodTrampoline(6, (Parser target, arg0, arg1
, arg2, arg3, arg4, arg5) => target.parseMethodDeclaration2(arg0, arg1, arg2, ar
g3, arg4, arg5)), | 11850 'parseMethodDeclarationAfterReturnType_4': new MethodTrampoline(4, (Parser tar
get, arg0, arg1, arg2, arg3) => target.parseMethodDeclarationAfterReturnType(arg
0, arg1, arg2, arg3)), |
| 11849 'parseModifiers_0': new MethodTrampoline(0, (Parser target) => target.parseMod
ifiers()), | 11851 'parseModifiers_0': new MethodTrampoline(0, (Parser target) => target.parseMod
ifiers()), |
| 11850 'parseMultiplicativeExpression_0': new MethodTrampoline(0, (Parser target) =>
target.parseMultiplicativeExpression()), | 11852 'parseMultiplicativeExpression_0': new MethodTrampoline(0, (Parser target) =>
target.parseMultiplicativeExpression()), |
| 11851 'parseNativeClause_0': new MethodTrampoline(0, (Parser target) => target.parse
NativeClause()), | 11853 'parseNativeClause_0': new MethodTrampoline(0, (Parser target) => target.parse
NativeClause()), |
| 11852 'parseNewExpression_0': new MethodTrampoline(0, (Parser target) => target.pars
eNewExpression()), | 11854 'parseNewExpression_0': new MethodTrampoline(0, (Parser target) => target.pars
eNewExpression()), |
| 11853 'parseNonLabeledStatement_0': new MethodTrampoline(0, (Parser target) => targe
t.parseNonLabeledStatement()), | 11855 'parseNonLabeledStatement_0': new MethodTrampoline(0, (Parser target) => targe
t.parseNonLabeledStatement()), |
| 11854 'parseOperator_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) =
> target.parseOperator(arg0, arg1, arg2)), | 11856 'parseOperator_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) =
> target.parseOperator(arg0, arg1, arg2)), |
| 11855 'parseOptionalReturnType_0': new MethodTrampoline(0, (Parser target) => target
.parseOptionalReturnType()), | 11857 'parseOptionalReturnType_0': new MethodTrampoline(0, (Parser target) => target
.parseOptionalReturnType()), |
| 11856 'parsePartDirective_1': new MethodTrampoline(1, (Parser target, arg0) => targe
t.parsePartDirective(arg0)), | 11858 'parsePartDirective_1': new MethodTrampoline(1, (Parser target, arg0) => targe
t.parsePartDirective(arg0)), |
| 11857 'parsePostfixExpression_0': new MethodTrampoline(0, (Parser target) => target.
parsePostfixExpression()), | 11859 'parsePostfixExpression_0': new MethodTrampoline(0, (Parser target) => target.
parsePostfixExpression()), |
| 11858 'parsePrimaryExpression_0': new MethodTrampoline(0, (Parser target) => target.
parsePrimaryExpression()), | 11860 'parsePrimaryExpression_0': new MethodTrampoline(0, (Parser target) => target.
parsePrimaryExpression()), |
| 11859 'parseRedirectingConstructorInvocation_0': new MethodTrampoline(0, (Parser tar
get) => target.parseRedirectingConstructorInvocation()), | 11861 'parseRedirectingConstructorInvocation_0': new MethodTrampoline(0, (Parser tar
get) => target.parseRedirectingConstructorInvocation()), |
| 11860 'parseRelationalExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseRelationalExpression()), | 11862 'parseRelationalExpression_0': new MethodTrampoline(0, (Parser target) => targ
et.parseRelationalExpression()), |
| 11861 'parseRethrowExpression_0': new MethodTrampoline(0, (Parser target) => target.
parseRethrowExpression()), | 11863 'parseRethrowExpression_0': new MethodTrampoline(0, (Parser target) => target.
parseRethrowExpression()), |
| 11862 'parseReturnStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseReturnStatement()), | 11864 'parseReturnStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseReturnStatement()), |
| 11863 'parseSetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg
3) => target.parseSetter(arg0, arg1, arg2, arg3)), | 11865 'parseSetter_4': new MethodTrampoline(4, (Parser target, arg0, arg1, arg2, arg
3) => target.parseSetter(arg0, arg1, arg2, arg3)), |
| 11864 'parseShiftExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseShiftExpression()), | 11866 'parseShiftExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseShiftExpression()), |
| 11865 'parseStatements_0': new MethodTrampoline(0, (Parser target) => target.parseSt
atements2()), | 11867 'parseStatementList_0': new MethodTrampoline(0, (Parser target) => target.pars
eStatementList()), |
| 11866 'parseStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.parseStringInterpolation(arg0)), | 11868 'parseStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.parseStringInterpolation(arg0)), |
| 11867 'parseSuperConstructorInvocation_0': new MethodTrampoline(0, (Parser target) =
> target.parseSuperConstructorInvocation()), | 11869 'parseSuperConstructorInvocation_0': new MethodTrampoline(0, (Parser target) =
> target.parseSuperConstructorInvocation()), |
| 11868 'parseSwitchStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseSwitchStatement()), | 11870 'parseSwitchStatement_0': new MethodTrampoline(0, (Parser target) => target.pa
rseSwitchStatement()), |
| 11869 'parseSymbolLiteral_0': new MethodTrampoline(0, (Parser target) => target.pars
eSymbolLiteral()), | 11871 'parseSymbolLiteral_0': new MethodTrampoline(0, (Parser target) => target.pars
eSymbolLiteral()), |
| 11870 'parseThrowExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseThrowExpression()), | 11872 'parseThrowExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseThrowExpression()), |
| 11871 'parseThrowExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target
) => target.parseThrowExpressionWithoutCascade()), | 11873 'parseThrowExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target
) => target.parseThrowExpressionWithoutCascade()), |
| 11872 'parseTryStatement_0': new MethodTrampoline(0, (Parser target) => target.parse
TryStatement()), | 11874 'parseTryStatement_0': new MethodTrampoline(0, (Parser target) => target.parse
TryStatement()), |
| 11873 'parseTypeAlias_1': new MethodTrampoline(1, (Parser target, arg0) => target.pa
rseTypeAlias(arg0)), | 11875 'parseTypeAlias_1': new MethodTrampoline(1, (Parser target, arg0) => target.pa
rseTypeAlias(arg0)), |
| 11874 'parseUnaryExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseUnaryExpression()), | 11876 'parseUnaryExpression_0': new MethodTrampoline(0, (Parser target) => target.pa
rseUnaryExpression()), |
| 11875 'parseVariableDeclaration_0': new MethodTrampoline(0, (Parser target) => targe
t.parseVariableDeclaration()), | 11877 'parseVariableDeclaration_0': new MethodTrampoline(0, (Parser target) => targe
t.parseVariableDeclaration()), |
| 11876 'parseVariableDeclarationList_1': new MethodTrampoline(1, (Parser target, arg0
) => target.parseVariableDeclarationList(arg0)), | 11878 'parseVariableDeclarationListAfterMetadata_1': new MethodTrampoline(1, (Parser
target, arg0) => target.parseVariableDeclarationListAfterMetadata(arg0)), |
| 11877 'parseVariableDeclarationList_3': new MethodTrampoline(3, (Parser target, arg0
, arg1, arg2) => target.parseVariableDeclarationList2(arg0, arg1, arg2)), | 11879 'parseVariableDeclarationListAfterType_3': new MethodTrampoline(3, (Parser tar
get, arg0, arg1, arg2) => target.parseVariableDeclarationListAfterType(arg0, arg
1, arg2)), |
| 11878 'parseVariableDeclarationStatement_1': new MethodTrampoline(1, (Parser target,
arg0) => target.parseVariableDeclarationStatement(arg0)), | 11880 'parseVariableDeclarationStatementAfterMetadata_1': new MethodTrampoline(1, (P
arser target, arg0) => target.parseVariableDeclarationStatementAfterMetadata(arg
0)), |
| 11879 'parseVariableDeclarationStatement_3': new MethodTrampoline(3, (Parser target,
arg0, arg1, arg2) => target.parseVariableDeclarationStatement2(arg0, arg1, arg2
)), | 11881 'parseVariableDeclarationStatementAfterType_3': new MethodTrampoline(3, (Parse
r target, arg0, arg1, arg2) => target.parseVariableDeclarationStatementAfterType
(arg0, arg1, arg2)), |
| 11880 'parseWhileStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seWhileStatement()), | 11882 'parseWhileStatement_0': new MethodTrampoline(0, (Parser target) => target.par
seWhileStatement()), |
| 11881 'peek_0': new MethodTrampoline(0, (Parser target) => target.peek()), | 11883 'peek_0': new MethodTrampoline(0, (Parser target) => target.peek()), |
| 11882 'peek_1': new MethodTrampoline(1, (Parser target, arg0) => target.peek2(arg0))
, | 11884 'peek_1': new MethodTrampoline(1, (Parser target, arg0) => target.peek2(arg0))
, |
| 11883 'reportError_1': new MethodTrampoline(1, (Parser target, arg0) => target.repor
tError(arg0)), | 11885 'reportError_1': new MethodTrampoline(1, (Parser target, arg0) => target.repor
tError(arg0)), |
| 11884 'reportError_3': new MethodTrampoline(3, (Parser target, arg0, arg1, arg2) =>
target.reportError12(arg0, arg1, arg2)), | 11886 'reportErrorForCurrentToken_2': new MethodTrampoline(2, (Parser target, arg0,
arg1) => target.reportErrorForCurrentToken(arg0, arg1)), |
| 11885 'reportError_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target
.reportError13(arg0, arg1)), | 11887 'reportErrorForNode_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target.reportErrorForNode(arg0, arg1, arg2)), |
| 11888 'reportErrorForToken_3': new MethodTrampoline(3, (Parser target, arg0, arg1, a
rg2) => target.reportErrorForToken(arg0, arg1, arg2)), |
| 11886 'skipBlock_0': new MethodTrampoline(0, (Parser target) => target.skipBlock()), | 11889 'skipBlock_0': new MethodTrampoline(0, (Parser target) => target.skipBlock()), |
| 11887 'skipFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipFinalConstVarOrType(arg0)), | 11890 'skipFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipFinalConstVarOrType(arg0)), |
| 11888 'skipFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipFormalParameterList(arg0)), | 11891 'skipFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipFormalParameterList(arg0)), |
| 11889 'skipPastMatchingToken_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.skipPastMatchingToken(arg0)), | 11892 'skipPastMatchingToken_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.skipPastMatchingToken(arg0)), |
| 11890 'skipPrefixedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget.skipPrefixedIdentifier(arg0)), | 11893 'skipPrefixedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget.skipPrefixedIdentifier(arg0)), |
| 11891 'skipReturnType_1': new MethodTrampoline(1, (Parser target, arg0) => target.sk
ipReturnType(arg0)), | 11894 'skipReturnType_1': new MethodTrampoline(1, (Parser target, arg0) => target.sk
ipReturnType(arg0)), |
| 11892 'skipSimpleIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.skipSimpleIdentifier(arg0)), | 11895 'skipSimpleIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.skipSimpleIdentifier(arg0)), |
| 11893 'skipStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipStringInterpolation(arg0)), | 11896 'skipStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target.skipStringInterpolation(arg0)), |
| 11894 'skipStringLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => target
.skipStringLiteral(arg0)), | 11897 'skipStringLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => target
.skipStringLiteral(arg0)), |
| 11895 'skipTypeArgumentList_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.skipTypeArgumentList(arg0)), | 11898 'skipTypeArgumentList_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get.skipTypeArgumentList(arg0)), |
| 11896 'skipTypeName_1': new MethodTrampoline(1, (Parser target, arg0) => target.skip
TypeName(arg0)), | 11899 'skipTypeName_1': new MethodTrampoline(1, (Parser target, arg0) => target.skip
TypeName(arg0)), |
| 11897 'skipTypeParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.skipTypeParameterList(arg0)), | 11900 'skipTypeParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget.skipTypeParameterList(arg0)), |
| 11901 'tokenMatches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => targe
t.tokenMatches(arg0, arg1)), |
| 11902 'tokenMatchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget.tokenMatchesIdentifier(arg0)), |
| 11903 'tokenMatchesKeyword_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =
> target.tokenMatchesKeyword(arg0, arg1)), |
| 11898 'translateCharacter_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target.translateCharacter(arg0, arg1, arg2)), | 11904 'translateCharacter_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target.translateCharacter(arg0, arg1, arg2)), |
| 11899 'unlockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.unl
ockErrorListener()), | 11905 'unlockErrorListener_0': new MethodTrampoline(0, (Parser target) => target.unl
ockErrorListener()), |
| 11900 'validateFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateFormalParameterList(arg0)), | 11906 'validateFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateFormalParameterList(arg0)), |
| 11901 'validateModifiersForClass_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.validateModifiersForClass(arg0)), | 11907 'validateModifiersForClass_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.validateModifiersForClass(arg0)), |
| 11902 'validateModifiersForConstructor_1': new MethodTrampoline(1, (Parser target, a
rg0) => target.validateModifiersForConstructor(arg0)), | 11908 'validateModifiersForConstructor_1': new MethodTrampoline(1, (Parser target, a
rg0) => target.validateModifiersForConstructor(arg0)), |
| 11903 'validateModifiersForField_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.validateModifiersForField(arg0)), | 11909 'validateModifiersForField_1': new MethodTrampoline(1, (Parser target, arg0) =
> target.validateModifiersForField(arg0)), |
| 11904 'validateModifiersForFunctionDeclarationStatement_1': new MethodTrampoline(1,
(Parser target, arg0) => target.validateModifiersForFunctionDeclarationStatement
(arg0)), | 11910 'validateModifiersForFunctionDeclarationStatement_1': new MethodTrampoline(1,
(Parser target, arg0) => target.validateModifiersForFunctionDeclarationStatement
(arg0)), |
| 11905 'validateModifiersForGetterOrSetterOrMethod_1': new MethodTrampoline(1, (Parse
r target, arg0) => target.validateModifiersForGetterOrSetterOrMethod(arg0)), | 11911 'validateModifiersForGetterOrSetterOrMethod_1': new MethodTrampoline(1, (Parse
r target, arg0) => target.validateModifiersForGetterOrSetterOrMethod(arg0)), |
| 11906 'validateModifiersForOperator_1': new MethodTrampoline(1, (Parser target, arg0
) => target.validateModifiersForOperator(arg0)), | 11912 'validateModifiersForOperator_1': new MethodTrampoline(1, (Parser target, arg0
) => target.validateModifiersForOperator(arg0)), |
| 11907 'validateModifiersForTopLevelDeclaration_1': new MethodTrampoline(1, (Parser t
arget, arg0) => target.validateModifiersForTopLevelDeclaration(arg0)), | 11913 'validateModifiersForTopLevelDeclaration_1': new MethodTrampoline(1, (Parser t
arget, arg0) => target.validateModifiersForTopLevelDeclaration(arg0)), |
| 11908 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), | 11914 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), |
| 11909 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), | 11915 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), |
| 11910 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateModifiersForTypedef(arg0)),}; | 11916 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateModifiersForTypedef(arg0)),}; |
| 11911 | 11917 |
| 11912 | 11918 |
| 11913 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj
ects, Token tokenStream) { | 11919 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj
ects, Token tokenStream) { |
| 11914 parser.currentToken = tokenStream; | 11920 parser.currentToken = tokenStream; |
| 11915 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length}
']; | 11921 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length}
']; |
| 11916 return method.invoke(parser, objects); | 11922 return method.invoke(parser, objects); |
| 11917 } | 11923 } |
| OLD | NEW |