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

Unified Diff: tests/compiler/dart2js/mirrors/class_mirror_type_variables_test.dart

Issue 108753003: Test source mirrors with lib/mirrors test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 6 years, 10 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 | « no previous file | tests/compiler/dart2js/mirrors/mirrors_test_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mirrors/class_mirror_type_variables_test.dart
diff --git a/tests/compiler/dart2js/mirrors/class_mirror_type_variables_test.dart b/tests/compiler/dart2js/mirrors/class_mirror_type_variables_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a3f68716318643d34e618ca5fa9ccd16c0c93cd2
--- /dev/null
+++ b/tests/compiler/dart2js/mirrors/class_mirror_type_variables_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, 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.
+
+import "dart:mirrors";
+
+import "package:async_helper/async_helper.dart";
+
+import "mirrors_test_helper.dart";
+import "../../../lib/mirrors/class_mirror_type_variables_expect.dart";
+
+class CompileTimeEnv implements Env {
+ final MirrorSystem mirrors;
+
+ CompileTimeEnv(this.mirrors);
+
+ LibraryMirror get core => mirrors.libraries[Uri.parse('dart:core')];
+
+ LibraryMirror get test =>
+ mirrors.findLibrary(#class_mirror_type_variables_data);
+
+
+ ClassMirror getA() => test.declarations[#A];
+ ClassMirror getB() => test.declarations[#B];
+ ClassMirror getC() => test.declarations[#C];
+ ClassMirror getD() => test.declarations[#D];
+ ClassMirror getE() => test.declarations[#E];
+ ClassMirror getF() => test.declarations[#F];
+ ClassMirror getNoTypeParams() => test.declarations[#NoTypeParams];
+ ClassMirror getObject() => core.declarations[#Object];
+ ClassMirror getString() => core.declarations[#String];
+ ClassMirror getHelperOfString() =>
+ createInstantiation(test.declarations[#Helper], [getString()]);
+}
+
+main() {
+ asyncTest(() => analyze("class_mirror_type_variables_data.dart").
+ then((MirrorSystem mirrors) {
+ test(new CompileTimeEnv(mirrors));
+ }));
+
+}
« no previous file with comments | « no previous file | tests/compiler/dart2js/mirrors/mirrors_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698