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

Side by Side Diff: pkg/analyzer/test/src/dart/ast/utilities_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.src.dart.ast.utilities_test; 5 library analyzer.test.src.dart.ast.utilities_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/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
11 import 'package:analyzer/src/dart/ast/utilities.dart'; 11 import 'package:analyzer/src/dart/ast/utilities.dart';
12 import 'package:analyzer/src/dart/element/element.dart'; 12 import 'package:analyzer/src/dart/element/element.dart';
13 import 'package:analyzer/src/generated/java_core.dart'; 13 import 'package:analyzer/src/generated/java_core.dart';
14 import 'package:analyzer/src/generated/java_engine.dart' show Predicate; 14 import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
15 import 'package:analyzer/src/generated/java_engine.dart'; 15 import 'package:analyzer/src/generated/java_engine.dart';
16 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 16 import 'package:analyzer/src/generated/testing/ast_factory.dart';
17 import 'package:analyzer/src/generated/testing/element_factory.dart'; 17 import 'package:analyzer/src/generated/testing/element_factory.dart';
18 import 'package:analyzer/src/generated/testing/token_factory.dart'; 18 import 'package:analyzer/src/generated/testing/token_factory.dart';
19 import 'package:test/test.dart'; 19 import 'package:test/test.dart';
20 import 'package:test_reflective_loader/test_reflective_loader.dart'; 20 import 'package:test_reflective_loader/test_reflective_loader.dart';
21 21
22 import '../../../generated/parser_test.dart' show ParserTestCase; 22 import '../../../generated/parser_test.dart' show ParserTestCase;
23 import '../../../generated/test_support.dart'; 23 import '../../../generated/test_support.dart';
24 import '../../../utils.dart';
25 24
26 main() { 25 main() {
27 initializeTestEnvironment();
28 defineReflectiveSuite(() { 26 defineReflectiveSuite(() {
29 defineReflectiveTests(ConstantEvaluatorTest); 27 defineReflectiveTests(ConstantEvaluatorTest);
30 defineReflectiveTests(NodeLocatorTest); 28 defineReflectiveTests(NodeLocatorTest);
31 defineReflectiveTests(NodeLocator2Test); 29 defineReflectiveTests(NodeLocator2Test);
32 defineReflectiveTests(ResolutionCopierTest); 30 defineReflectiveTests(ResolutionCopierTest);
33 defineReflectiveTests(ToSourceVisitorTest); 31 defineReflectiveTests(ToSourceVisitorTest);
34 }); 32 });
35 } 33 }
36 34
37 @reflectiveTest 35 @reflectiveTest
(...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 * @param expectedSource the source string that the visitor is expected to pro duce 3339 * @param expectedSource the source string that the visitor is expected to pro duce
3342 * @param node the AST node being visited to produce the actual source 3340 * @param node the AST node being visited to produce the actual source
3343 * @throws AFE if the visitor does not produce the expected source for the giv en node 3341 * @throws AFE if the visitor does not produce the expected source for the giv en node
3344 */ 3342 */
3345 void _assertSource(String expectedSource, AstNode node) { 3343 void _assertSource(String expectedSource, AstNode node) {
3346 PrintStringWriter writer = new PrintStringWriter(); 3344 PrintStringWriter writer = new PrintStringWriter();
3347 node.accept(new ToSourceVisitor(writer)); 3345 node.accept(new ToSourceVisitor(writer));
3348 expect(writer.toString(), expectedSource); 3346 expect(writer.toString(), expectedSource);
3349 } 3347 }
3350 } 3348 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/dart/ast/test_all.dart ('k') | pkg/analyzer/test/src/dart/constant/evaluation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698