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

Unified Diff: tests/lib/mirrors/mirrors_test.dart

Issue 10854197: A round of edits to make mirrors.dart more like our current working (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « runtime/vm/bootstrap_natives.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/mirrors_test.dart
===================================================================
--- tests/lib/mirrors/mirrors_test.dart (revision 10916)
+++ tests/lib/mirrors/mirrors_test.dart (working copy)
@@ -21,9 +21,9 @@
testFieldAccess(mirrors) {
var instance = new Class();
- var libMirror = mirrors.libraries()["MirrorsTest.dart"];
- var classMirror = libMirror.classes()["Class"];
- var instMirror = mirrors.mirrorOf(instance);
+ var libMirror = mirrors.libraries["MirrorsTest.dart"];
+ var classMirror = libMirror.classes["Class"];
+ var instMirror = reflect(instance);
libMirror.setField('topLevelField', 42);
var future = libMirror.getField('topLevelField');
@@ -50,12 +50,12 @@
testClosureMirrors(mirrors) {
var closure = (x, y, z) { return x + y + z; };
- var mirror = mirrors.mirrorOf(closure);
+ var mirror = reflect(closure);
expect(mirror is ClosureMirror, equals(true));
var funcMirror = mirror.function();
expect(funcMirror is MethodMirror, equals(true));
- expect(funcMirror.parameters().length, equals(3));
+ expect(funcMirror.parameters.length, equals(3));
var future = mirror.apply([2, 4, 8]);
future.then(expectAsync1((resultMirror) {
@@ -64,8 +64,8 @@
}
testInvokeConstructor(mirrors) {
- var libMirror = mirrors.libraries()["MirrorsTest.dart"];
- var classMirror = libMirror.classes()["Class"];
+ var libMirror = mirrors.libraries["MirrorsTest.dart"];
+ var classMirror = libMirror.classes["Class"];
var future = classMirror.newInstance('', []);
future.then(expectAsync1((resultMirror) {
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698