| 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.ast_test; | 8 library engine.ast_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| 11 import 'package:analyzer/src/generated/java_engine.dart'; | 11 import 'package:analyzer/src/generated/java_engine.dart'; |
| 12 import 'package:analyzer/src/generated/java_junit.dart'; | 12 import 'package:analyzer/src/generated/java_junit.dart'; |
| 13 import 'package:analyzer/src/generated/java_engine.dart' show Predicate; | 13 import 'package:analyzer/src/generated/java_engine.dart' show Predicate; |
| 14 import 'package:analyzer/src/generated/scanner.dart'; | 14 import 'package:analyzer/src/generated/scanner.dart'; |
| 15 import 'package:analyzer/src/generated/ast.dart'; | 15 import 'package:analyzer/src/generated/ast.dart'; |
| 16 import 'package:unittest/unittest.dart' as _ut; | 16 import 'package:unittest/unittest.dart' as _ut; |
| 17 import 'parser_test.dart' show ParserTestCase; | 17 import 'parser_test.dart' show ParserTestCase; |
| 18 import 'test_support.dart'; | 18 import 'test_support.dart'; |
| 19 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 19 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
| 20 import 'package:analyzer/src/generated/testing/token_factory.dart'; | 20 import 'package:analyzer/src/generated/testing/token_factory.dart'; |
| 21 | 21 |
| 22 import '../reflective_tests.dart'; |
| 23 |
| 24 |
| 22 class AssignmentKind extends Enum<AssignmentKind> { | 25 class AssignmentKind extends Enum<AssignmentKind> { |
| 23 static const AssignmentKind BINARY = const AssignmentKind('BINARY', 0); | 26 static const AssignmentKind BINARY = const AssignmentKind('BINARY', 0); |
| 24 | 27 |
| 25 static const AssignmentKind COMPOUND_LEFT = const AssignmentKind('COMPOUND_LEF
T', 1); | 28 static const AssignmentKind COMPOUND_LEFT = const AssignmentKind('COMPOUND_LEF
T', 1); |
| 26 | 29 |
| 27 static const AssignmentKind COMPOUND_RIGHT = const AssignmentKind('COMPOUND_RI
GHT', 2); | 30 static const AssignmentKind COMPOUND_RIGHT = const AssignmentKind('COMPOUND_RI
GHT', 2); |
| 28 | 31 |
| 29 static const AssignmentKind POSTFIX_INC = const AssignmentKind('POSTFIX_INC',
3); | 32 static const AssignmentKind POSTFIX_INC = const AssignmentKind('POSTFIX_INC',
3); |
| 30 | 33 |
| 31 static const AssignmentKind PREFIX_DEC = const AssignmentKind('PREFIX_DEC', 4)
; | 34 static const AssignmentKind PREFIX_DEC = const AssignmentKind('PREFIX_DEC', 4)
; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 49 PREFIX_INC, | 52 PREFIX_INC, |
| 50 PREFIX_NOT, | 53 PREFIX_NOT, |
| 51 SIMPLE_LEFT, | 54 SIMPLE_LEFT, |
| 52 SIMPLE_RIGHT, | 55 SIMPLE_RIGHT, |
| 53 NONE]; | 56 NONE]; |
| 54 | 57 |
| 55 const AssignmentKind(String name, int ordinal) : super(name, ordinal); | 58 const AssignmentKind(String name, int ordinal) : super(name, ordinal); |
| 56 } | 59 } |
| 57 | 60 |
| 58 class BreadthFirstVisitorTest extends ParserTestCase { | 61 class BreadthFirstVisitorTest extends ParserTestCase { |
| 59 void testIt() { | 62 void test_it() { |
| 60 String source = EngineTestCase.createSource([ | 63 String source = EngineTestCase.createSource([ |
| 61 "class A {", | 64 "class A {", |
| 62 " bool get g => true;", | 65 " bool get g => true;", |
| 63 "}", | 66 "}", |
| 64 "class B {", | 67 "class B {", |
| 65 " int f() {", | 68 " int f() {", |
| 66 " num q() {", | 69 " num q() {", |
| 67 " return 3;", | 70 " return 3;", |
| 68 " }", | 71 " }", |
| 69 " return q() + 4;", | 72 " return q() + 4;", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 81 BreadthFirstVisitor<Object> visitor = new BreadthFirstVisitor_BreadthFirstVi
sitorTest_testIt(nodes); | 84 BreadthFirstVisitor<Object> visitor = new BreadthFirstVisitor_BreadthFirstVi
sitorTest_testIt(nodes); |
| 82 visitor.visitAllNodes(unit); | 85 visitor.visitAllNodes(unit); |
| 83 EngineTestCase.assertSizeOfList(59, nodes); | 86 EngineTestCase.assertSizeOfList(59, nodes); |
| 84 EngineTestCase.assertInstanceOf((obj) => obj is CompilationUnit, Compilation
Unit, nodes[0]); | 87 EngineTestCase.assertInstanceOf((obj) => obj is CompilationUnit, Compilation
Unit, nodes[0]); |
| 85 EngineTestCase.assertInstanceOf((obj) => obj is ClassDeclaration, ClassDecla
ration, nodes[2]); | 88 EngineTestCase.assertInstanceOf((obj) => obj is ClassDeclaration, ClassDecla
ration, nodes[2]); |
| 86 EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclaration, Functio
nDeclaration, nodes[3]); | 89 EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclaration, Functio
nDeclaration, nodes[3]); |
| 87 EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclarationStatement
, FunctionDeclarationStatement, nodes[27]); | 90 EngineTestCase.assertInstanceOf((obj) => obj is FunctionDeclarationStatement
, FunctionDeclarationStatement, nodes[27]); |
| 88 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, nodes[58]); | 91 EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral, IntegerLiter
al, nodes[58]); |
| 89 //3 | 92 //3 |
| 90 } | 93 } |
| 91 | |
| 92 static dartSuite() { | |
| 93 _ut.group('BreadthFirstVisitorTest', () { | |
| 94 _ut.test('testIt', () { | |
| 95 final __test = new BreadthFirstVisitorTest(); | |
| 96 runJUnitTest(__test, __test.testIt); | |
| 97 }); | |
| 98 }); | |
| 99 } | |
| 100 } | 94 } |
| 101 | 95 |
| 102 class BreadthFirstVisitor_BreadthFirstVisitorTest_testIt extends BreadthFirstVis
itor<Object> { | 96 class BreadthFirstVisitor_BreadthFirstVisitorTest_testIt extends BreadthFirstVis
itor<Object> { |
| 103 List<AstNode> nodes; | 97 List<AstNode> nodes; |
| 104 | 98 |
| 105 BreadthFirstVisitor_BreadthFirstVisitorTest_testIt(this.nodes) : super(); | 99 BreadthFirstVisitor_BreadthFirstVisitorTest_testIt(this.nodes) : super(); |
| 106 | 100 |
| 107 @override | 101 @override |
| 108 Object visitNode(AstNode node) { | 102 Object visitNode(AstNode node) { |
| 109 nodes.add(node); | 103 nodes.add(node); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null, nul
l, null, null, [aMethod, bMethod]); | 137 ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null, nul
l, null, null, [aMethod, bMethod]); |
| 144 JUnitTestCase.assertSame(aMethod, clazz.getMethod("a")); | 138 JUnitTestCase.assertSame(aMethod, clazz.getMethod("a")); |
| 145 JUnitTestCase.assertSame(bMethod, clazz.getMethod("b")); | 139 JUnitTestCase.assertSame(bMethod, clazz.getMethod("b")); |
| 146 JUnitTestCase.assertSame(null, clazz.getMethod("noSuchMethod")); | 140 JUnitTestCase.assertSame(null, clazz.getMethod("noSuchMethod")); |
| 147 } | 141 } |
| 148 | 142 |
| 149 void test_isAbstract() { | 143 void test_isAbstract() { |
| 150 JUnitTestCase.assertFalse(AstFactory.classDeclaration(null, "A", null, null,
null, null, []).isAbstract); | 144 JUnitTestCase.assertFalse(AstFactory.classDeclaration(null, "A", null, null,
null, null, []).isAbstract); |
| 151 JUnitTestCase.assertTrue(AstFactory.classDeclaration(Keyword.ABSTRACT, "B",
null, null, null, null, []).isAbstract); | 145 JUnitTestCase.assertTrue(AstFactory.classDeclaration(Keyword.ABSTRACT, "B",
null, null, null, null, []).isAbstract); |
| 152 } | 146 } |
| 153 | |
| 154 static dartSuite() { | |
| 155 _ut.group('ClassDeclarationTest', () { | |
| 156 _ut.test('test_getConstructor', () { | |
| 157 final __test = new ClassDeclarationTest(); | |
| 158 runJUnitTest(__test, __test.test_getConstructor); | |
| 159 }); | |
| 160 _ut.test('test_getField', () { | |
| 161 final __test = new ClassDeclarationTest(); | |
| 162 runJUnitTest(__test, __test.test_getField); | |
| 163 }); | |
| 164 _ut.test('test_getMethod', () { | |
| 165 final __test = new ClassDeclarationTest(); | |
| 166 runJUnitTest(__test, __test.test_getMethod); | |
| 167 }); | |
| 168 _ut.test('test_isAbstract', () { | |
| 169 final __test = new ClassDeclarationTest(); | |
| 170 runJUnitTest(__test, __test.test_isAbstract); | |
| 171 }); | |
| 172 }); | |
| 173 } | |
| 174 } | 147 } |
| 175 | 148 |
| 176 class ClassTypeAliasTest extends ParserTestCase { | 149 class ClassTypeAliasTest extends ParserTestCase { |
| 177 void test_isAbstract() { | 150 void test_isAbstract() { |
| 178 JUnitTestCase.assertFalse(AstFactory.classTypeAlias("A", null, null, null, n
ull, null).isAbstract); | 151 JUnitTestCase.assertFalse(AstFactory.classTypeAlias("A", null, null, null, n
ull, null).isAbstract); |
| 179 JUnitTestCase.assertTrue(AstFactory.classTypeAlias("B", null, Keyword.ABSTRA
CT, null, null, null).isAbstract); | 152 JUnitTestCase.assertTrue(AstFactory.classTypeAlias("B", null, Keyword.ABSTRA
CT, null, null, null).isAbstract); |
| 180 } | 153 } |
| 181 | |
| 182 static dartSuite() { | |
| 183 _ut.group('ClassTypeAliasTest', () { | |
| 184 _ut.test('test_isAbstract', () { | |
| 185 final __test = new ClassTypeAliasTest(); | |
| 186 runJUnitTest(__test, __test.test_isAbstract); | |
| 187 }); | |
| 188 }); | |
| 189 } | |
| 190 } | 154 } |
| 191 | 155 |
| 192 class ConstantEvaluatorTest extends ParserTestCase { | 156 class ConstantEvaluatorTest extends ParserTestCase { |
| 193 void fail_constructor() { | 157 void fail_constructor() { |
| 194 Object value = _getConstantValue("?"); | 158 Object value = _getConstantValue("?"); |
| 195 JUnitTestCase.assertEquals(null, value); | 159 JUnitTestCase.assertEquals(null, value); |
| 196 } | 160 } |
| 197 | 161 |
| 198 void fail_identifier_class() { | 162 void fail_identifier_class() { |
| 199 Object value = _getConstantValue("?"); | 163 Object value = _getConstantValue("?"); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 JUnitTestCase.assertEquals(-42.3, value as double); | 460 JUnitTestCase.assertEquals(-42.3, value as double); |
| 497 } | 461 } |
| 498 | 462 |
| 499 void test_unary_negated_integer() { | 463 void test_unary_negated_integer() { |
| 500 Object value = _getConstantValue("-42"); | 464 Object value = _getConstantValue("-42"); |
| 501 EngineTestCase.assertInstanceOf((obj) => obj is int, int, value); | 465 EngineTestCase.assertInstanceOf((obj) => obj is int, int, value); |
| 502 JUnitTestCase.assertEquals(-42, value as int); | 466 JUnitTestCase.assertEquals(-42, value as int); |
| 503 } | 467 } |
| 504 | 468 |
| 505 Object _getConstantValue(String source) => ParserTestCase.parseExpression(sour
ce, []).accept(new ConstantEvaluator()); | 469 Object _getConstantValue(String source) => ParserTestCase.parseExpression(sour
ce, []).accept(new ConstantEvaluator()); |
| 506 | |
| 507 static dartSuite() { | |
| 508 _ut.group('ConstantEvaluatorTest', () { | |
| 509 _ut.test('test_binary_bitAnd', () { | |
| 510 final __test = new ConstantEvaluatorTest(); | |
| 511 runJUnitTest(__test, __test.test_binary_bitAnd); | |
| 512 }); | |
| 513 _ut.test('test_binary_bitOr', () { | |
| 514 final __test = new ConstantEvaluatorTest(); | |
| 515 runJUnitTest(__test, __test.test_binary_bitOr); | |
| 516 }); | |
| 517 _ut.test('test_binary_bitXor', () { | |
| 518 final __test = new ConstantEvaluatorTest(); | |
| 519 runJUnitTest(__test, __test.test_binary_bitXor); | |
| 520 }); | |
| 521 _ut.test('test_binary_divide_double', () { | |
| 522 final __test = new ConstantEvaluatorTest(); | |
| 523 runJUnitTest(__test, __test.test_binary_divide_double); | |
| 524 }); | |
| 525 _ut.test('test_binary_divide_integer', () { | |
| 526 final __test = new ConstantEvaluatorTest(); | |
| 527 runJUnitTest(__test, __test.test_binary_divide_integer); | |
| 528 }); | |
| 529 _ut.test('test_binary_equal_boolean', () { | |
| 530 final __test = new ConstantEvaluatorTest(); | |
| 531 runJUnitTest(__test, __test.test_binary_equal_boolean); | |
| 532 }); | |
| 533 _ut.test('test_binary_equal_integer', () { | |
| 534 final __test = new ConstantEvaluatorTest(); | |
| 535 runJUnitTest(__test, __test.test_binary_equal_integer); | |
| 536 }); | |
| 537 _ut.test('test_binary_equal_invalidLeft', () { | |
| 538 final __test = new ConstantEvaluatorTest(); | |
| 539 runJUnitTest(__test, __test.test_binary_equal_invalidLeft); | |
| 540 }); | |
| 541 _ut.test('test_binary_equal_invalidRight', () { | |
| 542 final __test = new ConstantEvaluatorTest(); | |
| 543 runJUnitTest(__test, __test.test_binary_equal_invalidRight); | |
| 544 }); | |
| 545 _ut.test('test_binary_equal_string', () { | |
| 546 final __test = new ConstantEvaluatorTest(); | |
| 547 runJUnitTest(__test, __test.test_binary_equal_string); | |
| 548 }); | |
| 549 _ut.test('test_binary_greaterThan', () { | |
| 550 final __test = new ConstantEvaluatorTest(); | |
| 551 runJUnitTest(__test, __test.test_binary_greaterThan); | |
| 552 }); | |
| 553 _ut.test('test_binary_greaterThanOrEqual', () { | |
| 554 final __test = new ConstantEvaluatorTest(); | |
| 555 runJUnitTest(__test, __test.test_binary_greaterThanOrEqual); | |
| 556 }); | |
| 557 _ut.test('test_binary_leftShift', () { | |
| 558 final __test = new ConstantEvaluatorTest(); | |
| 559 runJUnitTest(__test, __test.test_binary_leftShift); | |
| 560 }); | |
| 561 _ut.test('test_binary_lessThan', () { | |
| 562 final __test = new ConstantEvaluatorTest(); | |
| 563 runJUnitTest(__test, __test.test_binary_lessThan); | |
| 564 }); | |
| 565 _ut.test('test_binary_lessThanOrEqual', () { | |
| 566 final __test = new ConstantEvaluatorTest(); | |
| 567 runJUnitTest(__test, __test.test_binary_lessThanOrEqual); | |
| 568 }); | |
| 569 _ut.test('test_binary_logicalAnd', () { | |
| 570 final __test = new ConstantEvaluatorTest(); | |
| 571 runJUnitTest(__test, __test.test_binary_logicalAnd); | |
| 572 }); | |
| 573 _ut.test('test_binary_logicalOr', () { | |
| 574 final __test = new ConstantEvaluatorTest(); | |
| 575 runJUnitTest(__test, __test.test_binary_logicalOr); | |
| 576 }); | |
| 577 _ut.test('test_binary_minus_double', () { | |
| 578 final __test = new ConstantEvaluatorTest(); | |
| 579 runJUnitTest(__test, __test.test_binary_minus_double); | |
| 580 }); | |
| 581 _ut.test('test_binary_minus_integer', () { | |
| 582 final __test = new ConstantEvaluatorTest(); | |
| 583 runJUnitTest(__test, __test.test_binary_minus_integer); | |
| 584 }); | |
| 585 _ut.test('test_binary_notEqual_boolean', () { | |
| 586 final __test = new ConstantEvaluatorTest(); | |
| 587 runJUnitTest(__test, __test.test_binary_notEqual_boolean); | |
| 588 }); | |
| 589 _ut.test('test_binary_notEqual_integer', () { | |
| 590 final __test = new ConstantEvaluatorTest(); | |
| 591 runJUnitTest(__test, __test.test_binary_notEqual_integer); | |
| 592 }); | |
| 593 _ut.test('test_binary_notEqual_invalidLeft', () { | |
| 594 final __test = new ConstantEvaluatorTest(); | |
| 595 runJUnitTest(__test, __test.test_binary_notEqual_invalidLeft); | |
| 596 }); | |
| 597 _ut.test('test_binary_notEqual_invalidRight', () { | |
| 598 final __test = new ConstantEvaluatorTest(); | |
| 599 runJUnitTest(__test, __test.test_binary_notEqual_invalidRight); | |
| 600 }); | |
| 601 _ut.test('test_binary_notEqual_string', () { | |
| 602 final __test = new ConstantEvaluatorTest(); | |
| 603 runJUnitTest(__test, __test.test_binary_notEqual_string); | |
| 604 }); | |
| 605 _ut.test('test_binary_plus_double', () { | |
| 606 final __test = new ConstantEvaluatorTest(); | |
| 607 runJUnitTest(__test, __test.test_binary_plus_double); | |
| 608 }); | |
| 609 _ut.test('test_binary_plus_integer', () { | |
| 610 final __test = new ConstantEvaluatorTest(); | |
| 611 runJUnitTest(__test, __test.test_binary_plus_integer); | |
| 612 }); | |
| 613 _ut.test('test_binary_remainder_double', () { | |
| 614 final __test = new ConstantEvaluatorTest(); | |
| 615 runJUnitTest(__test, __test.test_binary_remainder_double); | |
| 616 }); | |
| 617 _ut.test('test_binary_remainder_integer', () { | |
| 618 final __test = new ConstantEvaluatorTest(); | |
| 619 runJUnitTest(__test, __test.test_binary_remainder_integer); | |
| 620 }); | |
| 621 _ut.test('test_binary_rightShift', () { | |
| 622 final __test = new ConstantEvaluatorTest(); | |
| 623 runJUnitTest(__test, __test.test_binary_rightShift); | |
| 624 }); | |
| 625 _ut.test('test_binary_times_double', () { | |
| 626 final __test = new ConstantEvaluatorTest(); | |
| 627 runJUnitTest(__test, __test.test_binary_times_double); | |
| 628 }); | |
| 629 _ut.test('test_binary_times_integer', () { | |
| 630 final __test = new ConstantEvaluatorTest(); | |
| 631 runJUnitTest(__test, __test.test_binary_times_integer); | |
| 632 }); | |
| 633 _ut.test('test_binary_truncatingDivide_double', () { | |
| 634 final __test = new ConstantEvaluatorTest(); | |
| 635 runJUnitTest(__test, __test.test_binary_truncatingDivide_double); | |
| 636 }); | |
| 637 _ut.test('test_binary_truncatingDivide_integer', () { | |
| 638 final __test = new ConstantEvaluatorTest(); | |
| 639 runJUnitTest(__test, __test.test_binary_truncatingDivide_integer); | |
| 640 }); | |
| 641 _ut.test('test_literal_boolean_false', () { | |
| 642 final __test = new ConstantEvaluatorTest(); | |
| 643 runJUnitTest(__test, __test.test_literal_boolean_false); | |
| 644 }); | |
| 645 _ut.test('test_literal_boolean_true', () { | |
| 646 final __test = new ConstantEvaluatorTest(); | |
| 647 runJUnitTest(__test, __test.test_literal_boolean_true); | |
| 648 }); | |
| 649 _ut.test('test_literal_list', () { | |
| 650 final __test = new ConstantEvaluatorTest(); | |
| 651 runJUnitTest(__test, __test.test_literal_list); | |
| 652 }); | |
| 653 _ut.test('test_literal_map', () { | |
| 654 final __test = new ConstantEvaluatorTest(); | |
| 655 runJUnitTest(__test, __test.test_literal_map); | |
| 656 }); | |
| 657 _ut.test('test_literal_null', () { | |
| 658 final __test = new ConstantEvaluatorTest(); | |
| 659 runJUnitTest(__test, __test.test_literal_null); | |
| 660 }); | |
| 661 _ut.test('test_literal_number_double', () { | |
| 662 final __test = new ConstantEvaluatorTest(); | |
| 663 runJUnitTest(__test, __test.test_literal_number_double); | |
| 664 }); | |
| 665 _ut.test('test_literal_number_integer', () { | |
| 666 final __test = new ConstantEvaluatorTest(); | |
| 667 runJUnitTest(__test, __test.test_literal_number_integer); | |
| 668 }); | |
| 669 _ut.test('test_literal_string_adjacent', () { | |
| 670 final __test = new ConstantEvaluatorTest(); | |
| 671 runJUnitTest(__test, __test.test_literal_string_adjacent); | |
| 672 }); | |
| 673 _ut.test('test_literal_string_interpolation_invalid', () { | |
| 674 final __test = new ConstantEvaluatorTest(); | |
| 675 runJUnitTest(__test, __test.test_literal_string_interpolation_invalid); | |
| 676 }); | |
| 677 _ut.test('test_literal_string_interpolation_valid', () { | |
| 678 final __test = new ConstantEvaluatorTest(); | |
| 679 runJUnitTest(__test, __test.test_literal_string_interpolation_valid); | |
| 680 }); | |
| 681 _ut.test('test_literal_string_simple', () { | |
| 682 final __test = new ConstantEvaluatorTest(); | |
| 683 runJUnitTest(__test, __test.test_literal_string_simple); | |
| 684 }); | |
| 685 _ut.test('test_parenthesizedExpression', () { | |
| 686 final __test = new ConstantEvaluatorTest(); | |
| 687 runJUnitTest(__test, __test.test_parenthesizedExpression); | |
| 688 }); | |
| 689 _ut.test('test_unary_bitNot', () { | |
| 690 final __test = new ConstantEvaluatorTest(); | |
| 691 runJUnitTest(__test, __test.test_unary_bitNot); | |
| 692 }); | |
| 693 _ut.test('test_unary_logicalNot', () { | |
| 694 final __test = new ConstantEvaluatorTest(); | |
| 695 runJUnitTest(__test, __test.test_unary_logicalNot); | |
| 696 }); | |
| 697 _ut.test('test_unary_negated_double', () { | |
| 698 final __test = new ConstantEvaluatorTest(); | |
| 699 runJUnitTest(__test, __test.test_unary_negated_double); | |
| 700 }); | |
| 701 _ut.test('test_unary_negated_integer', () { | |
| 702 final __test = new ConstantEvaluatorTest(); | |
| 703 runJUnitTest(__test, __test.test_unary_negated_integer); | |
| 704 }); | |
| 705 }); | |
| 706 } | |
| 707 } | 470 } |
| 708 | 471 |
| 709 class IndexExpressionTest extends EngineTestCase { | 472 class IndexExpressionTest extends EngineTestCase { |
| 710 void test_inGetterContext_assignment_compound_left() { | 473 void test_inGetterContext_assignment_compound_left() { |
| 711 IndexExpression expression = AstFactory.indexExpression(AstFactory.identifie
r3("a"), AstFactory.identifier3("b")); | 474 IndexExpression expression = AstFactory.indexExpression(AstFactory.identifie
r3("a"), AstFactory.identifier3("b")); |
| 712 // a[b] += c | 475 // a[b] += c |
| 713 AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, AstFactory.id
entifier3("c")); | 476 AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, AstFactory.id
entifier3("c")); |
| 714 JUnitTestCase.assertTrue(expression.inGetterContext()); | 477 JUnitTestCase.assertTrue(expression.inGetterContext()); |
| 715 } | 478 } |
| 716 | 479 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 AstFactory.prefixExpression(TokenType.MINUS_MINUS, expression); | 546 AstFactory.prefixExpression(TokenType.MINUS_MINUS, expression); |
| 784 JUnitTestCase.assertTrue(expression.inSetterContext()); | 547 JUnitTestCase.assertTrue(expression.inSetterContext()); |
| 785 } | 548 } |
| 786 | 549 |
| 787 void test_inSetterContext_prefix_plusPlus() { | 550 void test_inSetterContext_prefix_plusPlus() { |
| 788 IndexExpression expression = AstFactory.indexExpression(AstFactory.identifie
r3("a"), AstFactory.identifier3("b")); | 551 IndexExpression expression = AstFactory.indexExpression(AstFactory.identifie
r3("a"), AstFactory.identifier3("b")); |
| 789 // ++a[b] | 552 // ++a[b] |
| 790 AstFactory.prefixExpression(TokenType.PLUS_PLUS, expression); | 553 AstFactory.prefixExpression(TokenType.PLUS_PLUS, expression); |
| 791 JUnitTestCase.assertTrue(expression.inSetterContext()); | 554 JUnitTestCase.assertTrue(expression.inSetterContext()); |
| 792 } | 555 } |
| 793 | |
| 794 static dartSuite() { | |
| 795 _ut.group('IndexExpressionTest', () { | |
| 796 _ut.test('test_inGetterContext_assignment_compound_left', () { | |
| 797 final __test = new IndexExpressionTest(); | |
| 798 runJUnitTest(__test, __test.test_inGetterContext_assignment_compound_lef
t); | |
| 799 }); | |
| 800 _ut.test('test_inGetterContext_assignment_simple_left', () { | |
| 801 final __test = new IndexExpressionTest(); | |
| 802 runJUnitTest(__test, __test.test_inGetterContext_assignment_simple_left)
; | |
| 803 }); | |
| 804 _ut.test('test_inGetterContext_nonAssignment', () { | |
| 805 final __test = new IndexExpressionTest(); | |
| 806 runJUnitTest(__test, __test.test_inGetterContext_nonAssignment); | |
| 807 }); | |
| 808 _ut.test('test_inSetterContext_assignment_compound_left', () { | |
| 809 final __test = new IndexExpressionTest(); | |
| 810 runJUnitTest(__test, __test.test_inSetterContext_assignment_compound_lef
t); | |
| 811 }); | |
| 812 _ut.test('test_inSetterContext_assignment_compound_right', () { | |
| 813 final __test = new IndexExpressionTest(); | |
| 814 runJUnitTest(__test, __test.test_inSetterContext_assignment_compound_rig
ht); | |
| 815 }); | |
| 816 _ut.test('test_inSetterContext_assignment_simple_left', () { | |
| 817 final __test = new IndexExpressionTest(); | |
| 818 runJUnitTest(__test, __test.test_inSetterContext_assignment_simple_left)
; | |
| 819 }); | |
| 820 _ut.test('test_inSetterContext_assignment_simple_right', () { | |
| 821 final __test = new IndexExpressionTest(); | |
| 822 runJUnitTest(__test, __test.test_inSetterContext_assignment_simple_right
); | |
| 823 }); | |
| 824 _ut.test('test_inSetterContext_nonAssignment', () { | |
| 825 final __test = new IndexExpressionTest(); | |
| 826 runJUnitTest(__test, __test.test_inSetterContext_nonAssignment); | |
| 827 }); | |
| 828 _ut.test('test_inSetterContext_postfix', () { | |
| 829 final __test = new IndexExpressionTest(); | |
| 830 runJUnitTest(__test, __test.test_inSetterContext_postfix); | |
| 831 }); | |
| 832 _ut.test('test_inSetterContext_prefix_bang', () { | |
| 833 final __test = new IndexExpressionTest(); | |
| 834 runJUnitTest(__test, __test.test_inSetterContext_prefix_bang); | |
| 835 }); | |
| 836 _ut.test('test_inSetterContext_prefix_minusMinus', () { | |
| 837 final __test = new IndexExpressionTest(); | |
| 838 runJUnitTest(__test, __test.test_inSetterContext_prefix_minusMinus); | |
| 839 }); | |
| 840 _ut.test('test_inSetterContext_prefix_plusPlus', () { | |
| 841 final __test = new IndexExpressionTest(); | |
| 842 runJUnitTest(__test, __test.test_inSetterContext_prefix_plusPlus); | |
| 843 }); | |
| 844 }); | |
| 845 } | |
| 846 } | 556 } |
| 847 | 557 |
| 848 class NodeListTest extends EngineTestCase { | 558 class NodeListTest extends EngineTestCase { |
| 849 void test_add() { | 559 void test_add() { |
| 850 AstNode parent = AstFactory.argumentList([]); | 560 AstNode parent = AstFactory.argumentList([]); |
| 851 AstNode firstNode = AstFactory.booleanLiteral(true); | 561 AstNode firstNode = AstFactory.booleanLiteral(true); |
| 852 AstNode secondNode = AstFactory.booleanLiteral(false); | 562 AstNode secondNode = AstFactory.booleanLiteral(false); |
| 853 NodeList<AstNode> list = new NodeList<AstNode>(parent); | 563 NodeList<AstNode> list = new NodeList<AstNode>(parent); |
| 854 list.insert(0, secondNode); | 564 list.insert(0, secondNode); |
| 855 list.insert(0, firstNode); | 565 list.insert(0, firstNode); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 void test_set_tooBig() { | 779 void test_set_tooBig() { |
| 1070 AstNode node = AstFactory.booleanLiteral(true); | 780 AstNode node = AstFactory.booleanLiteral(true); |
| 1071 NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([])); | 781 NodeList<AstNode> list = new NodeList<AstNode>(AstFactory.argumentList([])); |
| 1072 try { | 782 try { |
| 1073 javaListSet(list, 1, node); | 783 javaListSet(list, 1, node); |
| 1074 JUnitTestCase.fail("Expected IndexOutOfBoundsException"); | 784 JUnitTestCase.fail("Expected IndexOutOfBoundsException"); |
| 1075 } on RangeError catch (exception) { | 785 } on RangeError catch (exception) { |
| 1076 // Expected | 786 // Expected |
| 1077 } | 787 } |
| 1078 } | 788 } |
| 1079 | |
| 1080 static dartSuite() { | |
| 1081 _ut.group('NodeListTest', () { | |
| 1082 _ut.test('test_add', () { | |
| 1083 final __test = new NodeListTest(); | |
| 1084 runJUnitTest(__test, __test.test_add); | |
| 1085 }); | |
| 1086 _ut.test('test_addAll', () { | |
| 1087 final __test = new NodeListTest(); | |
| 1088 runJUnitTest(__test, __test.test_addAll); | |
| 1089 }); | |
| 1090 _ut.test('test_add_negative', () { | |
| 1091 final __test = new NodeListTest(); | |
| 1092 runJUnitTest(__test, __test.test_add_negative); | |
| 1093 }); | |
| 1094 _ut.test('test_add_tooBig', () { | |
| 1095 final __test = new NodeListTest(); | |
| 1096 runJUnitTest(__test, __test.test_add_tooBig); | |
| 1097 }); | |
| 1098 _ut.test('test_create', () { | |
| 1099 final __test = new NodeListTest(); | |
| 1100 runJUnitTest(__test, __test.test_create); | |
| 1101 }); | |
| 1102 _ut.test('test_creation', () { | |
| 1103 final __test = new NodeListTest(); | |
| 1104 runJUnitTest(__test, __test.test_creation); | |
| 1105 }); | |
| 1106 _ut.test('test_getBeginToken_empty', () { | |
| 1107 final __test = new NodeListTest(); | |
| 1108 runJUnitTest(__test, __test.test_getBeginToken_empty); | |
| 1109 }); | |
| 1110 _ut.test('test_getBeginToken_nonEmpty', () { | |
| 1111 final __test = new NodeListTest(); | |
| 1112 runJUnitTest(__test, __test.test_getBeginToken_nonEmpty); | |
| 1113 }); | |
| 1114 _ut.test('test_getEndToken_empty', () { | |
| 1115 final __test = new NodeListTest(); | |
| 1116 runJUnitTest(__test, __test.test_getEndToken_empty); | |
| 1117 }); | |
| 1118 _ut.test('test_getEndToken_nonEmpty', () { | |
| 1119 final __test = new NodeListTest(); | |
| 1120 runJUnitTest(__test, __test.test_getEndToken_nonEmpty); | |
| 1121 }); | |
| 1122 _ut.test('test_get_negative', () { | |
| 1123 final __test = new NodeListTest(); | |
| 1124 runJUnitTest(__test, __test.test_get_negative); | |
| 1125 }); | |
| 1126 _ut.test('test_get_tooBig', () { | |
| 1127 final __test = new NodeListTest(); | |
| 1128 runJUnitTest(__test, __test.test_get_tooBig); | |
| 1129 }); | |
| 1130 _ut.test('test_indexOf', () { | |
| 1131 final __test = new NodeListTest(); | |
| 1132 runJUnitTest(__test, __test.test_indexOf); | |
| 1133 }); | |
| 1134 _ut.test('test_remove', () { | |
| 1135 final __test = new NodeListTest(); | |
| 1136 runJUnitTest(__test, __test.test_remove); | |
| 1137 }); | |
| 1138 _ut.test('test_remove_negative', () { | |
| 1139 final __test = new NodeListTest(); | |
| 1140 runJUnitTest(__test, __test.test_remove_negative); | |
| 1141 }); | |
| 1142 _ut.test('test_remove_tooBig', () { | |
| 1143 final __test = new NodeListTest(); | |
| 1144 runJUnitTest(__test, __test.test_remove_tooBig); | |
| 1145 }); | |
| 1146 _ut.test('test_set', () { | |
| 1147 final __test = new NodeListTest(); | |
| 1148 runJUnitTest(__test, __test.test_set); | |
| 1149 }); | |
| 1150 _ut.test('test_set_negative', () { | |
| 1151 final __test = new NodeListTest(); | |
| 1152 runJUnitTest(__test, __test.test_set_negative); | |
| 1153 }); | |
| 1154 _ut.test('test_set_tooBig', () { | |
| 1155 final __test = new NodeListTest(); | |
| 1156 runJUnitTest(__test, __test.test_set_tooBig); | |
| 1157 }); | |
| 1158 }); | |
| 1159 } | |
| 1160 } | 789 } |
| 1161 | 790 |
| 1162 class NodeLocatorTest extends ParserTestCase { | 791 class NodeLocatorTest extends ParserTestCase { |
| 1163 void test_range() { | 792 void test_range() { |
| 1164 CompilationUnit unit = ParserTestCase.parseCompilationUnit("library myLib;",
[]); | 793 CompilationUnit unit = ParserTestCase.parseCompilationUnit("library myLib;",
[]); |
| 1165 _assertLocate(unit, 4, 10, (node) => node is LibraryDirective, LibraryDirect
ive); | 794 _assertLocate(unit, 4, 10, (node) => node is LibraryDirective, LibraryDirect
ive); |
| 1166 } | 795 } |
| 1167 | 796 |
| 1168 void test_searchWithin_null() { | 797 void test_searchWithin_null() { |
| 1169 NodeLocator locator = new NodeLocator.con2(0, 0); | 798 NodeLocator locator = new NodeLocator.con2(0, 0); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1191 | 820 |
| 1192 void _assertLocate(CompilationUnit unit, int start, int end, Predicate<AstNode
> predicate, Type expectedClass) { | 821 void _assertLocate(CompilationUnit unit, int start, int end, Predicate<AstNode
> predicate, Type expectedClass) { |
| 1193 NodeLocator locator = new NodeLocator.con2(start, end); | 822 NodeLocator locator = new NodeLocator.con2(start, end); |
| 1194 AstNode node = locator.searchWithin(unit); | 823 AstNode node = locator.searchWithin(unit); |
| 1195 JUnitTestCase.assertNotNull(node); | 824 JUnitTestCase.assertNotNull(node); |
| 1196 JUnitTestCase.assertSame(node, locator.foundNode); | 825 JUnitTestCase.assertSame(node, locator.foundNode); |
| 1197 JUnitTestCase.assertTrueMsg("Node starts after range", node.offset <= start)
; | 826 JUnitTestCase.assertTrueMsg("Node starts after range", node.offset <= start)
; |
| 1198 JUnitTestCase.assertTrueMsg("Node ends before range", node.offset + node.len
gth > end); | 827 JUnitTestCase.assertTrueMsg("Node ends before range", node.offset + node.len
gth > end); |
| 1199 EngineTestCase.assertInstanceOf(predicate, expectedClass, node); | 828 EngineTestCase.assertInstanceOf(predicate, expectedClass, node); |
| 1200 } | 829 } |
| 1201 | |
| 1202 static dartSuite() { | |
| 1203 _ut.group('NodeLocatorTest', () { | |
| 1204 _ut.test('test_range', () { | |
| 1205 final __test = new NodeLocatorTest(); | |
| 1206 runJUnitTest(__test, __test.test_range); | |
| 1207 }); | |
| 1208 _ut.test('test_searchWithin_null', () { | |
| 1209 final __test = new NodeLocatorTest(); | |
| 1210 runJUnitTest(__test, __test.test_searchWithin_null); | |
| 1211 }); | |
| 1212 _ut.test('test_searchWithin_offset', () { | |
| 1213 final __test = new NodeLocatorTest(); | |
| 1214 runJUnitTest(__test, __test.test_searchWithin_offset); | |
| 1215 }); | |
| 1216 _ut.test('test_searchWithin_offsetAfterNode', () { | |
| 1217 final __test = new NodeLocatorTest(); | |
| 1218 runJUnitTest(__test, __test.test_searchWithin_offsetAfterNode); | |
| 1219 }); | |
| 1220 _ut.test('test_searchWithin_offsetBeforeNode', () { | |
| 1221 final __test = new NodeLocatorTest(); | |
| 1222 runJUnitTest(__test, __test.test_searchWithin_offsetBeforeNode); | |
| 1223 }); | |
| 1224 }); | |
| 1225 } | |
| 1226 } | 830 } |
| 1227 | 831 |
| 1228 class SimpleIdentifierTest extends ParserTestCase { | 832 class SimpleIdentifierTest extends ParserTestCase { |
| 1229 void test_inDeclarationContext_catch_exception() { | 833 void test_inDeclarationContext_catch_exception() { |
| 1230 SimpleIdentifier identifier = AstFactory.catchClause("e", []).exceptionParam
eter; | 834 SimpleIdentifier identifier = AstFactory.catchClause("e", []).exceptionParam
eter; |
| 1231 JUnitTestCase.assertTrue(identifier.inDeclarationContext()); | 835 JUnitTestCase.assertTrue(identifier.inDeclarationContext()); |
| 1232 } | 836 } |
| 1233 | 837 |
| 1234 void test_inDeclarationContext_catch_stack() { | 838 void test_inDeclarationContext_catch_stack() { |
| 1235 SimpleIdentifier identifier = AstFactory.catchClause2("e", "s", []).stackTra
ceParameter; | 839 SimpleIdentifier identifier = AstFactory.catchClause2("e", "s", []).stackTra
ceParameter; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 */ | 1054 */ |
| 1451 AstNode _topMostNode(SimpleIdentifier identifier) { | 1055 AstNode _topMostNode(SimpleIdentifier identifier) { |
| 1452 AstNode child = identifier; | 1056 AstNode child = identifier; |
| 1453 AstNode parent = identifier.parent; | 1057 AstNode parent = identifier.parent; |
| 1454 while (parent != null) { | 1058 while (parent != null) { |
| 1455 child = parent; | 1059 child = parent; |
| 1456 parent = parent.parent; | 1060 parent = parent.parent; |
| 1457 } | 1061 } |
| 1458 return child; | 1062 return child; |
| 1459 } | 1063 } |
| 1460 | |
| 1461 static dartSuite() { | |
| 1462 _ut.group('SimpleIdentifierTest', () { | |
| 1463 _ut.test('test_inDeclarationContext_catch_exception', () { | |
| 1464 final __test = new SimpleIdentifierTest(); | |
| 1465 runJUnitTest(__test, __test.test_inDeclarationContext_catch_exception); | |
| 1466 }); | |
| 1467 _ut.test('test_inDeclarationContext_catch_stack', () { | |
| 1468 final __test = new SimpleIdentifierTest(); | |
| 1469 runJUnitTest(__test, __test.test_inDeclarationContext_catch_stack); | |
| 1470 }); | |
| 1471 _ut.test('test_inDeclarationContext_classDeclaration', () { | |
| 1472 final __test = new SimpleIdentifierTest(); | |
| 1473 runJUnitTest(__test, __test.test_inDeclarationContext_classDeclaration); | |
| 1474 }); | |
| 1475 _ut.test('test_inDeclarationContext_classTypeAlias', () { | |
| 1476 final __test = new SimpleIdentifierTest(); | |
| 1477 runJUnitTest(__test, __test.test_inDeclarationContext_classTypeAlias); | |
| 1478 }); | |
| 1479 _ut.test('test_inDeclarationContext_constructorDeclaration', () { | |
| 1480 final __test = new SimpleIdentifierTest(); | |
| 1481 runJUnitTest(__test, __test.test_inDeclarationContext_constructorDeclara
tion); | |
| 1482 }); | |
| 1483 _ut.test('test_inDeclarationContext_declaredIdentifier', () { | |
| 1484 final __test = new SimpleIdentifierTest(); | |
| 1485 runJUnitTest(__test, __test.test_inDeclarationContext_declaredIdentifier
); | |
| 1486 }); | |
| 1487 _ut.test('test_inDeclarationContext_fieldFormalParameter', () { | |
| 1488 final __test = new SimpleIdentifierTest(); | |
| 1489 runJUnitTest(__test, __test.test_inDeclarationContext_fieldFormalParamet
er); | |
| 1490 }); | |
| 1491 _ut.test('test_inDeclarationContext_functionDeclaration', () { | |
| 1492 final __test = new SimpleIdentifierTest(); | |
| 1493 runJUnitTest(__test, __test.test_inDeclarationContext_functionDeclaratio
n); | |
| 1494 }); | |
| 1495 _ut.test('test_inDeclarationContext_functionTypeAlias', () { | |
| 1496 final __test = new SimpleIdentifierTest(); | |
| 1497 runJUnitTest(__test, __test.test_inDeclarationContext_functionTypeAlias)
; | |
| 1498 }); | |
| 1499 _ut.test('test_inDeclarationContext_label_false', () { | |
| 1500 final __test = new SimpleIdentifierTest(); | |
| 1501 runJUnitTest(__test, __test.test_inDeclarationContext_label_false); | |
| 1502 }); | |
| 1503 _ut.test('test_inDeclarationContext_label_true', () { | |
| 1504 final __test = new SimpleIdentifierTest(); | |
| 1505 runJUnitTest(__test, __test.test_inDeclarationContext_label_true); | |
| 1506 }); | |
| 1507 _ut.test('test_inDeclarationContext_methodDeclaration', () { | |
| 1508 final __test = new SimpleIdentifierTest(); | |
| 1509 runJUnitTest(__test, __test.test_inDeclarationContext_methodDeclaration)
; | |
| 1510 }); | |
| 1511 _ut.test('test_inDeclarationContext_prefix', () { | |
| 1512 final __test = new SimpleIdentifierTest(); | |
| 1513 runJUnitTest(__test, __test.test_inDeclarationContext_prefix); | |
| 1514 }); | |
| 1515 _ut.test('test_inDeclarationContext_simpleFormalParameter', () { | |
| 1516 final __test = new SimpleIdentifierTest(); | |
| 1517 runJUnitTest(__test, __test.test_inDeclarationContext_simpleFormalParame
ter); | |
| 1518 }); | |
| 1519 _ut.test('test_inDeclarationContext_typeParameter_bound', () { | |
| 1520 final __test = new SimpleIdentifierTest(); | |
| 1521 runJUnitTest(__test, __test.test_inDeclarationContext_typeParameter_boun
d); | |
| 1522 }); | |
| 1523 _ut.test('test_inDeclarationContext_typeParameter_name', () { | |
| 1524 final __test = new SimpleIdentifierTest(); | |
| 1525 runJUnitTest(__test, __test.test_inDeclarationContext_typeParameter_name
); | |
| 1526 }); | |
| 1527 _ut.test('test_inDeclarationContext_variableDeclaration', () { | |
| 1528 final __test = new SimpleIdentifierTest(); | |
| 1529 runJUnitTest(__test, __test.test_inDeclarationContext_variableDeclaratio
n); | |
| 1530 }); | |
| 1531 _ut.test('test_inGetterContext', () { | |
| 1532 final __test = new SimpleIdentifierTest(); | |
| 1533 runJUnitTest(__test, __test.test_inGetterContext); | |
| 1534 }); | |
| 1535 _ut.test('test_inReferenceContext', () { | |
| 1536 final __test = new SimpleIdentifierTest(); | |
| 1537 runJUnitTest(__test, __test.test_inReferenceContext); | |
| 1538 }); | |
| 1539 _ut.test('test_inSetterContext', () { | |
| 1540 final __test = new SimpleIdentifierTest(); | |
| 1541 runJUnitTest(__test, __test.test_inSetterContext); | |
| 1542 }); | |
| 1543 _ut.test('test_isQualified_inMethodInvocation_noTarget', () { | |
| 1544 final __test = new SimpleIdentifierTest(); | |
| 1545 runJUnitTest(__test, __test.test_isQualified_inMethodInvocation_noTarget
); | |
| 1546 }); | |
| 1547 _ut.test('test_isQualified_inMethodInvocation_withTarget', () { | |
| 1548 final __test = new SimpleIdentifierTest(); | |
| 1549 runJUnitTest(__test, __test.test_isQualified_inMethodInvocation_withTarg
et); | |
| 1550 }); | |
| 1551 _ut.test('test_isQualified_inPrefixedIdentifier_name', () { | |
| 1552 final __test = new SimpleIdentifierTest(); | |
| 1553 runJUnitTest(__test, __test.test_isQualified_inPrefixedIdentifier_name); | |
| 1554 }); | |
| 1555 _ut.test('test_isQualified_inPrefixedIdentifier_prefix', () { | |
| 1556 final __test = new SimpleIdentifierTest(); | |
| 1557 runJUnitTest(__test, __test.test_isQualified_inPrefixedIdentifier_prefix
); | |
| 1558 }); | |
| 1559 _ut.test('test_isQualified_inPropertyAccess_name', () { | |
| 1560 final __test = new SimpleIdentifierTest(); | |
| 1561 runJUnitTest(__test, __test.test_isQualified_inPropertyAccess_name); | |
| 1562 }); | |
| 1563 _ut.test('test_isQualified_inPropertyAccess_target', () { | |
| 1564 final __test = new SimpleIdentifierTest(); | |
| 1565 runJUnitTest(__test, __test.test_isQualified_inPropertyAccess_target); | |
| 1566 }); | |
| 1567 _ut.test('test_isQualified_inReturnStatement', () { | |
| 1568 final __test = new SimpleIdentifierTest(); | |
| 1569 runJUnitTest(__test, __test.test_isQualified_inReturnStatement); | |
| 1570 }); | |
| 1571 }); | |
| 1572 } | |
| 1573 } | 1064 } |
| 1574 | 1065 |
| 1575 class SimpleStringLiteralTest extends ParserTestCase { | 1066 class SimpleStringLiteralTest extends ParserTestCase { |
| 1576 void test_contentsOffset() { | 1067 void test_contentsOffset() { |
| 1577 JUnitTestCase.assertEquals(1, new SimpleStringLiteral(TokenFactory.tokenFrom
String("'X'"), "X").contentsOffset); | 1068 JUnitTestCase.assertEquals(1, new SimpleStringLiteral(TokenFactory.tokenFrom
String("'X'"), "X").contentsOffset); |
| 1578 JUnitTestCase.assertEquals(1, new SimpleStringLiteral(TokenFactory.tokenFrom
String("\"X\""), "X").contentsOffset); | 1069 JUnitTestCase.assertEquals(1, new SimpleStringLiteral(TokenFactory.tokenFrom
String("\"X\""), "X").contentsOffset); |
| 1579 JUnitTestCase.assertEquals(3, new SimpleStringLiteral(TokenFactory.tokenFrom
String("\"\"\"X\"\"\""), "X").contentsOffset); | 1070 JUnitTestCase.assertEquals(3, new SimpleStringLiteral(TokenFactory.tokenFrom
String("\"\"\"X\"\"\""), "X").contentsOffset); |
| 1580 JUnitTestCase.assertEquals(3, new SimpleStringLiteral(TokenFactory.tokenFrom
String("'''X'''"), "X").contentsOffset); | 1071 JUnitTestCase.assertEquals(3, new SimpleStringLiteral(TokenFactory.tokenFrom
String("'''X'''"), "X").contentsOffset); |
| 1581 JUnitTestCase.assertEquals(2, new SimpleStringLiteral(TokenFactory.tokenFrom
String("r'X'"), "X").contentsOffset); | 1072 JUnitTestCase.assertEquals(2, new SimpleStringLiteral(TokenFactory.tokenFrom
String("r'X'"), "X").contentsOffset); |
| 1582 JUnitTestCase.assertEquals(2, new SimpleStringLiteral(TokenFactory.tokenFrom
String("r\"X\""), "X").contentsOffset); | 1073 JUnitTestCase.assertEquals(2, new SimpleStringLiteral(TokenFactory.tokenFrom
String("r\"X\""), "X").contentsOffset); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 } | 1163 } |
| 1673 | 1164 |
| 1674 void test_simple() { | 1165 void test_simple() { |
| 1675 Token token = TokenFactory.tokenFromString("'value'"); | 1166 Token token = TokenFactory.tokenFromString("'value'"); |
| 1676 SimpleStringLiteral stringLiteral = new SimpleStringLiteral(token, "value"); | 1167 SimpleStringLiteral stringLiteral = new SimpleStringLiteral(token, "value"); |
| 1677 JUnitTestCase.assertSame(token, stringLiteral.literal); | 1168 JUnitTestCase.assertSame(token, stringLiteral.literal); |
| 1678 JUnitTestCase.assertSame(token, stringLiteral.beginToken); | 1169 JUnitTestCase.assertSame(token, stringLiteral.beginToken); |
| 1679 JUnitTestCase.assertSame(token, stringLiteral.endToken); | 1170 JUnitTestCase.assertSame(token, stringLiteral.endToken); |
| 1680 JUnitTestCase.assertEquals("value", stringLiteral.value); | 1171 JUnitTestCase.assertEquals("value", stringLiteral.value); |
| 1681 } | 1172 } |
| 1682 | |
| 1683 static dartSuite() { | |
| 1684 _ut.group('SimpleStringLiteralTest', () { | |
| 1685 _ut.test('test_contentsOffset', () { | |
| 1686 final __test = new SimpleStringLiteralTest(); | |
| 1687 runJUnitTest(__test, __test.test_contentsOffset); | |
| 1688 }); | |
| 1689 _ut.test('test_contentsEnd', () { | |
| 1690 final __test = new SimpleStringLiteralTest(); | |
| 1691 runJUnitTest(__test, __test.test_contentsEnd); | |
| 1692 }); | |
| 1693 _ut.test('test_isMultiline', () { | |
| 1694 final __test = new SimpleStringLiteralTest(); | |
| 1695 runJUnitTest(__test, __test.test_isMultiline); | |
| 1696 }); | |
| 1697 _ut.test('test_isRaw', () { | |
| 1698 final __test = new SimpleStringLiteralTest(); | |
| 1699 runJUnitTest(__test, __test.test_isRaw); | |
| 1700 }); | |
| 1701 _ut.test('test_isSingleQuoted', () { | |
| 1702 final __test = new SimpleStringLiteralTest(); | |
| 1703 runJUnitTest(__test, __test.test_isSingleQuoted); | |
| 1704 }); | |
| 1705 _ut.test('test_isSingleQuoted_raw', () { | |
| 1706 final __test = new SimpleStringLiteralTest(); | |
| 1707 runJUnitTest(__test, __test.test_isSingleQuoted_raw); | |
| 1708 }); | |
| 1709 _ut.test('test_simple', () { | |
| 1710 final __test = new SimpleStringLiteralTest(); | |
| 1711 runJUnitTest(__test, __test.test_simple); | |
| 1712 }); | |
| 1713 }); | |
| 1714 } | |
| 1715 } | 1173 } |
| 1716 | 1174 |
| 1717 class StringInterpolationTest extends ParserTestCase { | 1175 class StringInterpolationTest extends ParserTestCase { |
| 1718 void test_contentsOffsetEnd() { | 1176 void test_contentsOffsetEnd() { |
| 1719 var be = AstFactory.interpolationExpression(AstFactory.identifier3('bb')); | 1177 var be = AstFactory.interpolationExpression(AstFactory.identifier3('bb')); |
| 1720 // 'a${bb}ccc' | 1178 // 'a${bb}ccc' |
| 1721 { | 1179 { |
| 1722 var ae = AstFactory.interpolationString("'a", "a"); | 1180 var ae = AstFactory.interpolationString("'a", "a"); |
| 1723 var cToken = new StringToken(TokenType.STRING, "ccc'", 10); | 1181 var cToken = new StringToken(TokenType.STRING, "ccc'", 10); |
| 1724 var cElement = new InterpolationString(cToken, 'ccc'); | 1182 var cElement = new InterpolationString(cToken, 'ccc'); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 var c = AstFactory.interpolationString("ccc'''", "ccc"); | 1292 var c = AstFactory.interpolationString("ccc'''", "ccc"); |
| 1835 StringInterpolation node = AstFactory.string([a, b, c]); | 1293 StringInterpolation node = AstFactory.string([a, b, c]); |
| 1836 JUnitTestCase.assertTrue(node.isSingleQuoted); | 1294 JUnitTestCase.assertTrue(node.isSingleQuoted); |
| 1837 } | 1295 } |
| 1838 } | 1296 } |
| 1839 | 1297 |
| 1840 void test_isRaw() { | 1298 void test_isRaw() { |
| 1841 StringInterpolation node = AstFactory.string([]); | 1299 StringInterpolation node = AstFactory.string([]); |
| 1842 JUnitTestCase.assertFalse(node.isRaw); | 1300 JUnitTestCase.assertFalse(node.isRaw); |
| 1843 } | 1301 } |
| 1844 | |
| 1845 static dartSuite() { | |
| 1846 _ut.group('StringInterpolationTest', () { | |
| 1847 _ut.test('test_contentsOffsetEnd', () { | |
| 1848 final __test = new StringInterpolationTest(); | |
| 1849 runJUnitTest(__test, __test.test_contentsOffsetEnd); | |
| 1850 }); | |
| 1851 _ut.test('test_isMultiline', () { | |
| 1852 final __test = new StringInterpolationTest(); | |
| 1853 runJUnitTest(__test, __test.test_isMultiline); | |
| 1854 }); | |
| 1855 _ut.test('test_isRaw', () { | |
| 1856 final __test = new StringInterpolationTest(); | |
| 1857 runJUnitTest(__test, __test.test_isRaw); | |
| 1858 }); | |
| 1859 _ut.test('test_isSingleQuoted', () { | |
| 1860 final __test = new StringInterpolationTest(); | |
| 1861 runJUnitTest(__test, __test.test_isSingleQuoted); | |
| 1862 }); | |
| 1863 }); | |
| 1864 } | |
| 1865 } | 1302 } |
| 1866 | 1303 |
| 1867 class ToSourceVisitorTest extends EngineTestCase { | 1304 class ToSourceVisitorTest extends EngineTestCase { |
| 1868 void test_visitAdjacentStrings() { | 1305 void test_visitAdjacentStrings() { |
| 1869 _assertSource("'a' 'b'", AstFactory.adjacentStrings([AstFactory.string2("a")
, AstFactory.string2("b")])); | 1306 _assertSource("'a' 'b'", AstFactory.adjacentStrings([AstFactory.string2("a")
, AstFactory.string2("b")])); |
| 1870 } | 1307 } |
| 1871 | 1308 |
| 1872 void test_visitAnnotation_constant() { | 1309 void test_visitAnnotation_constant() { |
| 1873 _assertSource("@A", AstFactory.annotation(AstFactory.identifier3("A"))); | 1310 _assertSource("@A", AstFactory.annotation(AstFactory.identifier3("A"))); |
| 1874 } | 1311 } |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3101 * | 2538 * |
| 3102 * @param expectedSource the source string that the visitor is expected to pro
duce | 2539 * @param expectedSource the source string that the visitor is expected to pro
duce |
| 3103 * @param node the AST node being visited to produce the actual source | 2540 * @param node the AST node being visited to produce the actual source |
| 3104 * @throws AFE if the visitor does not produce the expected source for the giv
en node | 2541 * @throws AFE if the visitor does not produce the expected source for the giv
en node |
| 3105 */ | 2542 */ |
| 3106 void _assertSource(String expectedSource, AstNode node) { | 2543 void _assertSource(String expectedSource, AstNode node) { |
| 3107 PrintStringWriter writer = new PrintStringWriter(); | 2544 PrintStringWriter writer = new PrintStringWriter(); |
| 3108 node.accept(new ToSourceVisitor(writer)); | 2545 node.accept(new ToSourceVisitor(writer)); |
| 3109 JUnitTestCase.assertEquals(expectedSource, writer.toString()); | 2546 JUnitTestCase.assertEquals(expectedSource, writer.toString()); |
| 3110 } | 2547 } |
| 3111 | |
| 3112 static dartSuite() { | |
| 3113 _ut.group('ToSourceVisitorTest', () { | |
| 3114 _ut.test('test_visitAdjacentStrings', () { | |
| 3115 final __test = new ToSourceVisitorTest(); | |
| 3116 runJUnitTest(__test, __test.test_visitAdjacentStrings); | |
| 3117 }); | |
| 3118 _ut.test('test_visitAnnotation_constant', () { | |
| 3119 final __test = new ToSourceVisitorTest(); | |
| 3120 runJUnitTest(__test, __test.test_visitAnnotation_constant); | |
| 3121 }); | |
| 3122 _ut.test('test_visitAnnotation_constructor', () { | |
| 3123 final __test = new ToSourceVisitorTest(); | |
| 3124 runJUnitTest(__test, __test.test_visitAnnotation_constructor); | |
| 3125 }); | |
| 3126 _ut.test('test_visitArgumentList', () { | |
| 3127 final __test = new ToSourceVisitorTest(); | |
| 3128 runJUnitTest(__test, __test.test_visitArgumentList); | |
| 3129 }); | |
| 3130 _ut.test('test_visitAsExpression', () { | |
| 3131 final __test = new ToSourceVisitorTest(); | |
| 3132 runJUnitTest(__test, __test.test_visitAsExpression); | |
| 3133 }); | |
| 3134 _ut.test('test_visitAssertStatement', () { | |
| 3135 final __test = new ToSourceVisitorTest(); | |
| 3136 runJUnitTest(__test, __test.test_visitAssertStatement); | |
| 3137 }); | |
| 3138 _ut.test('test_visitAssignmentExpression', () { | |
| 3139 final __test = new ToSourceVisitorTest(); | |
| 3140 runJUnitTest(__test, __test.test_visitAssignmentExpression); | |
| 3141 }); | |
| 3142 _ut.test('test_visitAwaitExpression', () { | |
| 3143 final __test = new ToSourceVisitorTest(); | |
| 3144 runJUnitTest(__test, __test.test_visitAwaitExpression); | |
| 3145 }); | |
| 3146 _ut.test('test_visitBinaryExpression', () { | |
| 3147 final __test = new ToSourceVisitorTest(); | |
| 3148 runJUnitTest(__test, __test.test_visitBinaryExpression); | |
| 3149 }); | |
| 3150 _ut.test('test_visitBlockFunctionBody_async', () { | |
| 3151 final __test = new ToSourceVisitorTest(); | |
| 3152 runJUnitTest(__test, __test.test_visitBlockFunctionBody_async); | |
| 3153 }); | |
| 3154 _ut.test('test_visitBlockFunctionBody_async_star', () { | |
| 3155 final __test = new ToSourceVisitorTest(); | |
| 3156 runJUnitTest(__test, __test.test_visitBlockFunctionBody_async_star); | |
| 3157 }); | |
| 3158 _ut.test('test_visitBlockFunctionBody_simple', () { | |
| 3159 final __test = new ToSourceVisitorTest(); | |
| 3160 runJUnitTest(__test, __test.test_visitBlockFunctionBody_simple); | |
| 3161 }); | |
| 3162 _ut.test('test_visitBlockFunctionBody_sync', () { | |
| 3163 final __test = new ToSourceVisitorTest(); | |
| 3164 runJUnitTest(__test, __test.test_visitBlockFunctionBody_sync); | |
| 3165 }); | |
| 3166 _ut.test('test_visitBlockFunctionBody_sync_star', () { | |
| 3167 final __test = new ToSourceVisitorTest(); | |
| 3168 runJUnitTest(__test, __test.test_visitBlockFunctionBody_sync_star); | |
| 3169 }); | |
| 3170 _ut.test('test_visitBlock_empty', () { | |
| 3171 final __test = new ToSourceVisitorTest(); | |
| 3172 runJUnitTest(__test, __test.test_visitBlock_empty); | |
| 3173 }); | |
| 3174 _ut.test('test_visitBlock_nonEmpty', () { | |
| 3175 final __test = new ToSourceVisitorTest(); | |
| 3176 runJUnitTest(__test, __test.test_visitBlock_nonEmpty); | |
| 3177 }); | |
| 3178 _ut.test('test_visitBooleanLiteral_false', () { | |
| 3179 final __test = new ToSourceVisitorTest(); | |
| 3180 runJUnitTest(__test, __test.test_visitBooleanLiteral_false); | |
| 3181 }); | |
| 3182 _ut.test('test_visitBooleanLiteral_true', () { | |
| 3183 final __test = new ToSourceVisitorTest(); | |
| 3184 runJUnitTest(__test, __test.test_visitBooleanLiteral_true); | |
| 3185 }); | |
| 3186 _ut.test('test_visitBreakStatement_label', () { | |
| 3187 final __test = new ToSourceVisitorTest(); | |
| 3188 runJUnitTest(__test, __test.test_visitBreakStatement_label); | |
| 3189 }); | |
| 3190 _ut.test('test_visitBreakStatement_noLabel', () { | |
| 3191 final __test = new ToSourceVisitorTest(); | |
| 3192 runJUnitTest(__test, __test.test_visitBreakStatement_noLabel); | |
| 3193 }); | |
| 3194 _ut.test('test_visitCascadeExpression_field', () { | |
| 3195 final __test = new ToSourceVisitorTest(); | |
| 3196 runJUnitTest(__test, __test.test_visitCascadeExpression_field); | |
| 3197 }); | |
| 3198 _ut.test('test_visitCascadeExpression_index', () { | |
| 3199 final __test = new ToSourceVisitorTest(); | |
| 3200 runJUnitTest(__test, __test.test_visitCascadeExpression_index); | |
| 3201 }); | |
| 3202 _ut.test('test_visitCascadeExpression_method', () { | |
| 3203 final __test = new ToSourceVisitorTest(); | |
| 3204 runJUnitTest(__test, __test.test_visitCascadeExpression_method); | |
| 3205 }); | |
| 3206 _ut.test('test_visitCatchClause_catch_noStack', () { | |
| 3207 final __test = new ToSourceVisitorTest(); | |
| 3208 runJUnitTest(__test, __test.test_visitCatchClause_catch_noStack); | |
| 3209 }); | |
| 3210 _ut.test('test_visitCatchClause_catch_stack', () { | |
| 3211 final __test = new ToSourceVisitorTest(); | |
| 3212 runJUnitTest(__test, __test.test_visitCatchClause_catch_stack); | |
| 3213 }); | |
| 3214 _ut.test('test_visitCatchClause_on', () { | |
| 3215 final __test = new ToSourceVisitorTest(); | |
| 3216 runJUnitTest(__test, __test.test_visitCatchClause_on); | |
| 3217 }); | |
| 3218 _ut.test('test_visitCatchClause_on_catch', () { | |
| 3219 final __test = new ToSourceVisitorTest(); | |
| 3220 runJUnitTest(__test, __test.test_visitCatchClause_on_catch); | |
| 3221 }); | |
| 3222 _ut.test('test_visitClassDeclaration_abstract', () { | |
| 3223 final __test = new ToSourceVisitorTest(); | |
| 3224 runJUnitTest(__test, __test.test_visitClassDeclaration_abstract); | |
| 3225 }); | |
| 3226 _ut.test('test_visitClassDeclaration_empty', () { | |
| 3227 final __test = new ToSourceVisitorTest(); | |
| 3228 runJUnitTest(__test, __test.test_visitClassDeclaration_empty); | |
| 3229 }); | |
| 3230 _ut.test('test_visitClassDeclaration_extends', () { | |
| 3231 final __test = new ToSourceVisitorTest(); | |
| 3232 runJUnitTest(__test, __test.test_visitClassDeclaration_extends); | |
| 3233 }); | |
| 3234 _ut.test('test_visitClassDeclaration_extends_implements', () { | |
| 3235 final __test = new ToSourceVisitorTest(); | |
| 3236 runJUnitTest(__test, __test.test_visitClassDeclaration_extends_implement
s); | |
| 3237 }); | |
| 3238 _ut.test('test_visitClassDeclaration_extends_with', () { | |
| 3239 final __test = new ToSourceVisitorTest(); | |
| 3240 runJUnitTest(__test, __test.test_visitClassDeclaration_extends_with); | |
| 3241 }); | |
| 3242 _ut.test('test_visitClassDeclaration_extends_with_implements', () { | |
| 3243 final __test = new ToSourceVisitorTest(); | |
| 3244 runJUnitTest(__test, __test.test_visitClassDeclaration_extends_with_impl
ements); | |
| 3245 }); | |
| 3246 _ut.test('test_visitClassDeclaration_implements', () { | |
| 3247 final __test = new ToSourceVisitorTest(); | |
| 3248 runJUnitTest(__test, __test.test_visitClassDeclaration_implements); | |
| 3249 }); | |
| 3250 _ut.test('test_visitClassDeclaration_multipleMember', () { | |
| 3251 final __test = new ToSourceVisitorTest(); | |
| 3252 runJUnitTest(__test, __test.test_visitClassDeclaration_multipleMember); | |
| 3253 }); | |
| 3254 _ut.test('test_visitClassDeclaration_parameters', () { | |
| 3255 final __test = new ToSourceVisitorTest(); | |
| 3256 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters); | |
| 3257 }); | |
| 3258 _ut.test('test_visitClassDeclaration_parameters_extends', () { | |
| 3259 final __test = new ToSourceVisitorTest(); | |
| 3260 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters_extend
s); | |
| 3261 }); | |
| 3262 _ut.test('test_visitClassDeclaration_parameters_extends_implements', () { | |
| 3263 final __test = new ToSourceVisitorTest(); | |
| 3264 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters_extend
s_implements); | |
| 3265 }); | |
| 3266 _ut.test('test_visitClassDeclaration_parameters_extends_with', () { | |
| 3267 final __test = new ToSourceVisitorTest(); | |
| 3268 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters_extend
s_with); | |
| 3269 }); | |
| 3270 _ut.test('test_visitClassDeclaration_parameters_extends_with_implements',
() { | |
| 3271 final __test = new ToSourceVisitorTest(); | |
| 3272 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters_extend
s_with_implements); | |
| 3273 }); | |
| 3274 _ut.test('test_visitClassDeclaration_parameters_implements', () { | |
| 3275 final __test = new ToSourceVisitorTest(); | |
| 3276 runJUnitTest(__test, __test.test_visitClassDeclaration_parameters_implem
ents); | |
| 3277 }); | |
| 3278 _ut.test('test_visitClassDeclaration_singleMember', () { | |
| 3279 final __test = new ToSourceVisitorTest(); | |
| 3280 runJUnitTest(__test, __test.test_visitClassDeclaration_singleMember); | |
| 3281 }); | |
| 3282 _ut.test('test_visitClassDeclaration_withMetadata', () { | |
| 3283 final __test = new ToSourceVisitorTest(); | |
| 3284 runJUnitTest(__test, __test.test_visitClassDeclaration_withMetadata); | |
| 3285 }); | |
| 3286 _ut.test('test_visitClassTypeAlias_abstract', () { | |
| 3287 final __test = new ToSourceVisitorTest(); | |
| 3288 runJUnitTest(__test, __test.test_visitClassTypeAlias_abstract); | |
| 3289 }); | |
| 3290 _ut.test('test_visitClassTypeAlias_abstract_implements', () { | |
| 3291 final __test = new ToSourceVisitorTest(); | |
| 3292 runJUnitTest(__test, __test.test_visitClassTypeAlias_abstract_implements
); | |
| 3293 }); | |
| 3294 _ut.test('test_visitClassTypeAlias_generic', () { | |
| 3295 final __test = new ToSourceVisitorTest(); | |
| 3296 runJUnitTest(__test, __test.test_visitClassTypeAlias_generic); | |
| 3297 }); | |
| 3298 _ut.test('test_visitClassTypeAlias_implements', () { | |
| 3299 final __test = new ToSourceVisitorTest(); | |
| 3300 runJUnitTest(__test, __test.test_visitClassTypeAlias_implements); | |
| 3301 }); | |
| 3302 _ut.test('test_visitClassTypeAlias_minimal', () { | |
| 3303 final __test = new ToSourceVisitorTest(); | |
| 3304 runJUnitTest(__test, __test.test_visitClassTypeAlias_minimal); | |
| 3305 }); | |
| 3306 _ut.test('test_visitClassTypeAlias_parameters_abstract', () { | |
| 3307 final __test = new ToSourceVisitorTest(); | |
| 3308 runJUnitTest(__test, __test.test_visitClassTypeAlias_parameters_abstract
); | |
| 3309 }); | |
| 3310 _ut.test('test_visitClassTypeAlias_parameters_abstract_implements', () { | |
| 3311 final __test = new ToSourceVisitorTest(); | |
| 3312 runJUnitTest(__test, __test.test_visitClassTypeAlias_parameters_abstract
_implements); | |
| 3313 }); | |
| 3314 _ut.test('test_visitClassTypeAlias_parameters_implements', () { | |
| 3315 final __test = new ToSourceVisitorTest(); | |
| 3316 runJUnitTest(__test, __test.test_visitClassTypeAlias_parameters_implemen
ts); | |
| 3317 }); | |
| 3318 _ut.test('test_visitClassTypeAlias_withMetadata', () { | |
| 3319 final __test = new ToSourceVisitorTest(); | |
| 3320 runJUnitTest(__test, __test.test_visitClassTypeAlias_withMetadata); | |
| 3321 }); | |
| 3322 _ut.test('test_visitComment', () { | |
| 3323 final __test = new ToSourceVisitorTest(); | |
| 3324 runJUnitTest(__test, __test.test_visitComment); | |
| 3325 }); | |
| 3326 _ut.test('test_visitCommentReference', () { | |
| 3327 final __test = new ToSourceVisitorTest(); | |
| 3328 runJUnitTest(__test, __test.test_visitCommentReference); | |
| 3329 }); | |
| 3330 _ut.test('test_visitCompilationUnit_declaration', () { | |
| 3331 final __test = new ToSourceVisitorTest(); | |
| 3332 runJUnitTest(__test, __test.test_visitCompilationUnit_declaration); | |
| 3333 }); | |
| 3334 _ut.test('test_visitCompilationUnit_directive', () { | |
| 3335 final __test = new ToSourceVisitorTest(); | |
| 3336 runJUnitTest(__test, __test.test_visitCompilationUnit_directive); | |
| 3337 }); | |
| 3338 _ut.test('test_visitCompilationUnit_directive_declaration', () { | |
| 3339 final __test = new ToSourceVisitorTest(); | |
| 3340 runJUnitTest(__test, __test.test_visitCompilationUnit_directive_declarat
ion); | |
| 3341 }); | |
| 3342 _ut.test('test_visitCompilationUnit_empty', () { | |
| 3343 final __test = new ToSourceVisitorTest(); | |
| 3344 runJUnitTest(__test, __test.test_visitCompilationUnit_empty); | |
| 3345 }); | |
| 3346 _ut.test('test_visitCompilationUnit_script', () { | |
| 3347 final __test = new ToSourceVisitorTest(); | |
| 3348 runJUnitTest(__test, __test.test_visitCompilationUnit_script); | |
| 3349 }); | |
| 3350 _ut.test('test_visitCompilationUnit_script_declaration', () { | |
| 3351 final __test = new ToSourceVisitorTest(); | |
| 3352 runJUnitTest(__test, __test.test_visitCompilationUnit_script_declaration
); | |
| 3353 }); | |
| 3354 _ut.test('test_visitCompilationUnit_script_directive', () { | |
| 3355 final __test = new ToSourceVisitorTest(); | |
| 3356 runJUnitTest(__test, __test.test_visitCompilationUnit_script_directive); | |
| 3357 }); | |
| 3358 _ut.test('test_visitCompilationUnit_script_directives_declarations', () { | |
| 3359 final __test = new ToSourceVisitorTest(); | |
| 3360 runJUnitTest(__test, __test.test_visitCompilationUnit_script_directives_
declarations); | |
| 3361 }); | |
| 3362 _ut.test('test_visitConditionalExpression', () { | |
| 3363 final __test = new ToSourceVisitorTest(); | |
| 3364 runJUnitTest(__test, __test.test_visitConditionalExpression); | |
| 3365 }); | |
| 3366 _ut.test('test_visitConstructorDeclaration_const', () { | |
| 3367 final __test = new ToSourceVisitorTest(); | |
| 3368 runJUnitTest(__test, __test.test_visitConstructorDeclaration_const); | |
| 3369 }); | |
| 3370 _ut.test('test_visitConstructorDeclaration_external', () { | |
| 3371 final __test = new ToSourceVisitorTest(); | |
| 3372 runJUnitTest(__test, __test.test_visitConstructorDeclaration_external); | |
| 3373 }); | |
| 3374 _ut.test('test_visitConstructorDeclaration_minimal', () { | |
| 3375 final __test = new ToSourceVisitorTest(); | |
| 3376 runJUnitTest(__test, __test.test_visitConstructorDeclaration_minimal); | |
| 3377 }); | |
| 3378 _ut.test('test_visitConstructorDeclaration_multipleInitializers', () { | |
| 3379 final __test = new ToSourceVisitorTest(); | |
| 3380 runJUnitTest(__test, __test.test_visitConstructorDeclaration_multipleIni
tializers); | |
| 3381 }); | |
| 3382 _ut.test('test_visitConstructorDeclaration_multipleParameters', () { | |
| 3383 final __test = new ToSourceVisitorTest(); | |
| 3384 runJUnitTest(__test, __test.test_visitConstructorDeclaration_multiplePar
ameters); | |
| 3385 }); | |
| 3386 _ut.test('test_visitConstructorDeclaration_named', () { | |
| 3387 final __test = new ToSourceVisitorTest(); | |
| 3388 runJUnitTest(__test, __test.test_visitConstructorDeclaration_named); | |
| 3389 }); | |
| 3390 _ut.test('test_visitConstructorDeclaration_singleInitializer', () { | |
| 3391 final __test = new ToSourceVisitorTest(); | |
| 3392 runJUnitTest(__test, __test.test_visitConstructorDeclaration_singleIniti
alizer); | |
| 3393 }); | |
| 3394 _ut.test('test_visitConstructorDeclaration_withMetadata', () { | |
| 3395 final __test = new ToSourceVisitorTest(); | |
| 3396 runJUnitTest(__test, __test.test_visitConstructorDeclaration_withMetadat
a); | |
| 3397 }); | |
| 3398 _ut.test('test_visitConstructorFieldInitializer_withThis', () { | |
| 3399 final __test = new ToSourceVisitorTest(); | |
| 3400 runJUnitTest(__test, __test.test_visitConstructorFieldInitializer_withTh
is); | |
| 3401 }); | |
| 3402 _ut.test('test_visitConstructorFieldInitializer_withoutThis', () { | |
| 3403 final __test = new ToSourceVisitorTest(); | |
| 3404 runJUnitTest(__test, __test.test_visitConstructorFieldInitializer_withou
tThis); | |
| 3405 }); | |
| 3406 _ut.test('test_visitConstructorName_named_prefix', () { | |
| 3407 final __test = new ToSourceVisitorTest(); | |
| 3408 runJUnitTest(__test, __test.test_visitConstructorName_named_prefix); | |
| 3409 }); | |
| 3410 _ut.test('test_visitConstructorName_unnamed_noPrefix', () { | |
| 3411 final __test = new ToSourceVisitorTest(); | |
| 3412 runJUnitTest(__test, __test.test_visitConstructorName_unnamed_noPrefix); | |
| 3413 }); | |
| 3414 _ut.test('test_visitConstructorName_unnamed_prefix', () { | |
| 3415 final __test = new ToSourceVisitorTest(); | |
| 3416 runJUnitTest(__test, __test.test_visitConstructorName_unnamed_prefix); | |
| 3417 }); | |
| 3418 _ut.test('test_visitContinueStatement_label', () { | |
| 3419 final __test = new ToSourceVisitorTest(); | |
| 3420 runJUnitTest(__test, __test.test_visitContinueStatement_label); | |
| 3421 }); | |
| 3422 _ut.test('test_visitContinueStatement_noLabel', () { | |
| 3423 final __test = new ToSourceVisitorTest(); | |
| 3424 runJUnitTest(__test, __test.test_visitContinueStatement_noLabel); | |
| 3425 }); | |
| 3426 _ut.test('test_visitDefaultFormalParameter_named_noValue', () { | |
| 3427 final __test = new ToSourceVisitorTest(); | |
| 3428 runJUnitTest(__test, __test.test_visitDefaultFormalParameter_named_noVal
ue); | |
| 3429 }); | |
| 3430 _ut.test('test_visitDefaultFormalParameter_named_value', () { | |
| 3431 final __test = new ToSourceVisitorTest(); | |
| 3432 runJUnitTest(__test, __test.test_visitDefaultFormalParameter_named_value
); | |
| 3433 }); | |
| 3434 _ut.test('test_visitDefaultFormalParameter_positional_noValue', () { | |
| 3435 final __test = new ToSourceVisitorTest(); | |
| 3436 runJUnitTest(__test, __test.test_visitDefaultFormalParameter_positional_
noValue); | |
| 3437 }); | |
| 3438 _ut.test('test_visitDefaultFormalParameter_positional_value', () { | |
| 3439 final __test = new ToSourceVisitorTest(); | |
| 3440 runJUnitTest(__test, __test.test_visitDefaultFormalParameter_positional_
value); | |
| 3441 }); | |
| 3442 _ut.test('test_visitDoStatement', () { | |
| 3443 final __test = new ToSourceVisitorTest(); | |
| 3444 runJUnitTest(__test, __test.test_visitDoStatement); | |
| 3445 }); | |
| 3446 _ut.test('test_visitDoubleLiteral', () { | |
| 3447 final __test = new ToSourceVisitorTest(); | |
| 3448 runJUnitTest(__test, __test.test_visitDoubleLiteral); | |
| 3449 }); | |
| 3450 _ut.test('test_visitEmptyFunctionBody', () { | |
| 3451 final __test = new ToSourceVisitorTest(); | |
| 3452 runJUnitTest(__test, __test.test_visitEmptyFunctionBody); | |
| 3453 }); | |
| 3454 _ut.test('test_visitEmptyStatement', () { | |
| 3455 final __test = new ToSourceVisitorTest(); | |
| 3456 runJUnitTest(__test, __test.test_visitEmptyStatement); | |
| 3457 }); | |
| 3458 _ut.test('test_visitEnumDeclaration_multiple', () { | |
| 3459 final __test = new ToSourceVisitorTest(); | |
| 3460 runJUnitTest(__test, __test.test_visitEnumDeclaration_multiple); | |
| 3461 }); | |
| 3462 _ut.test('test_visitEnumDeclaration_single', () { | |
| 3463 final __test = new ToSourceVisitorTest(); | |
| 3464 runJUnitTest(__test, __test.test_visitEnumDeclaration_single); | |
| 3465 }); | |
| 3466 _ut.test('test_visitExportDirective_combinator', () { | |
| 3467 final __test = new ToSourceVisitorTest(); | |
| 3468 runJUnitTest(__test, __test.test_visitExportDirective_combinator); | |
| 3469 }); | |
| 3470 _ut.test('test_visitExportDirective_combinators', () { | |
| 3471 final __test = new ToSourceVisitorTest(); | |
| 3472 runJUnitTest(__test, __test.test_visitExportDirective_combinators); | |
| 3473 }); | |
| 3474 _ut.test('test_visitExportDirective_minimal', () { | |
| 3475 final __test = new ToSourceVisitorTest(); | |
| 3476 runJUnitTest(__test, __test.test_visitExportDirective_minimal); | |
| 3477 }); | |
| 3478 _ut.test('test_visitExportDirective_withMetadata', () { | |
| 3479 final __test = new ToSourceVisitorTest(); | |
| 3480 runJUnitTest(__test, __test.test_visitExportDirective_withMetadata); | |
| 3481 }); | |
| 3482 _ut.test('test_visitExpressionFunctionBody_async', () { | |
| 3483 final __test = new ToSourceVisitorTest(); | |
| 3484 runJUnitTest(__test, __test.test_visitExpressionFunctionBody_async); | |
| 3485 }); | |
| 3486 _ut.test('test_visitExpressionFunctionBody_simple', () { | |
| 3487 final __test = new ToSourceVisitorTest(); | |
| 3488 runJUnitTest(__test, __test.test_visitExpressionFunctionBody_simple); | |
| 3489 }); | |
| 3490 _ut.test('test_visitExpressionStatement', () { | |
| 3491 final __test = new ToSourceVisitorTest(); | |
| 3492 runJUnitTest(__test, __test.test_visitExpressionStatement); | |
| 3493 }); | |
| 3494 _ut.test('test_visitExtendsClause', () { | |
| 3495 final __test = new ToSourceVisitorTest(); | |
| 3496 runJUnitTest(__test, __test.test_visitExtendsClause); | |
| 3497 }); | |
| 3498 _ut.test('test_visitFieldDeclaration_instance', () { | |
| 3499 final __test = new ToSourceVisitorTest(); | |
| 3500 runJUnitTest(__test, __test.test_visitFieldDeclaration_instance); | |
| 3501 }); | |
| 3502 _ut.test('test_visitFieldDeclaration_static', () { | |
| 3503 final __test = new ToSourceVisitorTest(); | |
| 3504 runJUnitTest(__test, __test.test_visitFieldDeclaration_static); | |
| 3505 }); | |
| 3506 _ut.test('test_visitFieldDeclaration_withMetadata', () { | |
| 3507 final __test = new ToSourceVisitorTest(); | |
| 3508 runJUnitTest(__test, __test.test_visitFieldDeclaration_withMetadata); | |
| 3509 }); | |
| 3510 _ut.test('test_visitFieldFormalParameter_functionTyped', () { | |
| 3511 final __test = new ToSourceVisitorTest(); | |
| 3512 runJUnitTest(__test, __test.test_visitFieldFormalParameter_functionTyped
); | |
| 3513 }); | |
| 3514 _ut.test('test_visitFieldFormalParameter_keyword', () { | |
| 3515 final __test = new ToSourceVisitorTest(); | |
| 3516 runJUnitTest(__test, __test.test_visitFieldFormalParameter_keyword); | |
| 3517 }); | |
| 3518 _ut.test('test_visitFieldFormalParameter_keywordAndType', () { | |
| 3519 final __test = new ToSourceVisitorTest(); | |
| 3520 runJUnitTest(__test, __test.test_visitFieldFormalParameter_keywordAndTyp
e); | |
| 3521 }); | |
| 3522 _ut.test('test_visitFieldFormalParameter_type', () { | |
| 3523 final __test = new ToSourceVisitorTest(); | |
| 3524 runJUnitTest(__test, __test.test_visitFieldFormalParameter_type); | |
| 3525 }); | |
| 3526 _ut.test('test_visitForEachStatement_declared', () { | |
| 3527 final __test = new ToSourceVisitorTest(); | |
| 3528 runJUnitTest(__test, __test.test_visitForEachStatement_declared); | |
| 3529 }); | |
| 3530 _ut.test('test_visitForEachStatement_variable', () { | |
| 3531 final __test = new ToSourceVisitorTest(); | |
| 3532 runJUnitTest(__test, __test.test_visitForEachStatement_variable); | |
| 3533 }); | |
| 3534 _ut.test('test_visitForEachStatement_variable_await', () { | |
| 3535 final __test = new ToSourceVisitorTest(); | |
| 3536 runJUnitTest(__test, __test.test_visitForEachStatement_variable_await); | |
| 3537 }); | |
| 3538 _ut.test('test_visitForStatement_c', () { | |
| 3539 final __test = new ToSourceVisitorTest(); | |
| 3540 runJUnitTest(__test, __test.test_visitForStatement_c); | |
| 3541 }); | |
| 3542 _ut.test('test_visitForStatement_cu', () { | |
| 3543 final __test = new ToSourceVisitorTest(); | |
| 3544 runJUnitTest(__test, __test.test_visitForStatement_cu); | |
| 3545 }); | |
| 3546 _ut.test('test_visitForStatement_e', () { | |
| 3547 final __test = new ToSourceVisitorTest(); | |
| 3548 runJUnitTest(__test, __test.test_visitForStatement_e); | |
| 3549 }); | |
| 3550 _ut.test('test_visitForStatement_ec', () { | |
| 3551 final __test = new ToSourceVisitorTest(); | |
| 3552 runJUnitTest(__test, __test.test_visitForStatement_ec); | |
| 3553 }); | |
| 3554 _ut.test('test_visitForStatement_ecu', () { | |
| 3555 final __test = new ToSourceVisitorTest(); | |
| 3556 runJUnitTest(__test, __test.test_visitForStatement_ecu); | |
| 3557 }); | |
| 3558 _ut.test('test_visitForStatement_eu', () { | |
| 3559 final __test = new ToSourceVisitorTest(); | |
| 3560 runJUnitTest(__test, __test.test_visitForStatement_eu); | |
| 3561 }); | |
| 3562 _ut.test('test_visitForStatement_i', () { | |
| 3563 final __test = new ToSourceVisitorTest(); | |
| 3564 runJUnitTest(__test, __test.test_visitForStatement_i); | |
| 3565 }); | |
| 3566 _ut.test('test_visitForStatement_ic', () { | |
| 3567 final __test = new ToSourceVisitorTest(); | |
| 3568 runJUnitTest(__test, __test.test_visitForStatement_ic); | |
| 3569 }); | |
| 3570 _ut.test('test_visitForStatement_icu', () { | |
| 3571 final __test = new ToSourceVisitorTest(); | |
| 3572 runJUnitTest(__test, __test.test_visitForStatement_icu); | |
| 3573 }); | |
| 3574 _ut.test('test_visitForStatement_iu', () { | |
| 3575 final __test = new ToSourceVisitorTest(); | |
| 3576 runJUnitTest(__test, __test.test_visitForStatement_iu); | |
| 3577 }); | |
| 3578 _ut.test('test_visitForStatement_u', () { | |
| 3579 final __test = new ToSourceVisitorTest(); | |
| 3580 runJUnitTest(__test, __test.test_visitForStatement_u); | |
| 3581 }); | |
| 3582 _ut.test('test_visitFormalParameterList_empty', () { | |
| 3583 final __test = new ToSourceVisitorTest(); | |
| 3584 runJUnitTest(__test, __test.test_visitFormalParameterList_empty); | |
| 3585 }); | |
| 3586 _ut.test('test_visitFormalParameterList_n', () { | |
| 3587 final __test = new ToSourceVisitorTest(); | |
| 3588 runJUnitTest(__test, __test.test_visitFormalParameterList_n); | |
| 3589 }); | |
| 3590 _ut.test('test_visitFormalParameterList_nn', () { | |
| 3591 final __test = new ToSourceVisitorTest(); | |
| 3592 runJUnitTest(__test, __test.test_visitFormalParameterList_nn); | |
| 3593 }); | |
| 3594 _ut.test('test_visitFormalParameterList_p', () { | |
| 3595 final __test = new ToSourceVisitorTest(); | |
| 3596 runJUnitTest(__test, __test.test_visitFormalParameterList_p); | |
| 3597 }); | |
| 3598 _ut.test('test_visitFormalParameterList_pp', () { | |
| 3599 final __test = new ToSourceVisitorTest(); | |
| 3600 runJUnitTest(__test, __test.test_visitFormalParameterList_pp); | |
| 3601 }); | |
| 3602 _ut.test('test_visitFormalParameterList_r', () { | |
| 3603 final __test = new ToSourceVisitorTest(); | |
| 3604 runJUnitTest(__test, __test.test_visitFormalParameterList_r); | |
| 3605 }); | |
| 3606 _ut.test('test_visitFormalParameterList_rn', () { | |
| 3607 final __test = new ToSourceVisitorTest(); | |
| 3608 runJUnitTest(__test, __test.test_visitFormalParameterList_rn); | |
| 3609 }); | |
| 3610 _ut.test('test_visitFormalParameterList_rnn', () { | |
| 3611 final __test = new ToSourceVisitorTest(); | |
| 3612 runJUnitTest(__test, __test.test_visitFormalParameterList_rnn); | |
| 3613 }); | |
| 3614 _ut.test('test_visitFormalParameterList_rp', () { | |
| 3615 final __test = new ToSourceVisitorTest(); | |
| 3616 runJUnitTest(__test, __test.test_visitFormalParameterList_rp); | |
| 3617 }); | |
| 3618 _ut.test('test_visitFormalParameterList_rpp', () { | |
| 3619 final __test = new ToSourceVisitorTest(); | |
| 3620 runJUnitTest(__test, __test.test_visitFormalParameterList_rpp); | |
| 3621 }); | |
| 3622 _ut.test('test_visitFormalParameterList_rr', () { | |
| 3623 final __test = new ToSourceVisitorTest(); | |
| 3624 runJUnitTest(__test, __test.test_visitFormalParameterList_rr); | |
| 3625 }); | |
| 3626 _ut.test('test_visitFormalParameterList_rrn', () { | |
| 3627 final __test = new ToSourceVisitorTest(); | |
| 3628 runJUnitTest(__test, __test.test_visitFormalParameterList_rrn); | |
| 3629 }); | |
| 3630 _ut.test('test_visitFormalParameterList_rrnn', () { | |
| 3631 final __test = new ToSourceVisitorTest(); | |
| 3632 runJUnitTest(__test, __test.test_visitFormalParameterList_rrnn); | |
| 3633 }); | |
| 3634 _ut.test('test_visitFormalParameterList_rrp', () { | |
| 3635 final __test = new ToSourceVisitorTest(); | |
| 3636 runJUnitTest(__test, __test.test_visitFormalParameterList_rrp); | |
| 3637 }); | |
| 3638 _ut.test('test_visitFormalParameterList_rrpp', () { | |
| 3639 final __test = new ToSourceVisitorTest(); | |
| 3640 runJUnitTest(__test, __test.test_visitFormalParameterList_rrpp); | |
| 3641 }); | |
| 3642 _ut.test('test_visitFunctionDeclarationStatement', () { | |
| 3643 final __test = new ToSourceVisitorTest(); | |
| 3644 runJUnitTest(__test, __test.test_visitFunctionDeclarationStatement); | |
| 3645 }); | |
| 3646 _ut.test('test_visitFunctionDeclaration_getter', () { | |
| 3647 final __test = new ToSourceVisitorTest(); | |
| 3648 runJUnitTest(__test, __test.test_visitFunctionDeclaration_getter); | |
| 3649 }); | |
| 3650 _ut.test('test_visitFunctionDeclaration_local_blockBody', () { | |
| 3651 final __test = new ToSourceVisitorTest(); | |
| 3652 runJUnitTest(__test, __test.test_visitFunctionDeclaration_local_blockBod
y); | |
| 3653 }); | |
| 3654 _ut.test('test_visitFunctionDeclaration_local_expressionBody', () { | |
| 3655 final __test = new ToSourceVisitorTest(); | |
| 3656 runJUnitTest(__test, __test.test_visitFunctionDeclaration_local_expressi
onBody); | |
| 3657 }); | |
| 3658 _ut.test('test_visitFunctionDeclaration_normal', () { | |
| 3659 final __test = new ToSourceVisitorTest(); | |
| 3660 runJUnitTest(__test, __test.test_visitFunctionDeclaration_normal); | |
| 3661 }); | |
| 3662 _ut.test('test_visitFunctionDeclaration_setter', () { | |
| 3663 final __test = new ToSourceVisitorTest(); | |
| 3664 runJUnitTest(__test, __test.test_visitFunctionDeclaration_setter); | |
| 3665 }); | |
| 3666 _ut.test('test_visitFunctionDeclaration_withMetadata', () { | |
| 3667 final __test = new ToSourceVisitorTest(); | |
| 3668 runJUnitTest(__test, __test.test_visitFunctionDeclaration_withMetadata); | |
| 3669 }); | |
| 3670 _ut.test('test_visitFunctionExpression', () { | |
| 3671 final __test = new ToSourceVisitorTest(); | |
| 3672 runJUnitTest(__test, __test.test_visitFunctionExpression); | |
| 3673 }); | |
| 3674 _ut.test('test_visitFunctionExpressionInvocation', () { | |
| 3675 final __test = new ToSourceVisitorTest(); | |
| 3676 runJUnitTest(__test, __test.test_visitFunctionExpressionInvocation); | |
| 3677 }); | |
| 3678 _ut.test('test_visitFunctionTypeAlias_generic', () { | |
| 3679 final __test = new ToSourceVisitorTest(); | |
| 3680 runJUnitTest(__test, __test.test_visitFunctionTypeAlias_generic); | |
| 3681 }); | |
| 3682 _ut.test('test_visitFunctionTypeAlias_nonGeneric', () { | |
| 3683 final __test = new ToSourceVisitorTest(); | |
| 3684 runJUnitTest(__test, __test.test_visitFunctionTypeAlias_nonGeneric); | |
| 3685 }); | |
| 3686 _ut.test('test_visitFunctionTypeAlias_withMetadata', () { | |
| 3687 final __test = new ToSourceVisitorTest(); | |
| 3688 runJUnitTest(__test, __test.test_visitFunctionTypeAlias_withMetadata); | |
| 3689 }); | |
| 3690 _ut.test('test_visitFunctionTypedFormalParameter_noType', () { | |
| 3691 final __test = new ToSourceVisitorTest(); | |
| 3692 runJUnitTest(__test, __test.test_visitFunctionTypedFormalParameter_noTyp
e); | |
| 3693 }); | |
| 3694 _ut.test('test_visitFunctionTypedFormalParameter_type', () { | |
| 3695 final __test = new ToSourceVisitorTest(); | |
| 3696 runJUnitTest(__test, __test.test_visitFunctionTypedFormalParameter_type)
; | |
| 3697 }); | |
| 3698 _ut.test('test_visitIfStatement_withElse', () { | |
| 3699 final __test = new ToSourceVisitorTest(); | |
| 3700 runJUnitTest(__test, __test.test_visitIfStatement_withElse); | |
| 3701 }); | |
| 3702 _ut.test('test_visitIfStatement_withoutElse', () { | |
| 3703 final __test = new ToSourceVisitorTest(); | |
| 3704 runJUnitTest(__test, __test.test_visitIfStatement_withoutElse); | |
| 3705 }); | |
| 3706 _ut.test('test_visitImplementsClause_multiple', () { | |
| 3707 final __test = new ToSourceVisitorTest(); | |
| 3708 runJUnitTest(__test, __test.test_visitImplementsClause_multiple); | |
| 3709 }); | |
| 3710 _ut.test('test_visitImplementsClause_single', () { | |
| 3711 final __test = new ToSourceVisitorTest(); | |
| 3712 runJUnitTest(__test, __test.test_visitImplementsClause_single); | |
| 3713 }); | |
| 3714 _ut.test('test_visitImportDirective_combinator', () { | |
| 3715 final __test = new ToSourceVisitorTest(); | |
| 3716 runJUnitTest(__test, __test.test_visitImportDirective_combinator); | |
| 3717 }); | |
| 3718 _ut.test('test_visitImportDirective_combinators', () { | |
| 3719 final __test = new ToSourceVisitorTest(); | |
| 3720 runJUnitTest(__test, __test.test_visitImportDirective_combinators); | |
| 3721 }); | |
| 3722 _ut.test('test_visitImportDirective_deferred', () { | |
| 3723 final __test = new ToSourceVisitorTest(); | |
| 3724 runJUnitTest(__test, __test.test_visitImportDirective_deferred); | |
| 3725 }); | |
| 3726 _ut.test('test_visitImportDirective_minimal', () { | |
| 3727 final __test = new ToSourceVisitorTest(); | |
| 3728 runJUnitTest(__test, __test.test_visitImportDirective_minimal); | |
| 3729 }); | |
| 3730 _ut.test('test_visitImportDirective_prefix', () { | |
| 3731 final __test = new ToSourceVisitorTest(); | |
| 3732 runJUnitTest(__test, __test.test_visitImportDirective_prefix); | |
| 3733 }); | |
| 3734 _ut.test('test_visitImportDirective_prefix_combinator', () { | |
| 3735 final __test = new ToSourceVisitorTest(); | |
| 3736 runJUnitTest(__test, __test.test_visitImportDirective_prefix_combinator)
; | |
| 3737 }); | |
| 3738 _ut.test('test_visitImportDirective_prefix_combinators', () { | |
| 3739 final __test = new ToSourceVisitorTest(); | |
| 3740 runJUnitTest(__test, __test.test_visitImportDirective_prefix_combinators
); | |
| 3741 }); | |
| 3742 _ut.test('test_visitImportDirective_withMetadata', () { | |
| 3743 final __test = new ToSourceVisitorTest(); | |
| 3744 runJUnitTest(__test, __test.test_visitImportDirective_withMetadata); | |
| 3745 }); | |
| 3746 _ut.test('test_visitImportHideCombinator_multiple', () { | |
| 3747 final __test = new ToSourceVisitorTest(); | |
| 3748 runJUnitTest(__test, __test.test_visitImportHideCombinator_multiple); | |
| 3749 }); | |
| 3750 _ut.test('test_visitImportHideCombinator_single', () { | |
| 3751 final __test = new ToSourceVisitorTest(); | |
| 3752 runJUnitTest(__test, __test.test_visitImportHideCombinator_single); | |
| 3753 }); | |
| 3754 _ut.test('test_visitImportShowCombinator_multiple', () { | |
| 3755 final __test = new ToSourceVisitorTest(); | |
| 3756 runJUnitTest(__test, __test.test_visitImportShowCombinator_multiple); | |
| 3757 }); | |
| 3758 _ut.test('test_visitImportShowCombinator_single', () { | |
| 3759 final __test = new ToSourceVisitorTest(); | |
| 3760 runJUnitTest(__test, __test.test_visitImportShowCombinator_single); | |
| 3761 }); | |
| 3762 _ut.test('test_visitIndexExpression', () { | |
| 3763 final __test = new ToSourceVisitorTest(); | |
| 3764 runJUnitTest(__test, __test.test_visitIndexExpression); | |
| 3765 }); | |
| 3766 _ut.test('test_visitInstanceCreationExpression_const', () { | |
| 3767 final __test = new ToSourceVisitorTest(); | |
| 3768 runJUnitTest(__test, __test.test_visitInstanceCreationExpression_const); | |
| 3769 }); | |
| 3770 _ut.test('test_visitInstanceCreationExpression_named', () { | |
| 3771 final __test = new ToSourceVisitorTest(); | |
| 3772 runJUnitTest(__test, __test.test_visitInstanceCreationExpression_named); | |
| 3773 }); | |
| 3774 _ut.test('test_visitInstanceCreationExpression_unnamed', () { | |
| 3775 final __test = new ToSourceVisitorTest(); | |
| 3776 runJUnitTest(__test, __test.test_visitInstanceCreationExpression_unnamed
); | |
| 3777 }); | |
| 3778 _ut.test('test_visitIntegerLiteral', () { | |
| 3779 final __test = new ToSourceVisitorTest(); | |
| 3780 runJUnitTest(__test, __test.test_visitIntegerLiteral); | |
| 3781 }); | |
| 3782 _ut.test('test_visitInterpolationExpression_expression', () { | |
| 3783 final __test = new ToSourceVisitorTest(); | |
| 3784 runJUnitTest(__test, __test.test_visitInterpolationExpression_expression
); | |
| 3785 }); | |
| 3786 _ut.test('test_visitInterpolationExpression_identifier', () { | |
| 3787 final __test = new ToSourceVisitorTest(); | |
| 3788 runJUnitTest(__test, __test.test_visitInterpolationExpression_identifier
); | |
| 3789 }); | |
| 3790 _ut.test('test_visitInterpolationString', () { | |
| 3791 final __test = new ToSourceVisitorTest(); | |
| 3792 runJUnitTest(__test, __test.test_visitInterpolationString); | |
| 3793 }); | |
| 3794 _ut.test('test_visitIsExpression_negated', () { | |
| 3795 final __test = new ToSourceVisitorTest(); | |
| 3796 runJUnitTest(__test, __test.test_visitIsExpression_negated); | |
| 3797 }); | |
| 3798 _ut.test('test_visitIsExpression_normal', () { | |
| 3799 final __test = new ToSourceVisitorTest(); | |
| 3800 runJUnitTest(__test, __test.test_visitIsExpression_normal); | |
| 3801 }); | |
| 3802 _ut.test('test_visitLabel', () { | |
| 3803 final __test = new ToSourceVisitorTest(); | |
| 3804 runJUnitTest(__test, __test.test_visitLabel); | |
| 3805 }); | |
| 3806 _ut.test('test_visitLabeledStatement_multiple', () { | |
| 3807 final __test = new ToSourceVisitorTest(); | |
| 3808 runJUnitTest(__test, __test.test_visitLabeledStatement_multiple); | |
| 3809 }); | |
| 3810 _ut.test('test_visitLabeledStatement_single', () { | |
| 3811 final __test = new ToSourceVisitorTest(); | |
| 3812 runJUnitTest(__test, __test.test_visitLabeledStatement_single); | |
| 3813 }); | |
| 3814 _ut.test('test_visitLibraryDirective', () { | |
| 3815 final __test = new ToSourceVisitorTest(); | |
| 3816 runJUnitTest(__test, __test.test_visitLibraryDirective); | |
| 3817 }); | |
| 3818 _ut.test('test_visitLibraryDirective_withMetadata', () { | |
| 3819 final __test = new ToSourceVisitorTest(); | |
| 3820 runJUnitTest(__test, __test.test_visitLibraryDirective_withMetadata); | |
| 3821 }); | |
| 3822 _ut.test('test_visitLibraryIdentifier_multiple', () { | |
| 3823 final __test = new ToSourceVisitorTest(); | |
| 3824 runJUnitTest(__test, __test.test_visitLibraryIdentifier_multiple); | |
| 3825 }); | |
| 3826 _ut.test('test_visitLibraryIdentifier_single', () { | |
| 3827 final __test = new ToSourceVisitorTest(); | |
| 3828 runJUnitTest(__test, __test.test_visitLibraryIdentifier_single); | |
| 3829 }); | |
| 3830 _ut.test('test_visitListLiteral_const', () { | |
| 3831 final __test = new ToSourceVisitorTest(); | |
| 3832 runJUnitTest(__test, __test.test_visitListLiteral_const); | |
| 3833 }); | |
| 3834 _ut.test('test_visitListLiteral_empty', () { | |
| 3835 final __test = new ToSourceVisitorTest(); | |
| 3836 runJUnitTest(__test, __test.test_visitListLiteral_empty); | |
| 3837 }); | |
| 3838 _ut.test('test_visitListLiteral_nonEmpty', () { | |
| 3839 final __test = new ToSourceVisitorTest(); | |
| 3840 runJUnitTest(__test, __test.test_visitListLiteral_nonEmpty); | |
| 3841 }); | |
| 3842 _ut.test('test_visitMapLiteralEntry', () { | |
| 3843 final __test = new ToSourceVisitorTest(); | |
| 3844 runJUnitTest(__test, __test.test_visitMapLiteralEntry); | |
| 3845 }); | |
| 3846 _ut.test('test_visitMapLiteral_const', () { | |
| 3847 final __test = new ToSourceVisitorTest(); | |
| 3848 runJUnitTest(__test, __test.test_visitMapLiteral_const); | |
| 3849 }); | |
| 3850 _ut.test('test_visitMapLiteral_empty', () { | |
| 3851 final __test = new ToSourceVisitorTest(); | |
| 3852 runJUnitTest(__test, __test.test_visitMapLiteral_empty); | |
| 3853 }); | |
| 3854 _ut.test('test_visitMapLiteral_nonEmpty', () { | |
| 3855 final __test = new ToSourceVisitorTest(); | |
| 3856 runJUnitTest(__test, __test.test_visitMapLiteral_nonEmpty); | |
| 3857 }); | |
| 3858 _ut.test('test_visitMethodDeclaration_external', () { | |
| 3859 final __test = new ToSourceVisitorTest(); | |
| 3860 runJUnitTest(__test, __test.test_visitMethodDeclaration_external); | |
| 3861 }); | |
| 3862 _ut.test('test_visitMethodDeclaration_external_returnType', () { | |
| 3863 final __test = new ToSourceVisitorTest(); | |
| 3864 runJUnitTest(__test, __test.test_visitMethodDeclaration_external_returnT
ype); | |
| 3865 }); | |
| 3866 _ut.test('test_visitMethodDeclaration_getter', () { | |
| 3867 final __test = new ToSourceVisitorTest(); | |
| 3868 runJUnitTest(__test, __test.test_visitMethodDeclaration_getter); | |
| 3869 }); | |
| 3870 _ut.test('test_visitMethodDeclaration_getter_returnType', () { | |
| 3871 final __test = new ToSourceVisitorTest(); | |
| 3872 runJUnitTest(__test, __test.test_visitMethodDeclaration_getter_returnTyp
e); | |
| 3873 }); | |
| 3874 _ut.test('test_visitMethodDeclaration_getter_seturnType', () { | |
| 3875 final __test = new ToSourceVisitorTest(); | |
| 3876 runJUnitTest(__test, __test.test_visitMethodDeclaration_getter_seturnTyp
e); | |
| 3877 }); | |
| 3878 _ut.test('test_visitMethodDeclaration_minimal', () { | |
| 3879 final __test = new ToSourceVisitorTest(); | |
| 3880 runJUnitTest(__test, __test.test_visitMethodDeclaration_minimal); | |
| 3881 }); | |
| 3882 _ut.test('test_visitMethodDeclaration_multipleParameters', () { | |
| 3883 final __test = new ToSourceVisitorTest(); | |
| 3884 runJUnitTest(__test, __test.test_visitMethodDeclaration_multipleParamete
rs); | |
| 3885 }); | |
| 3886 _ut.test('test_visitMethodDeclaration_operator', () { | |
| 3887 final __test = new ToSourceVisitorTest(); | |
| 3888 runJUnitTest(__test, __test.test_visitMethodDeclaration_operator); | |
| 3889 }); | |
| 3890 _ut.test('test_visitMethodDeclaration_operator_returnType', () { | |
| 3891 final __test = new ToSourceVisitorTest(); | |
| 3892 runJUnitTest(__test, __test.test_visitMethodDeclaration_operator_returnT
ype); | |
| 3893 }); | |
| 3894 _ut.test('test_visitMethodDeclaration_returnType', () { | |
| 3895 final __test = new ToSourceVisitorTest(); | |
| 3896 runJUnitTest(__test, __test.test_visitMethodDeclaration_returnType); | |
| 3897 }); | |
| 3898 _ut.test('test_visitMethodDeclaration_setter', () { | |
| 3899 final __test = new ToSourceVisitorTest(); | |
| 3900 runJUnitTest(__test, __test.test_visitMethodDeclaration_setter); | |
| 3901 }); | |
| 3902 _ut.test('test_visitMethodDeclaration_static', () { | |
| 3903 final __test = new ToSourceVisitorTest(); | |
| 3904 runJUnitTest(__test, __test.test_visitMethodDeclaration_static); | |
| 3905 }); | |
| 3906 _ut.test('test_visitMethodDeclaration_static_returnType', () { | |
| 3907 final __test = new ToSourceVisitorTest(); | |
| 3908 runJUnitTest(__test, __test.test_visitMethodDeclaration_static_returnTyp
e); | |
| 3909 }); | |
| 3910 _ut.test('test_visitMethodDeclaration_withMetadata', () { | |
| 3911 final __test = new ToSourceVisitorTest(); | |
| 3912 runJUnitTest(__test, __test.test_visitMethodDeclaration_withMetadata); | |
| 3913 }); | |
| 3914 _ut.test('test_visitMethodInvocation_noTarget', () { | |
| 3915 final __test = new ToSourceVisitorTest(); | |
| 3916 runJUnitTest(__test, __test.test_visitMethodInvocation_noTarget); | |
| 3917 }); | |
| 3918 _ut.test('test_visitMethodInvocation_target', () { | |
| 3919 final __test = new ToSourceVisitorTest(); | |
| 3920 runJUnitTest(__test, __test.test_visitMethodInvocation_target); | |
| 3921 }); | |
| 3922 _ut.test('test_visitNamedExpression', () { | |
| 3923 final __test = new ToSourceVisitorTest(); | |
| 3924 runJUnitTest(__test, __test.test_visitNamedExpression); | |
| 3925 }); | |
| 3926 _ut.test('test_visitNamedFormalParameter', () { | |
| 3927 final __test = new ToSourceVisitorTest(); | |
| 3928 runJUnitTest(__test, __test.test_visitNamedFormalParameter); | |
| 3929 }); | |
| 3930 _ut.test('test_visitNativeClause', () { | |
| 3931 final __test = new ToSourceVisitorTest(); | |
| 3932 runJUnitTest(__test, __test.test_visitNativeClause); | |
| 3933 }); | |
| 3934 _ut.test('test_visitNativeFunctionBody', () { | |
| 3935 final __test = new ToSourceVisitorTest(); | |
| 3936 runJUnitTest(__test, __test.test_visitNativeFunctionBody); | |
| 3937 }); | |
| 3938 _ut.test('test_visitNullLiteral', () { | |
| 3939 final __test = new ToSourceVisitorTest(); | |
| 3940 runJUnitTest(__test, __test.test_visitNullLiteral); | |
| 3941 }); | |
| 3942 _ut.test('test_visitParenthesizedExpression', () { | |
| 3943 final __test = new ToSourceVisitorTest(); | |
| 3944 runJUnitTest(__test, __test.test_visitParenthesizedExpression); | |
| 3945 }); | |
| 3946 _ut.test('test_visitPartDirective', () { | |
| 3947 final __test = new ToSourceVisitorTest(); | |
| 3948 runJUnitTest(__test, __test.test_visitPartDirective); | |
| 3949 }); | |
| 3950 _ut.test('test_visitPartDirective_withMetadata', () { | |
| 3951 final __test = new ToSourceVisitorTest(); | |
| 3952 runJUnitTest(__test, __test.test_visitPartDirective_withMetadata); | |
| 3953 }); | |
| 3954 _ut.test('test_visitPartOfDirective', () { | |
| 3955 final __test = new ToSourceVisitorTest(); | |
| 3956 runJUnitTest(__test, __test.test_visitPartOfDirective); | |
| 3957 }); | |
| 3958 _ut.test('test_visitPartOfDirective_withMetadata', () { | |
| 3959 final __test = new ToSourceVisitorTest(); | |
| 3960 runJUnitTest(__test, __test.test_visitPartOfDirective_withMetadata); | |
| 3961 }); | |
| 3962 _ut.test('test_visitPositionalFormalParameter', () { | |
| 3963 final __test = new ToSourceVisitorTest(); | |
| 3964 runJUnitTest(__test, __test.test_visitPositionalFormalParameter); | |
| 3965 }); | |
| 3966 _ut.test('test_visitPostfixExpression', () { | |
| 3967 final __test = new ToSourceVisitorTest(); | |
| 3968 runJUnitTest(__test, __test.test_visitPostfixExpression); | |
| 3969 }); | |
| 3970 _ut.test('test_visitPrefixExpression', () { | |
| 3971 final __test = new ToSourceVisitorTest(); | |
| 3972 runJUnitTest(__test, __test.test_visitPrefixExpression); | |
| 3973 }); | |
| 3974 _ut.test('test_visitPrefixedIdentifier', () { | |
| 3975 final __test = new ToSourceVisitorTest(); | |
| 3976 runJUnitTest(__test, __test.test_visitPrefixedIdentifier); | |
| 3977 }); | |
| 3978 _ut.test('test_visitPropertyAccess', () { | |
| 3979 final __test = new ToSourceVisitorTest(); | |
| 3980 runJUnitTest(__test, __test.test_visitPropertyAccess); | |
| 3981 }); | |
| 3982 _ut.test('test_visitRedirectingConstructorInvocation_named', () { | |
| 3983 final __test = new ToSourceVisitorTest(); | |
| 3984 runJUnitTest(__test, __test.test_visitRedirectingConstructorInvocation_n
amed); | |
| 3985 }); | |
| 3986 _ut.test('test_visitRedirectingConstructorInvocation_unnamed', () { | |
| 3987 final __test = new ToSourceVisitorTest(); | |
| 3988 runJUnitTest(__test, __test.test_visitRedirectingConstructorInvocation_u
nnamed); | |
| 3989 }); | |
| 3990 _ut.test('test_visitRethrowExpression', () { | |
| 3991 final __test = new ToSourceVisitorTest(); | |
| 3992 runJUnitTest(__test, __test.test_visitRethrowExpression); | |
| 3993 }); | |
| 3994 _ut.test('test_visitReturnStatement_expression', () { | |
| 3995 final __test = new ToSourceVisitorTest(); | |
| 3996 runJUnitTest(__test, __test.test_visitReturnStatement_expression); | |
| 3997 }); | |
| 3998 _ut.test('test_visitReturnStatement_noExpression', () { | |
| 3999 final __test = new ToSourceVisitorTest(); | |
| 4000 runJUnitTest(__test, __test.test_visitReturnStatement_noExpression); | |
| 4001 }); | |
| 4002 _ut.test('test_visitScriptTag', () { | |
| 4003 final __test = new ToSourceVisitorTest(); | |
| 4004 runJUnitTest(__test, __test.test_visitScriptTag); | |
| 4005 }); | |
| 4006 _ut.test('test_visitSimpleFormalParameter_keyword', () { | |
| 4007 final __test = new ToSourceVisitorTest(); | |
| 4008 runJUnitTest(__test, __test.test_visitSimpleFormalParameter_keyword); | |
| 4009 }); | |
| 4010 _ut.test('test_visitSimpleFormalParameter_keyword_type', () { | |
| 4011 final __test = new ToSourceVisitorTest(); | |
| 4012 runJUnitTest(__test, __test.test_visitSimpleFormalParameter_keyword_type
); | |
| 4013 }); | |
| 4014 _ut.test('test_visitSimpleFormalParameter_type', () { | |
| 4015 final __test = new ToSourceVisitorTest(); | |
| 4016 runJUnitTest(__test, __test.test_visitSimpleFormalParameter_type); | |
| 4017 }); | |
| 4018 _ut.test('test_visitSimpleIdentifier', () { | |
| 4019 final __test = new ToSourceVisitorTest(); | |
| 4020 runJUnitTest(__test, __test.test_visitSimpleIdentifier); | |
| 4021 }); | |
| 4022 _ut.test('test_visitSimpleStringLiteral', () { | |
| 4023 final __test = new ToSourceVisitorTest(); | |
| 4024 runJUnitTest(__test, __test.test_visitSimpleStringLiteral); | |
| 4025 }); | |
| 4026 _ut.test('test_visitStringInterpolation', () { | |
| 4027 final __test = new ToSourceVisitorTest(); | |
| 4028 runJUnitTest(__test, __test.test_visitStringInterpolation); | |
| 4029 }); | |
| 4030 _ut.test('test_visitSuperConstructorInvocation', () { | |
| 4031 final __test = new ToSourceVisitorTest(); | |
| 4032 runJUnitTest(__test, __test.test_visitSuperConstructorInvocation); | |
| 4033 }); | |
| 4034 _ut.test('test_visitSuperConstructorInvocation_named', () { | |
| 4035 final __test = new ToSourceVisitorTest(); | |
| 4036 runJUnitTest(__test, __test.test_visitSuperConstructorInvocation_named); | |
| 4037 }); | |
| 4038 _ut.test('test_visitSuperExpression', () { | |
| 4039 final __test = new ToSourceVisitorTest(); | |
| 4040 runJUnitTest(__test, __test.test_visitSuperExpression); | |
| 4041 }); | |
| 4042 _ut.test('test_visitSwitchCase_multipleLabels', () { | |
| 4043 final __test = new ToSourceVisitorTest(); | |
| 4044 runJUnitTest(__test, __test.test_visitSwitchCase_multipleLabels); | |
| 4045 }); | |
| 4046 _ut.test('test_visitSwitchCase_multipleStatements', () { | |
| 4047 final __test = new ToSourceVisitorTest(); | |
| 4048 runJUnitTest(__test, __test.test_visitSwitchCase_multipleStatements); | |
| 4049 }); | |
| 4050 _ut.test('test_visitSwitchCase_noLabels', () { | |
| 4051 final __test = new ToSourceVisitorTest(); | |
| 4052 runJUnitTest(__test, __test.test_visitSwitchCase_noLabels); | |
| 4053 }); | |
| 4054 _ut.test('test_visitSwitchCase_singleLabel', () { | |
| 4055 final __test = new ToSourceVisitorTest(); | |
| 4056 runJUnitTest(__test, __test.test_visitSwitchCase_singleLabel); | |
| 4057 }); | |
| 4058 _ut.test('test_visitSwitchDefault_multipleLabels', () { | |
| 4059 final __test = new ToSourceVisitorTest(); | |
| 4060 runJUnitTest(__test, __test.test_visitSwitchDefault_multipleLabels); | |
| 4061 }); | |
| 4062 _ut.test('test_visitSwitchDefault_multipleStatements', () { | |
| 4063 final __test = new ToSourceVisitorTest(); | |
| 4064 runJUnitTest(__test, __test.test_visitSwitchDefault_multipleStatements); | |
| 4065 }); | |
| 4066 _ut.test('test_visitSwitchDefault_noLabels', () { | |
| 4067 final __test = new ToSourceVisitorTest(); | |
| 4068 runJUnitTest(__test, __test.test_visitSwitchDefault_noLabels); | |
| 4069 }); | |
| 4070 _ut.test('test_visitSwitchDefault_singleLabel', () { | |
| 4071 final __test = new ToSourceVisitorTest(); | |
| 4072 runJUnitTest(__test, __test.test_visitSwitchDefault_singleLabel); | |
| 4073 }); | |
| 4074 _ut.test('test_visitSwitchStatement', () { | |
| 4075 final __test = new ToSourceVisitorTest(); | |
| 4076 runJUnitTest(__test, __test.test_visitSwitchStatement); | |
| 4077 }); | |
| 4078 _ut.test('test_visitSymbolLiteral_multiple', () { | |
| 4079 final __test = new ToSourceVisitorTest(); | |
| 4080 runJUnitTest(__test, __test.test_visitSymbolLiteral_multiple); | |
| 4081 }); | |
| 4082 _ut.test('test_visitSymbolLiteral_single', () { | |
| 4083 final __test = new ToSourceVisitorTest(); | |
| 4084 runJUnitTest(__test, __test.test_visitSymbolLiteral_single); | |
| 4085 }); | |
| 4086 _ut.test('test_visitThisExpression', () { | |
| 4087 final __test = new ToSourceVisitorTest(); | |
| 4088 runJUnitTest(__test, __test.test_visitThisExpression); | |
| 4089 }); | |
| 4090 _ut.test('test_visitThrowStatement', () { | |
| 4091 final __test = new ToSourceVisitorTest(); | |
| 4092 runJUnitTest(__test, __test.test_visitThrowStatement); | |
| 4093 }); | |
| 4094 _ut.test('test_visitTopLevelVariableDeclaration_multiple', () { | |
| 4095 final __test = new ToSourceVisitorTest(); | |
| 4096 runJUnitTest(__test, __test.test_visitTopLevelVariableDeclaration_multip
le); | |
| 4097 }); | |
| 4098 _ut.test('test_visitTopLevelVariableDeclaration_single', () { | |
| 4099 final __test = new ToSourceVisitorTest(); | |
| 4100 runJUnitTest(__test, __test.test_visitTopLevelVariableDeclaration_single
); | |
| 4101 }); | |
| 4102 _ut.test('test_visitTryStatement_catch', () { | |
| 4103 final __test = new ToSourceVisitorTest(); | |
| 4104 runJUnitTest(__test, __test.test_visitTryStatement_catch); | |
| 4105 }); | |
| 4106 _ut.test('test_visitTryStatement_catchFinally', () { | |
| 4107 final __test = new ToSourceVisitorTest(); | |
| 4108 runJUnitTest(__test, __test.test_visitTryStatement_catchFinally); | |
| 4109 }); | |
| 4110 _ut.test('test_visitTryStatement_catches', () { | |
| 4111 final __test = new ToSourceVisitorTest(); | |
| 4112 runJUnitTest(__test, __test.test_visitTryStatement_catches); | |
| 4113 }); | |
| 4114 _ut.test('test_visitTryStatement_finally', () { | |
| 4115 final __test = new ToSourceVisitorTest(); | |
| 4116 runJUnitTest(__test, __test.test_visitTryStatement_finally); | |
| 4117 }); | |
| 4118 _ut.test('test_visitTypeArgumentList_multiple', () { | |
| 4119 final __test = new ToSourceVisitorTest(); | |
| 4120 runJUnitTest(__test, __test.test_visitTypeArgumentList_multiple); | |
| 4121 }); | |
| 4122 _ut.test('test_visitTypeArgumentList_single', () { | |
| 4123 final __test = new ToSourceVisitorTest(); | |
| 4124 runJUnitTest(__test, __test.test_visitTypeArgumentList_single); | |
| 4125 }); | |
| 4126 _ut.test('test_visitTypeName_multipleArgs', () { | |
| 4127 final __test = new ToSourceVisitorTest(); | |
| 4128 runJUnitTest(__test, __test.test_visitTypeName_multipleArgs); | |
| 4129 }); | |
| 4130 _ut.test('test_visitTypeName_nestedArg', () { | |
| 4131 final __test = new ToSourceVisitorTest(); | |
| 4132 runJUnitTest(__test, __test.test_visitTypeName_nestedArg); | |
| 4133 }); | |
| 4134 _ut.test('test_visitTypeName_noArgs', () { | |
| 4135 final __test = new ToSourceVisitorTest(); | |
| 4136 runJUnitTest(__test, __test.test_visitTypeName_noArgs); | |
| 4137 }); | |
| 4138 _ut.test('test_visitTypeName_singleArg', () { | |
| 4139 final __test = new ToSourceVisitorTest(); | |
| 4140 runJUnitTest(__test, __test.test_visitTypeName_singleArg); | |
| 4141 }); | |
| 4142 _ut.test('test_visitTypeParameterList_multiple', () { | |
| 4143 final __test = new ToSourceVisitorTest(); | |
| 4144 runJUnitTest(__test, __test.test_visitTypeParameterList_multiple); | |
| 4145 }); | |
| 4146 _ut.test('test_visitTypeParameterList_single', () { | |
| 4147 final __test = new ToSourceVisitorTest(); | |
| 4148 runJUnitTest(__test, __test.test_visitTypeParameterList_single); | |
| 4149 }); | |
| 4150 _ut.test('test_visitTypeParameter_withExtends', () { | |
| 4151 final __test = new ToSourceVisitorTest(); | |
| 4152 runJUnitTest(__test, __test.test_visitTypeParameter_withExtends); | |
| 4153 }); | |
| 4154 _ut.test('test_visitTypeParameter_withMetadata', () { | |
| 4155 final __test = new ToSourceVisitorTest(); | |
| 4156 runJUnitTest(__test, __test.test_visitTypeParameter_withMetadata); | |
| 4157 }); | |
| 4158 _ut.test('test_visitTypeParameter_withoutExtends', () { | |
| 4159 final __test = new ToSourceVisitorTest(); | |
| 4160 runJUnitTest(__test, __test.test_visitTypeParameter_withoutExtends); | |
| 4161 }); | |
| 4162 _ut.test('test_visitVariableDeclarationList_const_type', () { | |
| 4163 final __test = new ToSourceVisitorTest(); | |
| 4164 runJUnitTest(__test, __test.test_visitVariableDeclarationList_const_type
); | |
| 4165 }); | |
| 4166 _ut.test('test_visitVariableDeclarationList_final_noType', () { | |
| 4167 final __test = new ToSourceVisitorTest(); | |
| 4168 runJUnitTest(__test, __test.test_visitVariableDeclarationList_final_noTy
pe); | |
| 4169 }); | |
| 4170 _ut.test('test_visitVariableDeclarationList_final_withMetadata', () { | |
| 4171 final __test = new ToSourceVisitorTest(); | |
| 4172 runJUnitTest(__test, __test.test_visitVariableDeclarationList_final_with
Metadata); | |
| 4173 }); | |
| 4174 _ut.test('test_visitVariableDeclarationList_type', () { | |
| 4175 final __test = new ToSourceVisitorTest(); | |
| 4176 runJUnitTest(__test, __test.test_visitVariableDeclarationList_type); | |
| 4177 }); | |
| 4178 _ut.test('test_visitVariableDeclarationList_var', () { | |
| 4179 final __test = new ToSourceVisitorTest(); | |
| 4180 runJUnitTest(__test, __test.test_visitVariableDeclarationList_var); | |
| 4181 }); | |
| 4182 _ut.test('test_visitVariableDeclarationStatement', () { | |
| 4183 final __test = new ToSourceVisitorTest(); | |
| 4184 runJUnitTest(__test, __test.test_visitVariableDeclarationStatement); | |
| 4185 }); | |
| 4186 _ut.test('test_visitVariableDeclaration_initialized', () { | |
| 4187 final __test = new ToSourceVisitorTest(); | |
| 4188 runJUnitTest(__test, __test.test_visitVariableDeclaration_initialized); | |
| 4189 }); | |
| 4190 _ut.test('test_visitVariableDeclaration_uninitialized', () { | |
| 4191 final __test = new ToSourceVisitorTest(); | |
| 4192 runJUnitTest(__test, __test.test_visitVariableDeclaration_uninitialized)
; | |
| 4193 }); | |
| 4194 _ut.test('test_visitVariableDeclaration_withMetadata', () { | |
| 4195 final __test = new ToSourceVisitorTest(); | |
| 4196 runJUnitTest(__test, __test.test_visitVariableDeclaration_withMetadata); | |
| 4197 }); | |
| 4198 _ut.test('test_visitWhileStatement', () { | |
| 4199 final __test = new ToSourceVisitorTest(); | |
| 4200 runJUnitTest(__test, __test.test_visitWhileStatement); | |
| 4201 }); | |
| 4202 _ut.test('test_visitWithClause_multiple', () { | |
| 4203 final __test = new ToSourceVisitorTest(); | |
| 4204 runJUnitTest(__test, __test.test_visitWithClause_multiple); | |
| 4205 }); | |
| 4206 _ut.test('test_visitWithClause_single', () { | |
| 4207 final __test = new ToSourceVisitorTest(); | |
| 4208 runJUnitTest(__test, __test.test_visitWithClause_single); | |
| 4209 }); | |
| 4210 _ut.test('test_visitYieldStatement', () { | |
| 4211 final __test = new ToSourceVisitorTest(); | |
| 4212 runJUnitTest(__test, __test.test_visitYieldStatement); | |
| 4213 }); | |
| 4214 _ut.test('test_visitYieldStatement_each', () { | |
| 4215 final __test = new ToSourceVisitorTest(); | |
| 4216 runJUnitTest(__test, __test.test_visitYieldStatement_each); | |
| 4217 }); | |
| 4218 }); | |
| 4219 } | |
| 4220 } | 2548 } |
| 4221 | 2549 |
| 4222 class VariableDeclarationTest extends ParserTestCase { | 2550 class VariableDeclarationTest extends ParserTestCase { |
| 4223 void test_getDocumentationComment_onGrandParent() { | 2551 void test_getDocumentationComment_onGrandParent() { |
| 4224 VariableDeclaration varDecl = AstFactory.variableDeclaration("a"); | 2552 VariableDeclaration varDecl = AstFactory.variableDeclaration("a"); |
| 4225 TopLevelVariableDeclaration decl = AstFactory.topLevelVariableDeclaration2(K
eyword.VAR, [varDecl]); | 2553 TopLevelVariableDeclaration decl = AstFactory.topLevelVariableDeclaration2(K
eyword.VAR, [varDecl]); |
| 4226 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); | 2554 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); |
| 4227 JUnitTestCase.assertNull(varDecl.documentationComment); | 2555 JUnitTestCase.assertNull(varDecl.documentationComment); |
| 4228 decl.documentationComment = comment; | 2556 decl.documentationComment = comment; |
| 4229 JUnitTestCase.assertNotNull(varDecl.documentationComment); | 2557 JUnitTestCase.assertNotNull(varDecl.documentationComment); |
| 4230 JUnitTestCase.assertNotNull(decl.documentationComment); | 2558 JUnitTestCase.assertNotNull(decl.documentationComment); |
| 4231 } | 2559 } |
| 4232 | 2560 |
| 4233 void test_getDocumentationComment_onNode() { | 2561 void test_getDocumentationComment_onNode() { |
| 4234 VariableDeclaration decl = AstFactory.variableDeclaration("a"); | 2562 VariableDeclaration decl = AstFactory.variableDeclaration("a"); |
| 4235 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); | 2563 Comment comment = Comment.createDocumentationComment(new List<Token>(0)); |
| 4236 decl.documentationComment = comment; | 2564 decl.documentationComment = comment; |
| 4237 JUnitTestCase.assertNotNull(decl.documentationComment); | 2565 JUnitTestCase.assertNotNull(decl.documentationComment); |
| 4238 } | 2566 } |
| 4239 | |
| 4240 static dartSuite() { | |
| 4241 _ut.group('VariableDeclarationTest', () { | |
| 4242 _ut.test('test_getDocumentationComment_onGrandParent', () { | |
| 4243 final __test = new VariableDeclarationTest(); | |
| 4244 runJUnitTest(__test, __test.test_getDocumentationComment_onGrandParent); | |
| 4245 }); | |
| 4246 _ut.test('test_getDocumentationComment_onNode', () { | |
| 4247 final __test = new VariableDeclarationTest(); | |
| 4248 runJUnitTest(__test, __test.test_getDocumentationComment_onNode); | |
| 4249 }); | |
| 4250 }); | |
| 4251 } | |
| 4252 } | 2567 } |
| 4253 | 2568 |
| 4254 class WrapperKind extends Enum<WrapperKind> { | 2569 class WrapperKind extends Enum<WrapperKind> { |
| 4255 static const WrapperKind PREFIXED_LEFT = const WrapperKind('PREFIXED_LEFT', 0)
; | 2570 static const WrapperKind PREFIXED_LEFT = const WrapperKind('PREFIXED_LEFT', 0)
; |
| 4256 | 2571 |
| 4257 static const WrapperKind PREFIXED_RIGHT = const WrapperKind('PREFIXED_RIGHT',
1); | 2572 static const WrapperKind PREFIXED_RIGHT = const WrapperKind('PREFIXED_RIGHT',
1); |
| 4258 | 2573 |
| 4259 static const WrapperKind PROPERTY_LEFT = const WrapperKind('PROPERTY_LEFT', 2)
; | 2574 static const WrapperKind PROPERTY_LEFT = const WrapperKind('PROPERTY_LEFT', 2)
; |
| 4260 | 2575 |
| 4261 static const WrapperKind PROPERTY_RIGHT = const WrapperKind('PROPERTY_RIGHT',
3); | 2576 static const WrapperKind PROPERTY_RIGHT = const WrapperKind('PROPERTY_RIGHT',
3); |
| 4262 | 2577 |
| 4263 static const WrapperKind NONE = const WrapperKind('NONE', 4); | 2578 static const WrapperKind NONE = const WrapperKind('NONE', 4); |
| 4264 | 2579 |
| 4265 static const List<WrapperKind> values = const [ | 2580 static const List<WrapperKind> values = const [ |
| 4266 PREFIXED_LEFT, | 2581 PREFIXED_LEFT, |
| 4267 PREFIXED_RIGHT, | 2582 PREFIXED_RIGHT, |
| 4268 PROPERTY_LEFT, | 2583 PROPERTY_LEFT, |
| 4269 PROPERTY_RIGHT, | 2584 PROPERTY_RIGHT, |
| 4270 NONE]; | 2585 NONE]; |
| 4271 | 2586 |
| 4272 const WrapperKind(String name, int ordinal) : super(name, ordinal); | 2587 const WrapperKind(String name, int ordinal) : super(name, ordinal); |
| 4273 } | 2588 } |
| 4274 | 2589 |
| 4275 main() { | 2590 main() { |
| 4276 ConstantEvaluatorTest.dartSuite(); | 2591 _ut.groupSep = ' | '; |
| 4277 NodeLocatorTest.dartSuite(); | 2592 runReflectiveTests(ConstantEvaluatorTest); |
| 4278 ToSourceVisitorTest.dartSuite(); | 2593 runReflectiveTests(NodeLocatorTest); |
| 4279 BreadthFirstVisitorTest.dartSuite(); | 2594 runReflectiveTests(ToSourceVisitorTest); |
| 4280 ClassDeclarationTest.dartSuite(); | 2595 runReflectiveTests(BreadthFirstVisitorTest); |
| 4281 ClassTypeAliasTest.dartSuite(); | 2596 runReflectiveTests(ClassDeclarationTest); |
| 4282 IndexExpressionTest.dartSuite(); | 2597 runReflectiveTests(ClassTypeAliasTest); |
| 4283 NodeListTest.dartSuite(); | 2598 runReflectiveTests(IndexExpressionTest); |
| 4284 SimpleIdentifierTest.dartSuite(); | 2599 runReflectiveTests(NodeListTest); |
| 4285 SimpleStringLiteralTest.dartSuite(); | 2600 runReflectiveTests(SimpleIdentifierTest); |
| 4286 StringInterpolationTest.dartSuite(); | 2601 runReflectiveTests(SimpleStringLiteralTest); |
| 4287 VariableDeclarationTest.dartSuite(); | 2602 runReflectiveTests(StringInterpolationTest); |
| 2603 runReflectiveTests(VariableDeclarationTest); |
| 4288 } | 2604 } |
| OLD | NEW |