Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1475)

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 970913002: API clean-up (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sort ast.dart Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.utilities_test; 8 library engine.utilities_test;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 [ 352 [
353 AstFactory.fieldDeclaration2( 353 AstFactory.fieldDeclaration2(
354 false, 354 false,
355 Keyword.VAR, 355 Keyword.VAR,
356 [AstFactory.variableDeclaration("a")])])); 356 [AstFactory.variableDeclaration("a")])]));
357 } 357 }
358 358
359 void test_visitClassDeclaration_withMetadata() { 359 void test_visitClassDeclaration_withMetadata() {
360 ClassDeclaration declaration = 360 ClassDeclaration declaration =
361 AstFactory.classDeclaration(null, "C", null, null, null, null); 361 AstFactory.classDeclaration(null, "C", null, null, null, null);
362 declaration.metadata = 362 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
363 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
364 _assertClone(declaration); 363 _assertClone(declaration);
365 } 364 }
366 365
367 void test_visitClassTypeAlias_abstract() { 366 void test_visitClassTypeAlias_abstract() {
368 _assertClone( 367 _assertClone(
369 AstFactory.classTypeAlias( 368 AstFactory.classTypeAlias(
370 "C", 369 "C",
371 null, 370 null,
372 Keyword.ABSTRACT, 371 Keyword.ABSTRACT,
373 AstFactory.typeName4("S"), 372 AstFactory.typeName4("S"),
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 453 }
455 454
456 void test_visitClassTypeAlias_withMetadata() { 455 void test_visitClassTypeAlias_withMetadata() {
457 ClassTypeAlias declaration = AstFactory.classTypeAlias( 456 ClassTypeAlias declaration = AstFactory.classTypeAlias(
458 "C", 457 "C",
459 null, 458 null,
460 null, 459 null,
461 AstFactory.typeName4("S"), 460 AstFactory.typeName4("S"),
462 AstFactory.withClause([AstFactory.typeName4("M1")]), 461 AstFactory.withClause([AstFactory.typeName4("M1")]),
463 null); 462 null);
464 declaration.metadata = 463 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
465 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
466 _assertClone(declaration); 464 _assertClone(declaration);
467 } 465 }
468 466
469 void test_visitComment() { 467 void test_visitComment() {
470 _assertClone( 468 _assertClone(
471 Comment.createBlockComment( 469 Comment.createBlockComment(
472 <Token>[TokenFactory.tokenFromString("/* comment */")])); 470 <Token>[TokenFactory.tokenFromString("/* comment */")]));
473 } 471 }
474 472
475 void test_visitCommentReference() { 473 void test_visitCommentReference() {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 637
640 void test_visitConstructorDeclaration_withMetadata() { 638 void test_visitConstructorDeclaration_withMetadata() {
641 ConstructorDeclaration declaration = AstFactory.constructorDeclaration2( 639 ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
642 null, 640 null,
643 null, 641 null,
644 AstFactory.identifier3("C"), 642 AstFactory.identifier3("C"),
645 null, 643 null,
646 AstFactory.formalParameterList(), 644 AstFactory.formalParameterList(),
647 null, 645 null,
648 AstFactory.blockFunctionBody2()); 646 AstFactory.blockFunctionBody2());
649 declaration.metadata = 647 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
650 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
651 _assertClone(declaration); 648 _assertClone(declaration);
652 } 649 }
653 650
654 void test_visitConstructorFieldInitializer_withoutThis() { 651 void test_visitConstructorFieldInitializer_withoutThis() {
655 _assertClone( 652 _assertClone(
656 AstFactory.constructorFieldInitializer( 653 AstFactory.constructorFieldInitializer(
657 false, 654 false,
658 "a", 655 "a",
659 AstFactory.identifier3("b"))); 656 AstFactory.identifier3("b")));
660 } 657 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 AstFactory.showCombinator([AstFactory.identifier3("A")]), 743 AstFactory.showCombinator([AstFactory.identifier3("A")]),
747 AstFactory.hideCombinator([AstFactory.identifier3("B")])])); 744 AstFactory.hideCombinator([AstFactory.identifier3("B")])]));
748 } 745 }
749 746
750 void test_visitExportDirective_minimal() { 747 void test_visitExportDirective_minimal() {
751 _assertClone(AstFactory.exportDirective2("a.dart")); 748 _assertClone(AstFactory.exportDirective2("a.dart"));
752 } 749 }
753 750
754 void test_visitExportDirective_withMetadata() { 751 void test_visitExportDirective_withMetadata() {
755 ExportDirective directive = AstFactory.exportDirective2("a.dart"); 752 ExportDirective directive = AstFactory.exportDirective2("a.dart");
756 directive.metadata = 753 directive.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
757 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
758 _assertClone(directive); 754 _assertClone(directive);
759 } 755 }
760 756
761 void test_visitExpressionFunctionBody() { 757 void test_visitExpressionFunctionBody() {
762 _assertClone( 758 _assertClone(
763 AstFactory.expressionFunctionBody(AstFactory.identifier3("a"))); 759 AstFactory.expressionFunctionBody(AstFactory.identifier3("a")));
764 } 760 }
765 761
766 void test_visitExpressionStatement() { 762 void test_visitExpressionStatement() {
767 _assertClone(AstFactory.expressionStatement(AstFactory.identifier3("a"))); 763 _assertClone(AstFactory.expressionStatement(AstFactory.identifier3("a")));
(...skipping 17 matching lines...) Expand all
785 true, 781 true,
786 Keyword.VAR, 782 Keyword.VAR,
787 [AstFactory.variableDeclaration("a")])); 783 [AstFactory.variableDeclaration("a")]));
788 } 784 }
789 785
790 void test_visitFieldDeclaration_withMetadata() { 786 void test_visitFieldDeclaration_withMetadata() {
791 FieldDeclaration declaration = AstFactory.fieldDeclaration2( 787 FieldDeclaration declaration = AstFactory.fieldDeclaration2(
792 false, 788 false,
793 Keyword.VAR, 789 Keyword.VAR,
794 [AstFactory.variableDeclaration("a")]); 790 [AstFactory.variableDeclaration("a")]);
795 declaration.metadata = 791 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
796 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
797 _assertClone(declaration); 792 _assertClone(declaration);
798 } 793 }
799 794
800 void test_visitFieldFormalParameter_functionTyped() { 795 void test_visitFieldFormalParameter_functionTyped() {
801 _assertClone( 796 _assertClone(
802 AstFactory.fieldFormalParameter( 797 AstFactory.fieldFormalParameter(
803 null, 798 null,
804 AstFactory.typeName4("A"), 799 AstFactory.typeName4("A"),
805 "a", 800 "a",
806 AstFactory.formalParameterList([AstFactory.simpleFormalParameter3("b ")]))); 801 AstFactory.formalParameterList([AstFactory.simpleFormalParameter3("b ")])));
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 "f", 1137 "f",
1143 AstFactory.functionExpression())); 1138 AstFactory.functionExpression()));
1144 } 1139 }
1145 1140
1146 void test_visitFunctionDeclaration_withMetadata() { 1141 void test_visitFunctionDeclaration_withMetadata() {
1147 FunctionDeclaration declaration = AstFactory.functionDeclaration( 1142 FunctionDeclaration declaration = AstFactory.functionDeclaration(
1148 null, 1143 null,
1149 null, 1144 null,
1150 "f", 1145 "f",
1151 AstFactory.functionExpression()); 1146 AstFactory.functionExpression());
1152 declaration.metadata = 1147 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
1153 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1154 _assertClone(declaration); 1148 _assertClone(declaration);
1155 } 1149 }
1156 1150
1157 void test_visitFunctionDeclarationStatement() { 1151 void test_visitFunctionDeclarationStatement() {
1158 _assertClone( 1152 _assertClone(
1159 AstFactory.functionDeclarationStatement( 1153 AstFactory.functionDeclarationStatement(
1160 null, 1154 null,
1161 null, 1155 null,
1162 "f", 1156 "f",
1163 AstFactory.functionExpression())); 1157 AstFactory.functionExpression()));
(...skipping 25 matching lines...) Expand all
1189 null, 1183 null,
1190 AstFactory.formalParameterList())); 1184 AstFactory.formalParameterList()));
1191 } 1185 }
1192 1186
1193 void test_visitFunctionTypeAlias_withMetadata() { 1187 void test_visitFunctionTypeAlias_withMetadata() {
1194 FunctionTypeAlias declaration = AstFactory.typeAlias( 1188 FunctionTypeAlias declaration = AstFactory.typeAlias(
1195 AstFactory.typeName4("A"), 1189 AstFactory.typeName4("A"),
1196 "F", 1190 "F",
1197 null, 1191 null,
1198 AstFactory.formalParameterList()); 1192 AstFactory.formalParameterList());
1199 declaration.metadata = 1193 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
1200 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1201 _assertClone(declaration); 1194 _assertClone(declaration);
1202 } 1195 }
1203 1196
1204 void test_visitFunctionTypedFormalParameter_noType() { 1197 void test_visitFunctionTypedFormalParameter_noType() {
1205 _assertClone(AstFactory.functionTypedFormalParameter(null, "f")); 1198 _assertClone(AstFactory.functionTypedFormalParameter(null, "f"));
1206 } 1199 }
1207 1200
1208 void test_visitFunctionTypedFormalParameter_type() { 1201 void test_visitFunctionTypedFormalParameter_type() {
1209 _assertClone( 1202 _assertClone(
1210 AstFactory.functionTypedFormalParameter(AstFactory.typeName4("T"), "f")) ; 1203 AstFactory.functionTypedFormalParameter(AstFactory.typeName4("T"), "f")) ;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 AstFactory.importDirective3( 1265 AstFactory.importDirective3(
1273 "a.dart", 1266 "a.dart",
1274 "p", 1267 "p",
1275 [ 1268 [
1276 AstFactory.showCombinator([AstFactory.identifier3("A")]), 1269 AstFactory.showCombinator([AstFactory.identifier3("A")]),
1277 AstFactory.hideCombinator([AstFactory.identifier3("B")])])); 1270 AstFactory.hideCombinator([AstFactory.identifier3("B")])]));
1278 } 1271 }
1279 1272
1280 void test_visitImportDirective_withMetadata() { 1273 void test_visitImportDirective_withMetadata() {
1281 ImportDirective directive = AstFactory.importDirective3("a.dart", null); 1274 ImportDirective directive = AstFactory.importDirective3("a.dart", null);
1282 directive.metadata = 1275 directive.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
1283 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1284 _assertClone(directive); 1276 _assertClone(directive);
1285 } 1277 }
1286 1278
1287 void test_visitImportHideCombinator_multiple() { 1279 void test_visitImportHideCombinator_multiple() {
1288 _assertClone( 1280 _assertClone(
1289 AstFactory.hideCombinator( 1281 AstFactory.hideCombinator(
1290 [AstFactory.identifier3("a"), AstFactory.identifier3("b")])); 1282 [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
1291 } 1283 }
1292 1284
1293 void test_visitImportHideCombinator_single() { 1285 void test_visitImportHideCombinator_single() {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 [AstFactory.label2("a")], 1373 [AstFactory.label2("a")],
1382 AstFactory.returnStatement())); 1374 AstFactory.returnStatement()));
1383 } 1375 }
1384 1376
1385 void test_visitLibraryDirective() { 1377 void test_visitLibraryDirective() {
1386 _assertClone(AstFactory.libraryDirective2("l")); 1378 _assertClone(AstFactory.libraryDirective2("l"));
1387 } 1379 }
1388 1380
1389 void test_visitLibraryDirective_withMetadata() { 1381 void test_visitLibraryDirective_withMetadata() {
1390 LibraryDirective directive = AstFactory.libraryDirective2("l"); 1382 LibraryDirective directive = AstFactory.libraryDirective2("l");
1391 directive.metadata = 1383 directive.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
1392 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1393 _assertClone(directive); 1384 _assertClone(directive);
1394 } 1385 }
1395 1386
1396 void test_visitLibraryIdentifier_multiple() { 1387 void test_visitLibraryIdentifier_multiple() {
1397 _assertClone( 1388 _assertClone(
1398 AstFactory.libraryIdentifier( 1389 AstFactory.libraryIdentifier(
1399 [ 1390 [
1400 AstFactory.identifier3("a"), 1391 AstFactory.identifier3("a"),
1401 AstFactory.identifier3("b"), 1392 AstFactory.identifier3("b"),
1402 AstFactory.identifier3("c")])); 1393 AstFactory.identifier3("c")]));
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 1596
1606 void test_visitMethodDeclaration_withMetadata() { 1597 void test_visitMethodDeclaration_withMetadata() {
1607 MethodDeclaration declaration = AstFactory.methodDeclaration2( 1598 MethodDeclaration declaration = AstFactory.methodDeclaration2(
1608 null, 1599 null,
1609 null, 1600 null,
1610 null, 1601 null,
1611 null, 1602 null,
1612 AstFactory.identifier3("m"), 1603 AstFactory.identifier3("m"),
1613 AstFactory.formalParameterList(), 1604 AstFactory.formalParameterList(),
1614 AstFactory.blockFunctionBody2()); 1605 AstFactory.blockFunctionBody2());
1615 declaration.metadata = 1606 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
1616 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1617 _assertClone(declaration); 1607 _assertClone(declaration);
1618 } 1608 }
1619 1609
1620 void test_visitMethodInvocation_noTarget() { 1610 void test_visitMethodInvocation_noTarget() {
1621 _assertClone(AstFactory.methodInvocation2("m")); 1611 _assertClone(AstFactory.methodInvocation2("m"));
1622 } 1612 }
1623 1613
1624 void test_visitMethodInvocation_target() { 1614 void test_visitMethodInvocation_target() {
1625 _assertClone(AstFactory.methodInvocation(AstFactory.identifier3("t"), "m")); 1615 _assertClone(AstFactory.methodInvocation(AstFactory.identifier3("t"), "m"));
1626 } 1616 }
(...skipping 25 matching lines...) Expand all
1652 _assertClone( 1642 _assertClone(
1653 AstFactory.parenthesizedExpression(AstFactory.identifier3("a"))); 1643 AstFactory.parenthesizedExpression(AstFactory.identifier3("a")));
1654 } 1644 }
1655 1645
1656 void test_visitPartDirective() { 1646 void test_visitPartDirective() {
1657 _assertClone(AstFactory.partDirective2("a.dart")); 1647 _assertClone(AstFactory.partDirective2("a.dart"));
1658 } 1648 }
1659 1649
1660 void test_visitPartDirective_withMetadata() { 1650 void test_visitPartDirective_withMetadata() {
1661 PartDirective directive = AstFactory.partDirective2("a.dart"); 1651 PartDirective directive = AstFactory.partDirective2("a.dart");
1662 directive.metadata = 1652 directive.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
1663 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1664 _assertClone(directive); 1653 _assertClone(directive);
1665 } 1654 }
1666 1655
1667 void test_visitPartOfDirective() { 1656 void test_visitPartOfDirective() {
1668 _assertClone( 1657 _assertClone(
1669 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["l"]))); 1658 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["l"])));
1670 } 1659 }
1671 1660
1672 void test_visitPartOfDirective_withMetadata() { 1661 void test_visitPartOfDirective_withMetadata() {
1673 PartOfDirective directive = 1662 PartOfDirective directive =
1674 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["l"])); 1663 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["l"]));
1675 directive.metadata = 1664 directive.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
1676 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1677 _assertClone(directive); 1665 _assertClone(directive);
1678 } 1666 }
1679 1667
1680 void test_visitPositionalFormalParameter() { 1668 void test_visitPositionalFormalParameter() {
1681 _assertClone( 1669 _assertClone(
1682 AstFactory.positionalFormalParameter( 1670 AstFactory.positionalFormalParameter(
1683 AstFactory.simpleFormalParameter(Keyword.VAR, "a"), 1671 AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
1684 AstFactory.integer(0))); 1672 AstFactory.integer(0)));
1685 } 1673 }
1686 1674
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 void test_visitTypeName_singleArg() { 1909 void test_visitTypeName_singleArg() {
1922 _assertClone(AstFactory.typeName4("C", [AstFactory.typeName4("D")])); 1910 _assertClone(AstFactory.typeName4("C", [AstFactory.typeName4("D")]));
1923 } 1911 }
1924 1912
1925 void test_visitTypeParameter_withExtends() { 1913 void test_visitTypeParameter_withExtends() {
1926 _assertClone(AstFactory.typeParameter2("E", AstFactory.typeName4("C"))); 1914 _assertClone(AstFactory.typeParameter2("E", AstFactory.typeName4("C")));
1927 } 1915 }
1928 1916
1929 void test_visitTypeParameter_withMetadata() { 1917 void test_visitTypeParameter_withMetadata() {
1930 TypeParameter parameter = AstFactory.typeParameter("E"); 1918 TypeParameter parameter = AstFactory.typeParameter("E");
1931 parameter.metadata = 1919 parameter.metadata.add(AstFactory.annotation(AstFactory.identifier3("depreca ted")));
1932 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1933 _assertClone(parameter); 1920 _assertClone(parameter);
1934 } 1921 }
1935 1922
1936 void test_visitTypeParameter_withoutExtends() { 1923 void test_visitTypeParameter_withoutExtends() {
1937 _assertClone(AstFactory.typeParameter("E")); 1924 _assertClone(AstFactory.typeParameter("E"));
1938 } 1925 }
1939 1926
1940 void test_visitTypeParameterList_multiple() { 1927 void test_visitTypeParameterList_multiple() {
1941 _assertClone(AstFactory.typeParameterList(["E", "F"])); 1928 _assertClone(AstFactory.typeParameterList(["E", "F"]));
1942 } 1929 }
1943 1930
1944 void test_visitTypeParameterList_single() { 1931 void test_visitTypeParameterList_single() {
1945 _assertClone(AstFactory.typeParameterList(["E"])); 1932 _assertClone(AstFactory.typeParameterList(["E"]));
1946 } 1933 }
1947 1934
1948 void test_visitVariableDeclaration_initialized() { 1935 void test_visitVariableDeclaration_initialized() {
1949 _assertClone( 1936 _assertClone(
1950 AstFactory.variableDeclaration2("a", AstFactory.identifier3("b"))); 1937 AstFactory.variableDeclaration2("a", AstFactory.identifier3("b")));
1951 } 1938 }
1952 1939
1953 void test_visitVariableDeclaration_uninitialized() { 1940 void test_visitVariableDeclaration_uninitialized() {
1954 _assertClone(AstFactory.variableDeclaration("a")); 1941 _assertClone(AstFactory.variableDeclaration("a"));
1955 } 1942 }
1956 1943
1957 void test_visitVariableDeclaration_withMetadata() { 1944 void test_visitVariableDeclaration_withMetadata() {
1958 VariableDeclaration declaration = AstFactory.variableDeclaration("a"); 1945 VariableDeclaration declaration = AstFactory.variableDeclaration("a");
1959 declaration.metadata = 1946 declaration.metadata.add(AstFactory.annotation(AstFactory.identifier3("depre cated")));
1960 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1961 _assertClone(declaration); 1947 _assertClone(declaration);
1962 } 1948 }
1963 1949
1964 void test_visitVariableDeclarationList_const_type() { 1950 void test_visitVariableDeclarationList_const_type() {
1965 _assertClone( 1951 _assertClone(
1966 AstFactory.variableDeclarationList( 1952 AstFactory.variableDeclarationList(
1967 Keyword.CONST, 1953 Keyword.CONST,
1968 AstFactory.typeName4("C"), 1954 AstFactory.typeName4("C"),
1969 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")])); 1955 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")]));
1970 } 1956 }
1971 1957
1972 void test_visitVariableDeclarationList_final_noType() { 1958 void test_visitVariableDeclarationList_final_noType() {
1973 _assertClone( 1959 _assertClone(
1974 AstFactory.variableDeclarationList2( 1960 AstFactory.variableDeclarationList2(
1975 Keyword.FINAL, 1961 Keyword.FINAL,
1976 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")])); 1962 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")]));
1977 } 1963 }
1978 1964
1979 void test_visitVariableDeclarationList_final_withMetadata() { 1965 void test_visitVariableDeclarationList_final_withMetadata() {
1980 VariableDeclarationList declarationList = 1966 VariableDeclarationList declarationList =
1981 AstFactory.variableDeclarationList2( 1967 AstFactory.variableDeclarationList2(
1982 Keyword.FINAL, 1968 Keyword.FINAL,
1983 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")]); 1969 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")]);
1984 declarationList.metadata = 1970 declarationList.metadata.add(AstFactory.annotation(AstFactory.identifier3("d eprecated")));
1985 [AstFactory.annotation(AstFactory.identifier3("deprecated"))];
1986 _assertClone(declarationList); 1971 _assertClone(declarationList);
1987 } 1972 }
1988 1973
1989 void test_visitVariableDeclarationList_type() { 1974 void test_visitVariableDeclarationList_type() {
1990 _assertClone( 1975 _assertClone(
1991 AstFactory.variableDeclarationList( 1976 AstFactory.variableDeclarationList(
1992 null, 1977 null,
1993 AstFactory.typeName4("C"), 1978 AstFactory.typeName4("C"),
1994 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")])); 1979 [AstFactory.variableDeclaration("a"), AstFactory.variableDeclaration ("b")]));
1995 } 1980 }
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3827 AstFactory.extendsClause(AstFactory.typeName4("B")), 3812 AstFactory.extendsClause(AstFactory.typeName4("B")),
3828 AstFactory.withClause([AstFactory.typeName4("C")]), 3813 AstFactory.withClause([AstFactory.typeName4("C")]),
3829 AstFactory.implementsClause([AstFactory.typeName4("D")]), 3814 AstFactory.implementsClause([AstFactory.typeName4("D")]),
3830 [ 3815 [
3831 AstFactory.fieldDeclaration2( 3816 AstFactory.fieldDeclaration2(
3832 false, 3817 false,
3833 null, 3818 null,
3834 [AstFactory.variableDeclaration("f")])]); 3819 [AstFactory.variableDeclaration("f")])]);
3835 node.documentationComment = 3820 node.documentationComment =
3836 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 3821 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
3837 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 3822 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
3838 node.nativeClause = AstFactory.nativeClause(""); 3823 node.nativeClause = AstFactory.nativeClause("");
3839 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_6()); 3824 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_6());
3840 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_5()); 3825 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_5());
3841 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_4()); 3826 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_4());
3842 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_2()); 3827 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_2());
3843 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration()); 3828 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration());
3844 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_3()); 3829 _assertReplace(node, new Getter_NodeReplacerTest_test_classDeclaration_3());
3845 _assertReplace( 3830 _assertReplace(
3846 node, 3831 node,
3847 new ListGetter_NodeReplacerTest_test_classDeclaration(0)); 3832 new ListGetter_NodeReplacerTest_test_classDeclaration(0));
3848 _testAnnotatedNode(node); 3833 _testAnnotatedNode(node);
3849 } 3834 }
3850 3835
3851 void test_classTypeAlias() { 3836 void test_classTypeAlias() {
3852 ClassTypeAlias node = AstFactory.classTypeAlias( 3837 ClassTypeAlias node = AstFactory.classTypeAlias(
3853 "A", 3838 "A",
3854 AstFactory.typeParameterList(["E"]), 3839 AstFactory.typeParameterList(["E"]),
3855 null, 3840 null,
3856 AstFactory.typeName4("B"), 3841 AstFactory.typeName4("B"),
3857 AstFactory.withClause([AstFactory.typeName4("C")]), 3842 AstFactory.withClause([AstFactory.typeName4("C")]),
3858 AstFactory.implementsClause([AstFactory.typeName4("D")])); 3843 AstFactory.implementsClause([AstFactory.typeName4("D")]));
3859 node.documentationComment = 3844 node.documentationComment =
3860 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 3845 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
3861 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 3846 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
3862 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_4()); 3847 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_4());
3863 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_5()); 3848 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_5());
3864 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias()); 3849 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias());
3865 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_3()); 3850 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_3());
3866 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_2()); 3851 _assertReplace(node, new Getter_NodeReplacerTest_test_classTypeAlias_2());
3867 _testAnnotatedNode(node); 3852 _testAnnotatedNode(node);
3868 } 3853 }
3869 3854
3870 void test_comment() { 3855 void test_comment() {
3871 Comment node = Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 3856 Comment node = Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 ConstructorDeclaration node = AstFactory.constructorDeclaration2( 3902 ConstructorDeclaration node = AstFactory.constructorDeclaration2(
3918 null, 3903 null,
3919 null, 3904 null,
3920 AstFactory.identifier3("C"), 3905 AstFactory.identifier3("C"),
3921 "d", 3906 "d",
3922 AstFactory.formalParameterList(), 3907 AstFactory.formalParameterList(),
3923 [AstFactory.constructorFieldInitializer(false, "x", AstFactory.integer(0 ))], 3908 [AstFactory.constructorFieldInitializer(false, "x", AstFactory.integer(0 ))],
3924 AstFactory.emptyFunctionBody()); 3909 AstFactory.emptyFunctionBody());
3925 node.documentationComment = 3910 node.documentationComment =
3926 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 3911 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
3927 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 3912 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
3928 node.redirectedConstructor = 3913 node.redirectedConstructor =
3929 AstFactory.constructorName(AstFactory.typeName4("B"), "a"); 3914 AstFactory.constructorName(AstFactory.typeName4("B"), "a");
3930 _assertReplace( 3915 _assertReplace(
3931 node, 3916 node,
3932 new Getter_NodeReplacerTest_test_constructorDeclaration_3()); 3917 new Getter_NodeReplacerTest_test_constructorDeclaration_3());
3933 _assertReplace( 3918 _assertReplace(
3934 node, 3919 node,
3935 new Getter_NodeReplacerTest_test_constructorDeclaration_2()); 3920 new Getter_NodeReplacerTest_test_constructorDeclaration_2());
3936 _assertReplace( 3921 _assertReplace(
3937 node, 3922 node,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3969 void test_continueStatement() { 3954 void test_continueStatement() {
3970 ContinueStatement node = AstFactory.continueStatement("l"); 3955 ContinueStatement node = AstFactory.continueStatement("l");
3971 _assertReplace(node, new Getter_NodeReplacerTest_test_continueStatement()); 3956 _assertReplace(node, new Getter_NodeReplacerTest_test_continueStatement());
3972 } 3957 }
3973 3958
3974 void test_declaredIdentifier() { 3959 void test_declaredIdentifier() {
3975 DeclaredIdentifier node = 3960 DeclaredIdentifier node =
3976 AstFactory.declaredIdentifier4(AstFactory.typeName4("C"), "i"); 3961 AstFactory.declaredIdentifier4(AstFactory.typeName4("C"), "i");
3977 node.documentationComment = 3962 node.documentationComment =
3978 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 3963 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
3979 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 3964 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
3980 _assertReplace(node, new Getter_NodeReplacerTest_test_declaredIdentifier()); 3965 _assertReplace(node, new Getter_NodeReplacerTest_test_declaredIdentifier());
3981 _assertReplace( 3966 _assertReplace(
3982 node, 3967 node,
3983 new Getter_NodeReplacerTest_test_declaredIdentifier_2()); 3968 new Getter_NodeReplacerTest_test_declaredIdentifier_2());
3984 _testAnnotatedNode(node); 3969 _testAnnotatedNode(node);
3985 } 3970 }
3986 3971
3987 void test_defaultFormalParameter() { 3972 void test_defaultFormalParameter() {
3988 DefaultFormalParameter node = AstFactory.positionalFormalParameter( 3973 DefaultFormalParameter node = AstFactory.positionalFormalParameter(
3989 AstFactory.simpleFormalParameter3("p"), 3974 AstFactory.simpleFormalParameter3("p"),
(...skipping 21 matching lines...) Expand all
4011 _assertReplace( 3996 _assertReplace(
4012 node, 3997 node,
4013 new Getter_NodeReplacerTest_test_enumConstantDeclaration()); 3998 new Getter_NodeReplacerTest_test_enumConstantDeclaration());
4014 _testAnnotatedNode(node); 3999 _testAnnotatedNode(node);
4015 } 4000 }
4016 4001
4017 void test_enumDeclaration() { 4002 void test_enumDeclaration() {
4018 EnumDeclaration node = AstFactory.enumDeclaration2("E", ["ONE", "TWO"]); 4003 EnumDeclaration node = AstFactory.enumDeclaration2("E", ["ONE", "TWO"]);
4019 node.documentationComment = 4004 node.documentationComment =
4020 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4005 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4021 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4006 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4022 _assertReplace(node, new Getter_NodeReplacerTest_test_enumDeclaration()); 4007 _assertReplace(node, new Getter_NodeReplacerTest_test_enumDeclaration());
4023 _testAnnotatedNode(node); 4008 _testAnnotatedNode(node);
4024 } 4009 }
4025 4010
4026 void test_exportDirective() { 4011 void test_exportDirective() {
4027 ExportDirective node = 4012 ExportDirective node =
4028 AstFactory.exportDirective2("", [AstFactory.hideCombinator2(["C"])]); 4013 AstFactory.exportDirective2("", [AstFactory.hideCombinator2(["C"])]);
4029 node.documentationComment = 4014 node.documentationComment =
4030 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4015 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4031 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4016 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4032 _testNamespaceDirective(node); 4017 _testNamespaceDirective(node);
4033 } 4018 }
4034 4019
4035 void test_expressionFunctionBody() { 4020 void test_expressionFunctionBody() {
4036 ExpressionFunctionBody node = 4021 ExpressionFunctionBody node =
4037 AstFactory.expressionFunctionBody(AstFactory.integer(0)); 4022 AstFactory.expressionFunctionBody(AstFactory.integer(0));
4038 _assertReplace( 4023 _assertReplace(
4039 node, 4024 node,
4040 new Getter_NodeReplacerTest_test_expressionFunctionBody()); 4025 new Getter_NodeReplacerTest_test_expressionFunctionBody());
4041 } 4026 }
(...skipping 12 matching lines...) Expand all
4054 } 4039 }
4055 4040
4056 void test_fieldDeclaration() { 4041 void test_fieldDeclaration() {
4057 FieldDeclaration node = AstFactory.fieldDeclaration( 4042 FieldDeclaration node = AstFactory.fieldDeclaration(
4058 false, 4043 false,
4059 null, 4044 null,
4060 AstFactory.typeName4("C"), 4045 AstFactory.typeName4("C"),
4061 [AstFactory.variableDeclaration("c")]); 4046 [AstFactory.variableDeclaration("c")]);
4062 node.documentationComment = 4047 node.documentationComment =
4063 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4048 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4064 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4049 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4065 _assertReplace(node, new Getter_NodeReplacerTest_test_fieldDeclaration()); 4050 _assertReplace(node, new Getter_NodeReplacerTest_test_fieldDeclaration());
4066 _testAnnotatedNode(node); 4051 _testAnnotatedNode(node);
4067 } 4052 }
4068 4053
4069 void test_fieldFormalParameter() { 4054 void test_fieldFormalParameter() {
4070 FieldFormalParameter node = AstFactory.fieldFormalParameter( 4055 FieldFormalParameter node = AstFactory.fieldFormalParameter(
4071 null, 4056 null,
4072 AstFactory.typeName4("C"), 4057 AstFactory.typeName4("C"),
4073 "f", 4058 "f",
4074 AstFactory.formalParameterList()); 4059 AstFactory.formalParameterList());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
4169 void test_functionDeclaration() { 4154 void test_functionDeclaration() {
4170 FunctionDeclaration node = AstFactory.functionDeclaration( 4155 FunctionDeclaration node = AstFactory.functionDeclaration(
4171 AstFactory.typeName4("R"), 4156 AstFactory.typeName4("R"),
4172 null, 4157 null,
4173 "f", 4158 "f",
4174 AstFactory.functionExpression2( 4159 AstFactory.functionExpression2(
4175 AstFactory.formalParameterList(), 4160 AstFactory.formalParameterList(),
4176 AstFactory.blockFunctionBody(AstFactory.block()))); 4161 AstFactory.blockFunctionBody(AstFactory.block())));
4177 node.documentationComment = 4162 node.documentationComment =
4178 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4163 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4179 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4164 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4180 _assertReplace( 4165 _assertReplace(
4181 node, 4166 node,
4182 new Getter_NodeReplacerTest_test_functionDeclaration()); 4167 new Getter_NodeReplacerTest_test_functionDeclaration());
4183 _assertReplace( 4168 _assertReplace(
4184 node, 4169 node,
4185 new Getter_NodeReplacerTest_test_functionDeclaration_3()); 4170 new Getter_NodeReplacerTest_test_functionDeclaration_3());
4186 _assertReplace( 4171 _assertReplace(
4187 node, 4172 node,
4188 new Getter_NodeReplacerTest_test_functionDeclaration_2()); 4173 new Getter_NodeReplacerTest_test_functionDeclaration_2());
4189 _testAnnotatedNode(node); 4174 _testAnnotatedNode(node);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
4225 } 4210 }
4226 4211
4227 void test_functionTypeAlias() { 4212 void test_functionTypeAlias() {
4228 FunctionTypeAlias node = AstFactory.typeAlias( 4213 FunctionTypeAlias node = AstFactory.typeAlias(
4229 AstFactory.typeName4("R"), 4214 AstFactory.typeName4("R"),
4230 "F", 4215 "F",
4231 AstFactory.typeParameterList(["E"]), 4216 AstFactory.typeParameterList(["E"]),
4232 AstFactory.formalParameterList()); 4217 AstFactory.formalParameterList());
4233 node.documentationComment = 4218 node.documentationComment =
4234 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4219 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4235 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4220 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4236 _assertReplace( 4221 _assertReplace(
4237 node, 4222 node,
4238 new Getter_NodeReplacerTest_test_functionTypeAlias_3()); 4223 new Getter_NodeReplacerTest_test_functionTypeAlias_3());
4239 _assertReplace( 4224 _assertReplace(
4240 node, 4225 node,
4241 new Getter_NodeReplacerTest_test_functionTypeAlias_4()); 4226 new Getter_NodeReplacerTest_test_functionTypeAlias_4());
4242 _assertReplace(node, new Getter_NodeReplacerTest_test_functionTypeAlias()); 4227 _assertReplace(node, new Getter_NodeReplacerTest_test_functionTypeAlias());
4243 _assertReplace( 4228 _assertReplace(
4244 node, 4229 node,
4245 new Getter_NodeReplacerTest_test_functionTypeAlias_2()); 4230 new Getter_NodeReplacerTest_test_functionTypeAlias_2());
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 new ListGetter_NodeReplacerTest_test_implementsClause(0)); 4273 new ListGetter_NodeReplacerTest_test_implementsClause(0));
4289 } 4274 }
4290 4275
4291 void test_importDirective() { 4276 void test_importDirective() {
4292 ImportDirective node = AstFactory.importDirective3( 4277 ImportDirective node = AstFactory.importDirective3(
4293 "", 4278 "",
4294 "p", 4279 "p",
4295 [AstFactory.showCombinator2(["A"]), AstFactory.hideCombinator2(["B"])]); 4280 [AstFactory.showCombinator2(["A"]), AstFactory.hideCombinator2(["B"])]);
4296 node.documentationComment = 4281 node.documentationComment =
4297 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4282 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4298 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4283 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4299 _assertReplace(node, new Getter_NodeReplacerTest_test_importDirective()); 4284 _assertReplace(node, new Getter_NodeReplacerTest_test_importDirective());
4300 _testNamespaceDirective(node); 4285 _testNamespaceDirective(node);
4301 } 4286 }
4302 4287
4303 void test_indexExpression() { 4288 void test_indexExpression() {
4304 IndexExpression node = AstFactory.indexExpression( 4289 IndexExpression node = AstFactory.indexExpression(
4305 AstFactory.identifier3("a"), 4290 AstFactory.identifier3("a"),
4306 AstFactory.identifier3("i")); 4291 AstFactory.identifier3("i"));
4307 _assertReplace(node, new Getter_NodeReplacerTest_test_indexExpression()); 4292 _assertReplace(node, new Getter_NodeReplacerTest_test_indexExpression());
4308 _assertReplace(node, new Getter_NodeReplacerTest_test_indexExpression_2()); 4293 _assertReplace(node, new Getter_NodeReplacerTest_test_indexExpression_2());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 _assertReplace( 4334 _assertReplace(
4350 node, 4335 node,
4351 new ListGetter_NodeReplacerTest_test_labeledStatement(0)); 4336 new ListGetter_NodeReplacerTest_test_labeledStatement(0));
4352 _assertReplace(node, new Getter_NodeReplacerTest_test_labeledStatement()); 4337 _assertReplace(node, new Getter_NodeReplacerTest_test_labeledStatement());
4353 } 4338 }
4354 4339
4355 void test_libraryDirective() { 4340 void test_libraryDirective() {
4356 LibraryDirective node = AstFactory.libraryDirective2("lib"); 4341 LibraryDirective node = AstFactory.libraryDirective2("lib");
4357 node.documentationComment = 4342 node.documentationComment =
4358 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4343 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4359 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4344 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4360 _assertReplace(node, new Getter_NodeReplacerTest_test_libraryDirective()); 4345 _assertReplace(node, new Getter_NodeReplacerTest_test_libraryDirective());
4361 _testAnnotatedNode(node); 4346 _testAnnotatedNode(node);
4362 } 4347 }
4363 4348
4364 void test_libraryIdentifier() { 4349 void test_libraryIdentifier() {
4365 LibraryIdentifier node = AstFactory.libraryIdentifier2(["lib"]); 4350 LibraryIdentifier node = AstFactory.libraryIdentifier2(["lib"]);
4366 _assertReplace( 4351 _assertReplace(
4367 node, 4352 node,
4368 new ListGetter_NodeReplacerTest_test_libraryIdentifier(0)); 4353 new ListGetter_NodeReplacerTest_test_libraryIdentifier(0));
4369 } 4354 }
(...skipping 27 matching lines...) Expand all
4397 MethodDeclaration node = AstFactory.methodDeclaration2( 4382 MethodDeclaration node = AstFactory.methodDeclaration2(
4398 null, 4383 null,
4399 AstFactory.typeName4("A"), 4384 AstFactory.typeName4("A"),
4400 null, 4385 null,
4401 null, 4386 null,
4402 AstFactory.identifier3("m"), 4387 AstFactory.identifier3("m"),
4403 AstFactory.formalParameterList(), 4388 AstFactory.formalParameterList(),
4404 AstFactory.blockFunctionBody(AstFactory.block())); 4389 AstFactory.blockFunctionBody(AstFactory.block()));
4405 node.documentationComment = 4390 node.documentationComment =
4406 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4391 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4407 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4392 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4408 _assertReplace(node, new Getter_NodeReplacerTest_test_methodDeclaration()); 4393 _assertReplace(node, new Getter_NodeReplacerTest_test_methodDeclaration());
4409 _assertReplace( 4394 _assertReplace(
4410 node, 4395 node,
4411 new Getter_NodeReplacerTest_test_methodDeclaration_3()); 4396 new Getter_NodeReplacerTest_test_methodDeclaration_3());
4412 _assertReplace( 4397 _assertReplace(
4413 node, 4398 node,
4414 new Getter_NodeReplacerTest_test_methodDeclaration_4()); 4399 new Getter_NodeReplacerTest_test_methodDeclaration_4());
4415 _assertReplace( 4400 _assertReplace(
4416 node, 4401 node,
4417 new Getter_NodeReplacerTest_test_methodDeclaration_2()); 4402 new Getter_NodeReplacerTest_test_methodDeclaration_2());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 AstFactory.parenthesizedExpression(AstFactory.integer(0)); 4435 AstFactory.parenthesizedExpression(AstFactory.integer(0));
4451 _assertReplace( 4436 _assertReplace(
4452 node, 4437 node,
4453 new Getter_NodeReplacerTest_test_parenthesizedExpression()); 4438 new Getter_NodeReplacerTest_test_parenthesizedExpression());
4454 } 4439 }
4455 4440
4456 void test_partDirective() { 4441 void test_partDirective() {
4457 PartDirective node = AstFactory.partDirective2(""); 4442 PartDirective node = AstFactory.partDirective2("");
4458 node.documentationComment = 4443 node.documentationComment =
4459 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4444 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4460 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4445 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4461 _testUriBasedDirective(node); 4446 _testUriBasedDirective(node);
4462 } 4447 }
4463 4448
4464 void test_partOfDirective() { 4449 void test_partOfDirective() {
4465 PartOfDirective node = 4450 PartOfDirective node =
4466 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"])); 4451 AstFactory.partOfDirective(AstFactory.libraryIdentifier2(["lib"]));
4467 node.documentationComment = 4452 node.documentationComment =
4468 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4453 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4469 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4454 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4470 _assertReplace(node, new Getter_NodeReplacerTest_test_partOfDirective()); 4455 _assertReplace(node, new Getter_NodeReplacerTest_test_partOfDirective());
4471 _testAnnotatedNode(node); 4456 _testAnnotatedNode(node);
4472 } 4457 }
4473 4458
4474 void test_postfixExpression() { 4459 void test_postfixExpression() {
4475 PostfixExpression node = AstFactory.postfixExpression( 4460 PostfixExpression node = AstFactory.postfixExpression(
4476 AstFactory.identifier3("x"), 4461 AstFactory.identifier3("x"),
4477 TokenType.MINUS_MINUS); 4462 TokenType.MINUS_MINUS);
4478 _assertReplace(node, new Getter_NodeReplacerTest_test_postfixExpression()); 4463 _assertReplace(node, new Getter_NodeReplacerTest_test_postfixExpression());
4479 } 4464 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4589 _assertReplace(node, new Getter_NodeReplacerTest_test_throwExpression()); 4574 _assertReplace(node, new Getter_NodeReplacerTest_test_throwExpression());
4590 } 4575 }
4591 4576
4592 void test_topLevelVariableDeclaration() { 4577 void test_topLevelVariableDeclaration() {
4593 TopLevelVariableDeclaration node = AstFactory.topLevelVariableDeclaration( 4578 TopLevelVariableDeclaration node = AstFactory.topLevelVariableDeclaration(
4594 null, 4579 null,
4595 AstFactory.typeName4("T"), 4580 AstFactory.typeName4("T"),
4596 [AstFactory.variableDeclaration("t")]); 4581 [AstFactory.variableDeclaration("t")]);
4597 node.documentationComment = 4582 node.documentationComment =
4598 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4583 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4599 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4584 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4600 _assertReplace( 4585 _assertReplace(
4601 node, 4586 node,
4602 new Getter_NodeReplacerTest_test_topLevelVariableDeclaration()); 4587 new Getter_NodeReplacerTest_test_topLevelVariableDeclaration());
4603 _testAnnotatedNode(node); 4588 _testAnnotatedNode(node);
4604 } 4589 }
4605 4590
4606 void test_tryStatement() { 4591 void test_tryStatement() {
4607 TryStatement node = AstFactory.tryStatement3( 4592 TryStatement node = AstFactory.tryStatement3(
4608 AstFactory.block(), 4593 AstFactory.block(),
4609 [AstFactory.catchClause("e", [AstFactory.block()])], 4594 [AstFactory.catchClause("e", [AstFactory.block()])],
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
4641 _assertReplace( 4626 _assertReplace(
4642 node, 4627 node,
4643 new ListGetter_NodeReplacerTest_test_typeParameterList(0)); 4628 new ListGetter_NodeReplacerTest_test_typeParameterList(0));
4644 } 4629 }
4645 4630
4646 void test_variableDeclaration() { 4631 void test_variableDeclaration() {
4647 VariableDeclaration node = 4632 VariableDeclaration node =
4648 AstFactory.variableDeclaration2("a", AstFactory.nullLiteral()); 4633 AstFactory.variableDeclaration2("a", AstFactory.nullLiteral());
4649 node.documentationComment = 4634 node.documentationComment =
4650 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST); 4635 Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
4651 node.metadata = [AstFactory.annotation(AstFactory.identifier3("a"))]; 4636 node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
4652 _assertReplace( 4637 _assertReplace(
4653 node, 4638 node,
4654 new Getter_NodeReplacerTest_test_variableDeclaration()); 4639 new Getter_NodeReplacerTest_test_variableDeclaration());
4655 _assertReplace( 4640 _assertReplace(
4656 node, 4641 node,
4657 new Getter_NodeReplacerTest_test_variableDeclaration_2()); 4642 new Getter_NodeReplacerTest_test_variableDeclaration_2());
4658 _testAnnotatedNode(node); 4643 _testAnnotatedNode(node);
4659 } 4644 }
4660 4645
4661 void test_variableDeclarationList() { 4646 void test_variableDeclarationList() {
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 } 5226 }
5242 5227
5243 void test_get_added() { 5228 void test_get_added() {
5244 TokenMap tokenMap = new TokenMap(); 5229 TokenMap tokenMap = new TokenMap();
5245 Token key = TokenFactory.tokenFromType(TokenType.AT); 5230 Token key = TokenFactory.tokenFromType(TokenType.AT);
5246 Token value = TokenFactory.tokenFromType(TokenType.AT); 5231 Token value = TokenFactory.tokenFromType(TokenType.AT);
5247 tokenMap.put(key, value); 5232 tokenMap.put(key, value);
5248 expect(tokenMap.get(key), same(value)); 5233 expect(tokenMap.get(key), same(value));
5249 } 5234 }
5250 } 5235 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698