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

Unified Diff: tests/utils/source_mirrors_test.dart

Issue 119913002: Align source mirrors with runtime mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments + small fix. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/utils/source_mirrors_test.dart
diff --git a/tests/utils/source_mirrors_test.dart b/tests/utils/source_mirrors_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f5875601771dc1739b3b4dcef1e47b7407f6af35
--- /dev/null
+++ b/tests/utils/source_mirrors_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=
+// VMOptions=--print-object-histogram
+
+// Smoke test of the dart2js compiler API.
+library source_mirrors_test;
+
+import 'dart:async';
+import "package:async_helper/async_helper.dart";
+
+import '../../sdk/lib/_internal/compiler/implementation/mirrors/analyze.dart';
+import 'dummy_compiler_test.dart';
+
+main() {
+ asyncStart();
+ Future result =
+ analyze([new Uri(scheme: 'main')],
+ new Uri(scheme: 'lib', path: '/'),
+ new Uri(scheme: 'package', path: '/'),
+ provider, handler);
+ result.then((mirrorSystem) {
+ if (mirrorSystem == null) {
+ throw 'Analysis failed';
+ }
+ mirrorSystem.libraries.forEach((uri, library) {
+ print(library);
+ library.declarations.forEach((name, declaration) {
+ print(' $name:$declaration');
+ });
+ });
+ }, onError: (e) {
+ throw 'Analysis failed';
+ }).then(asyncSuccess);
+}
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | tools/dom/docs/lib/docs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698