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

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

Issue 2772943004: Remove trailing semicolons to make the tests pass with Fasta. (Closed)
Patch Set: Remove EOF expectation from Fasta unit test. Created 3 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
« no previous file with comments | « no previous file | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/ast/token.dart' as analyzer; 6 import 'package:analyzer/dart/ast/token.dart' as analyzer;
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/error/error.dart'; 8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/src/fasta/ast_builder.dart'; 9 import 'package:analyzer/src/fasta/ast_builder.dart';
10 import 'package:analyzer/src/fasta/element_store.dart'; 10 import 'package:analyzer/src/fasta/element_store.dart';
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 @override 127 @override
128 @failingTest 128 @failingTest
129 void test_assignableExpression_arguments_normal_chain_typeArguments() { 129 void test_assignableExpression_arguments_normal_chain_typeArguments() {
130 // TODO(paulberry,ahe): AstBuilder doesn't implement 130 // TODO(paulberry,ahe): AstBuilder doesn't implement
131 // endTypeArguments(). 131 // endTypeArguments().
132 super.test_assignableExpression_arguments_normal_chain_typeArguments(); 132 super.test_assignableExpression_arguments_normal_chain_typeArguments();
133 } 133 }
134 134
135 @override 135 @override
136 @failingTest 136 @failingTest
137 void test_cascade_withAssignment() {
138 // TODO(paulberry,ahe): AstBuilder doesn't implement
139 // endConstructorReference().
140 super.test_cascade_withAssignment();
141 }
142
143 @override
144 @failingTest
145 void test_conditionalExpression_precedence_nullableType_as() { 137 void test_conditionalExpression_precedence_nullableType_as() {
146 // TODO(paulberry,ahe): Fasta doesn't support NNBD syntax yet. 138 // TODO(paulberry,ahe): Fasta doesn't support NNBD syntax yet.
147 super.test_conditionalExpression_precedence_nullableType_as(); 139 super.test_conditionalExpression_precedence_nullableType_as();
148 } 140 }
149 141
150 @override 142 @override
151 @failingTest 143 @failingTest
152 void test_conditionalExpression_precedence_nullableType_is() { 144 void test_conditionalExpression_precedence_nullableType_is() {
153 // TODO(paulberry,ahe): Fasta doesn't support NNBD syntax yet. 145 // TODO(paulberry,ahe): Fasta doesn't support NNBD syntax yet.
154 super.test_conditionalExpression_precedence_nullableType_is(); 146 super.test_conditionalExpression_precedence_nullableType_is();
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 var initializers = _run((parser) => parser.parseInitializers) as List; 1009 var initializers = _run((parser) => parser.parseInitializers) as List;
1018 return initializers[0] as ConstructorFieldInitializer; 1010 return initializers[0] as ConstructorFieldInitializer;
1019 } 1011 }
1020 1012
1021 /** 1013 /**
1022 * Runs a single parser function, and returns the result as an analyzer AST. 1014 * Runs a single parser function, and returns the result as an analyzer AST.
1023 */ 1015 */
1024 Object _run(ParseFunction getParseFunction(fasta.Parser parser)) { 1016 Object _run(ParseFunction getParseFunction(fasta.Parser parser)) {
1025 var parseFunction = getParseFunction(_fastaParser); 1017 var parseFunction = getParseFunction(_fastaParser);
1026 _currentFastaToken = parseFunction(_currentFastaToken); 1018 _currentFastaToken = parseFunction(_currentFastaToken);
1027 expect(_currentFastaToken.isEof, isTrue);
1028 expect(_astBuilder.stack, hasLength(1)); 1019 expect(_astBuilder.stack, hasLength(1));
1029 return _astBuilder.pop(); 1020 return _astBuilder.pop();
1030 } 1021 }
1031 } 1022 }
1032 1023
1033 /** 1024 /**
1034 * Proxy implementation of [Scope] used by Fasta parser tests. 1025 * Proxy implementation of [Scope] used by Fasta parser tests.
1035 * 1026 *
1036 * Any name lookup request is satisfied by creating an instance of 1027 * Any name lookup request is satisfied by creating an instance of
1037 * [BuilderProxy]. 1028 * [BuilderProxy].
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1085
1095 @override 1086 @override
1096 @failingTest 1087 @failingTest
1097 void test_parseFunctionDeclarationStatement_typeParameterComments() { 1088 void test_parseFunctionDeclarationStatement_typeParameterComments() {
1098 // TODO(scheglov): Fasta doesn't support generic comment syntax. 1089 // TODO(scheglov): Fasta doesn't support generic comment syntax.
1099 super.test_parseFunctionDeclarationStatement_typeParameterComments(); 1090 super.test_parseFunctionDeclarationStatement_typeParameterComments();
1100 } 1091 }
1101 1092
1102 @override 1093 @override
1103 @failingTest 1094 @failingTest
1104 void test_parseNonLabeledStatement_functionDeclaration() {
1105 super.test_parseNonLabeledStatement_functionDeclaration();
1106 }
1107
1108 @override
1109 @failingTest
1110 void test_parseNonLabeledStatement_functionDeclaration_arguments() {
1111 super.test_parseNonLabeledStatement_functionDeclaration_arguments();
1112 }
1113
1114 @override
1115 @failingTest
1116 void test_parseStatement_emptyTypeArgumentList() { 1095 void test_parseStatement_emptyTypeArgumentList() {
1117 super.test_parseStatement_emptyTypeArgumentList(); 1096 super.test_parseStatement_emptyTypeArgumentList();
1118 } 1097 }
1119 1098
1120 @override 1099 @override
1121 @failingTest 1100 @failingTest
1122 void 1101 void
1123 test_parseStatement_functionDeclaration_noReturnType_typeParameterComments () { 1102 test_parseStatement_functionDeclaration_noReturnType_typeParameterComments () {
1124 super 1103 super
1125 .test_parseStatement_functionDeclaration_noReturnType_typeParameterComme nts(); 1104 .test_parseStatement_functionDeclaration_noReturnType_typeParameterComme nts();
1126 } 1105 }
1127 1106
1128 @override 1107 @override
1129 @failingTest 1108 @failingTest
1130 void test_parseStatement_functionDeclaration_noReturnType_typeParameters() {
1131 super.test_parseStatement_functionDeclaration_noReturnType_typeParameters();
1132 }
1133
1134 @override
1135 @failingTest
1136 void test_parseStatement_functionDeclaration_returnType() {
1137 super.test_parseStatement_functionDeclaration_returnType();
1138 }
1139
1140 @override
1141 @failingTest
1142 void test_parseStatement_functionDeclaration_returnType_typeParameters() {
1143 super.test_parseStatement_functionDeclaration_returnType_typeParameters();
1144 }
1145
1146 @override
1147 @failingTest
1148 void test_parseTryStatement_catch_finally() { 1109 void test_parseTryStatement_catch_finally() {
1149 super.test_parseTryStatement_catch_finally(); 1110 super.test_parseTryStatement_catch_finally();
1150 } 1111 }
1151 1112
1152 @override 1113 @override
1153 @failingTest 1114 @failingTest
1154 void test_parseTryStatement_on_catch() { 1115 void test_parseTryStatement_on_catch() {
1155 super.test_parseTryStatement_on_catch(); 1116 super.test_parseTryStatement_on_catch();
1156 } 1117 }
1157 1118
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 } 1195 }
1235 1196
1236 @override 1197 @override
1237 @failingTest 1198 @failingTest
1238 void test_parsePartOfDirective_uri() { 1199 void test_parsePartOfDirective_uri() {
1239 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by 1200 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by
1240 // Fasta. 1201 // Fasta.
1241 super.test_parsePartOfDirective_uri(); 1202 super.test_parsePartOfDirective_uri();
1242 } 1203 }
1243 } 1204 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698