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

Side by Side Diff: pkg/analyzer/test/generated/source_factory_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.test.generated.source_factory; 5 library analyzer.test.generated.test.generated.source_factory;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
11 import 'package:analyzer/source/package_map_resolver.dart'; 11 import 'package:analyzer/source/package_map_resolver.dart';
12 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine, Logger; 12 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine, Logger;
13 import 'package:analyzer/src/generated/java_engine_io.dart'; 13 import 'package:analyzer/src/generated/java_engine_io.dart';
14 import 'package:analyzer/src/generated/source.dart'; 14 import 'package:analyzer/src/generated/source.dart';
15 import 'package:analyzer/src/generated/source_io.dart'; 15 import 'package:analyzer/src/generated/source_io.dart';
16 import 'package:analyzer/src/generated/utilities_dart.dart' as utils; 16 import 'package:analyzer/src/generated/utilities_dart.dart' as utils;
17 import 'package:analyzer/src/source/source_resource.dart'; 17 import 'package:analyzer/src/source/source_resource.dart';
18 import 'package:package_config/packages.dart'; 18 import 'package:package_config/packages.dart';
19 import 'package:package_config/packages_file.dart' as pkgfile show parse; 19 import 'package:package_config/packages_file.dart' as pkgfile show parse;
20 import 'package:package_config/src/packages_impl.dart'; 20 import 'package:package_config/src/packages_impl.dart';
21 import 'package:path/path.dart'; 21 import 'package:path/path.dart';
22 import 'package:test/test.dart'; 22 import 'package:test/test.dart';
23 import 'package:test_reflective_loader/test_reflective_loader.dart'; 23 import 'package:test_reflective_loader/test_reflective_loader.dart';
24 24
25 import '../utils.dart';
26 import 'test_support.dart'; 25 import 'test_support.dart';
27 26
28 main() { 27 main() {
29 initializeTestEnvironment();
30 runPackageMapTests(); 28 runPackageMapTests();
31 defineReflectiveSuite(() { 29 defineReflectiveSuite(() {
32 defineReflectiveTests(SourceFactoryTest); 30 defineReflectiveTests(SourceFactoryTest);
33 }); 31 });
34 } 32 }
35 33
36 Source createSource({String path, String uri}) => 34 Source createSource({String path, String uri}) =>
37 //TODO(pquitslund): find some way to pass an actual URI into source creation 35 //TODO(pquitslund): find some way to pass an actual URI into source creation
38 new MemoryResourceProvider() 36 new MemoryResourceProvider()
39 .getFile(path) 37 .getFile(path)
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 UriResolver_SourceFactoryTest_test_fromEncoding_valid(this.encoding); 359 UriResolver_SourceFactoryTest_test_fromEncoding_valid(this.encoding);
362 360
363 @override 361 @override
364 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 362 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
365 if (uri.toString() == encoding) { 363 if (uri.toString() == encoding) {
366 return new TestSource(); 364 return new TestSource();
367 } 365 }
368 return null; 366 return null;
369 } 367 }
370 } 368 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/simple_resolver_test.dart ('k') | pkg/analyzer/test/generated/static_type_analyzer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698