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

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

Issue 2399913002: Remove 'initializeTestEnvironment' from 'analyzer'. (Closed)
Patch Set: Created 4 years, 2 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/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
11 import 'package:analyzer/src/dart/ast/token.dart'; 11 import 'package:analyzer/src/dart/ast/token.dart';
12 import 'package:analyzer/src/dart/scanner/reader.dart'; 12 import 'package:analyzer/src/dart/scanner/reader.dart';
13 import 'package:analyzer/src/dart/scanner/scanner.dart'; 13 import 'package:analyzer/src/dart/scanner/scanner.dart';
14 import 'package:analyzer/src/generated/parser.dart'; 14 import 'package:analyzer/src/generated/parser.dart';
15 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 15 import 'package:analyzer/src/generated/testing/ast_factory.dart';
16 import 'package:analyzer/src/generated/testing/token_factory.dart'; 16 import 'package:analyzer/src/generated/testing/token_factory.dart';
17 import 'package:analyzer/src/generated/utilities_dart.dart'; 17 import 'package:analyzer/src/generated/utilities_dart.dart';
18 import 'package:test/test.dart'; 18 import 'package:test/test.dart';
19 import 'package:test_reflective_loader/test_reflective_loader.dart'; 19 import 'package:test_reflective_loader/test_reflective_loader.dart';
20 20
21 import '../utils.dart';
22 import 'test_support.dart'; 21 import 'test_support.dart';
23 22
24 main() { 23 main() {
25 initializeTestEnvironment();
26 defineReflectiveSuite(() { 24 defineReflectiveSuite(() {
27 defineReflectiveTests(ComplexParserTest); 25 defineReflectiveTests(ComplexParserTest);
28 defineReflectiveTests(ErrorParserTest); 26 defineReflectiveTests(ErrorParserTest);
29 defineReflectiveTests(NonErrorParserTest); 27 defineReflectiveTests(NonErrorParserTest);
30 defineReflectiveTests(RecoveryParserTest); 28 defineReflectiveTests(RecoveryParserTest);
31 defineReflectiveTests(SimpleParserTest); 29 defineReflectiveTests(SimpleParserTest);
32 }); 30 });
33 } 31 }
34 32
35 /** 33 /**
(...skipping 13408 matching lines...) Expand 10 before | Expand all | Expand 10 after
13444 CompilationUnit _parseDirectives(String source, 13442 CompilationUnit _parseDirectives(String source,
13445 [List<ErrorCode> errorCodes = ErrorCode.EMPTY_LIST]) { 13443 [List<ErrorCode> errorCodes = ErrorCode.EMPTY_LIST]) {
13446 createParser(source); 13444 createParser(source);
13447 CompilationUnit unit = parser.parseDirectives2(); 13445 CompilationUnit unit = parser.parseDirectives2();
13448 expect(unit, isNotNull); 13446 expect(unit, isNotNull);
13449 expect(unit.declarations, hasLength(0)); 13447 expect(unit.declarations, hasLength(0));
13450 listener.assertErrorsWithCodes(errorCodes); 13448 listener.assertErrorsWithCodes(errorCodes);
13451 return unit; 13449 return unit;
13452 } 13450 }
13453 } 13451 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/package_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698