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

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

Issue 3007033002: report const class as a more specific error code (Closed)
Patch Set: Created 3 years, 3 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
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/ast/token.dart' show TokenType; 7 import 'package:analyzer/dart/ast/token.dart' show TokenType;
8 import 'package:analyzer/error/error.dart'; 8 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/error/listener.dart' show ErrorReporter; 9 import 'package:analyzer/error/listener.dart' show ErrorReporter;
10 import 'package:analyzer/src/dart/scanner/scanner.dart'; 10 import 'package:analyzer/src/dart/scanner/scanner.dart';
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 @override 187 @override
188 @failingTest 188 @failingTest
189 void test_constAndVar() { 189 void test_constAndVar() {
190 // TODO(brianwilkerson) Does not recover. 190 // TODO(brianwilkerson) Does not recover.
191 super.test_constAndVar(); 191 super.test_constAndVar();
192 } 192 }
193 193
194 @override 194 @override
195 @failingTest 195 @failingTest
196 void test_constClass() {
197 // TODO(brianwilkerson) Wrong errors:
198 // Expected 1 errors of type ParserErrorCode.CONST_CLASS, found 0;
199 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7)
200
201 // TODO(danrubel): Rather than reporting ParserErrorCode.EXTRANEOUS_MODIFIER
202 // report ParserErrorCode.CONST_CLASS to better help the user
203 super.test_constClass();
204 }
205
206 @override
207 @failingTest
208 void test_constConstructorWithBody() { 196 void test_constConstructorWithBody() {
209 // TODO(brianwilkerson) Wrong errors: 197 // TODO(brianwilkerson) Wrong errors:
210 // Expected 1 errors of type ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, fo und 0 198 // Expected 1 errors of type ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, fo und 0
211 super.test_constConstructorWithBody(); 199 super.test_constConstructorWithBody();
212 } 200 }
213 201
214 @override 202 @override
215 @failingTest 203 @failingTest
216 void test_constFactory() { 204 void test_constFactory() {
217 // TODO(brianwilkerson) Wrong errors: 205 // TODO(brianwilkerson) Wrong errors:
(...skipping 4122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 @override 4328 @override
4341 @failingTest 4329 @failingTest
4342 void test_parseDirectives_mixed() { 4330 void test_parseDirectives_mixed() {
4343 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to 4331 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to
4344 // stop parsing as soon as the first non-directive is encountered; this is 4332 // stop parsing as soon as the first non-directive is encountered; this is
4345 // useful for quickly traversing an import graph. Consider adding a similar 4333 // useful for quickly traversing an import graph. Consider adding a similar
4346 // ability to Fasta's parser. 4334 // ability to Fasta's parser.
4347 super.test_parseDirectives_mixed(); 4335 super.test_parseDirectives_mixed();
4348 } 4336 }
4349 } 4337 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/front_end/lib/src/fasta/fasta_codes_generated.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698