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

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

Issue 2265793002: Code clean-up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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) 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 library analyzer.test.generated.parser_test; 5 library analyzer.test.generated.parser_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/src/dart/ast/token.dart'; 10 import 'package:analyzer/src/dart/ast/token.dart';
(...skipping 11 matching lines...) Expand all
22 import 'package:unittest/unittest.dart' hide Configuration; 22 import 'package:unittest/unittest.dart' hide Configuration;
23 23
24 import '../reflective_tests.dart'; 24 import '../reflective_tests.dart';
25 import '../utils.dart'; 25 import '../utils.dart';
26 import 'test_support.dart'; 26 import 'test_support.dart';
27 27
28 main() { 28 main() {
29 initializeTestEnvironment(); 29 initializeTestEnvironment();
30 runReflectiveTests(ComplexParserTest); 30 runReflectiveTests(ComplexParserTest);
31 runReflectiveTests(ErrorParserTest); 31 runReflectiveTests(ErrorParserTest);
32 // ignore: deprecated_member_use
32 runReflectiveTests(IncrementalParserTest); 33 runReflectiveTests(IncrementalParserTest);
33 runReflectiveTests(NonErrorParserTest); 34 runReflectiveTests(NonErrorParserTest);
34 runReflectiveTests(RecoveryParserTest); 35 runReflectiveTests(RecoveryParserTest);
35 runReflectiveTests(SimpleParserTest); 36 runReflectiveTests(SimpleParserTest);
36 } 37 }
37 38
38 class AnalysisErrorListener_SimpleParserTest_computeStringValue 39 class AnalysisErrorListener_SimpleParserTest_computeStringValue
39 implements AnalysisErrorListener { 40 implements AnalysisErrorListener {
40 @override 41 @override
41 void onError(AnalysisError event) { 42 void onError(AnalysisError event) {
(...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 parse4("parseFormalParameterList", "(a, {b, c])", 2360 parse4("parseFormalParameterList", "(a, {b, c])",
2360 [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]); 2361 [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
2361 } 2362 }
2362 2363
2363 void test_wrongTerminatorForParameterGroup_optional() { 2364 void test_wrongTerminatorForParameterGroup_optional() {
2364 parse4("parseFormalParameterList", "(a, [b, c})", 2365 parse4("parseFormalParameterList", "(a, [b, c})",
2365 [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]); 2366 [ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP]);
2366 } 2367 }
2367 } 2368 }
2368 2369
2370 @deprecated
2369 @reflectiveTest 2371 @reflectiveTest
2370 class IncrementalParserTest extends EngineTestCase { 2372 class IncrementalParserTest extends EngineTestCase {
2371 void fail_replace_identifier_with_functionLiteral_in_initializer_interp() { 2373 void fail_replace_identifier_with_functionLiteral_in_initializer_interp() {
2372 // TODO(paulberry, brianwilkerson): broken due to incremental scanning bugs 2374 // TODO(paulberry, brianwilkerson): broken due to incremental scanning bugs
2373 2375
2374 // Function literals are allowed inside interpolation expressions in 2376 // Function literals are allowed inside interpolation expressions in
2375 // initializers. 2377 // initializers.
2376 // 2378 //
2377 // 'class A { var a; A(b) : a = "${b}";' 2379 // 'class A { var a; A(b) : a = "${b}";'
2378 // 'class A { var a; A(b) : a = "${() {}}";' 2380 // 'class A { var a; A(b) : a = "${() {}}";'
(...skipping 8949 matching lines...) Expand 10 before | Expand all | Expand 10 after
11328 new Scanner(null, new CharSequenceReader(source), listener); 11330 new Scanner(null, new CharSequenceReader(source), listener);
11329 Token tokenStream = scanner.tokenize(); 11331 Token tokenStream = scanner.tokenize();
11330 // 11332 //
11331 // Parse the source. 11333 // Parse the source.
11332 // 11334 //
11333 Parser parser = new Parser(null, listener); 11335 Parser parser = new Parser(null, listener);
11334 return invokeParserMethodImpl( 11336 return invokeParserMethodImpl(
11335 parser, methodName, <Object>[tokenStream], tokenStream) as Token; 11337 parser, methodName, <Object>[tokenStream], tokenStream) as Token;
11336 } 11338 }
11337 } 11339 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/incremental_scanner_test.dart ('k') | pkg/analyzer/test/generated/source_factory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698