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

Side by Side Diff: tests/compiler/dart2js/mirrors/mirrors_test_helper.dart

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 'dart:io'; 5 import 'dart:io';
6 import 'dart:async'; 6 import 'dart:async';
7 7
8 import 'package:compiler/implementation/mirrors/source_mirrors.dart'; 8 import 'package:compiler/src/mirrors/source_mirrors.dart';
9 import 'package:compiler/implementation/mirrors/analyze.dart' as source_mirrors; 9 import 'package:compiler/src/mirrors/analyze.dart' as source_mirrors;
10 import 'package:compiler/implementation/source_file_provider.dart'; 10 import 'package:compiler/src/source_file_provider.dart';
11 11
12 TypeMirror createInstantiation(TypeSourceMirror type, 12 TypeMirror createInstantiation(TypeSourceMirror type,
13 List<TypeMirror> typeArguments) { 13 List<TypeMirror> typeArguments) {
14 return type.createInstantiation(typeArguments); 14 return type.createInstantiation(typeArguments);
15 } 15 }
16 16
17 Future<MirrorSystem> analyze(String test) { 17 Future<MirrorSystem> analyze(String test) {
18 Uri repository = Platform.script.resolve('../../../../'); 18 Uri repository = Platform.script.resolve('../../../../');
19 Uri testUri = repository.resolve('tests/lib/mirrors/$test'); 19 Uri testUri = repository.resolve('tests/lib/mirrors/$test');
20 return analyzeUri(testUri); 20 return analyzeUri(testUri);
21 } 21 }
22 22
23 23
24 Future<MirrorSystem> analyzeUri(Uri testUri) { 24 Future<MirrorSystem> analyzeUri(Uri testUri) {
25 Uri repository = Platform.script.resolve('../../../../'); 25 Uri repository = Platform.script.resolve('../../../../');
26 Uri libraryRoot = repository.resolve('sdk/'); 26 Uri libraryRoot = repository.resolve('sdk/');
27 Uri packageRoot = Uri.base.resolveUri( 27 Uri packageRoot = Uri.base.resolveUri(
28 new Uri.file('${Platform.packageRoot}/')); 28 new Uri.file('${Platform.packageRoot}/'));
29 var provider = new CompilerSourceFileProvider(); 29 var provider = new CompilerSourceFileProvider();
30 var handler = new FormattingDiagnosticHandler(provider); 30 var handler = new FormattingDiagnosticHandler(provider);
31 return source_mirrors.analyze( 31 return source_mirrors.analyze(
32 [testUri], 32 [testUri],
33 libraryRoot, 33 libraryRoot,
34 packageRoot, 34 packageRoot,
35 provider, 35 provider,
36 handler); 36 handler);
37 } 37 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors/mirrors_reader_test.dart ('k') | tests/compiler/dart2js/mirrors_exports_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698