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

Side by Side Diff: tests/utils/source_mirrors_test.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
« no previous file with comments | « tests/utils/dart2js_test.dart ('k') | tools/create_sdk.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // VMOptions= 4 // VMOptions=
5 // VMOptions=--print-object-histogram 5 // VMOptions=--print-object-histogram
6 6
7 // Smoke test of the dart2js compiler API. 7 // Smoke test of the dart2js compiler API.
8 library source_mirrors_test; 8 library source_mirrors_test;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import "package:async_helper/async_helper.dart"; 11 import "package:async_helper/async_helper.dart";
12 12
13 import 'package:compiler/implementation/mirrors/analyze.dart'; 13 import 'package:compiler/src/mirrors/analyze.dart';
14 import 'dummy_compiler_test.dart'; 14 import 'dummy_compiler_test.dart';
15 15
16 main() { 16 main() {
17 asyncStart(); 17 asyncStart();
18 Future result = 18 Future result =
19 analyze([new Uri(scheme: 'main')], 19 analyze([new Uri(scheme: 'main')],
20 new Uri(scheme: 'lib', path: '/'), 20 new Uri(scheme: 'lib', path: '/'),
21 new Uri(scheme: 'package', path: '/'), 21 new Uri(scheme: 'package', path: '/'),
22 provider, handler); 22 provider, handler);
23 result.then((mirrorSystem) { 23 result.then((mirrorSystem) {
24 if (mirrorSystem == null) { 24 if (mirrorSystem == null) {
25 throw 'Analysis failed'; 25 throw 'Analysis failed';
26 } 26 }
27 mirrorSystem.libraries.forEach((uri, library) { 27 mirrorSystem.libraries.forEach((uri, library) {
28 print(library); 28 print(library);
29 library.declarations.forEach((name, declaration) { 29 library.declarations.forEach((name, declaration) {
30 print(' $name:$declaration'); 30 print(' $name:$declaration');
31 }); 31 });
32 }); 32 });
33 }, onError: (e, s) { 33 }, onError: (e, s) {
34 throw 'Analysis failed: $e\n$s'; 34 throw 'Analysis failed: $e\n$s';
35 }).then(asyncSuccess); 35 }).then(asyncSuccess);
36 } 36 }
OLDNEW
« no previous file with comments | « tests/utils/dart2js_test.dart ('k') | tools/create_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698