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

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

Issue 16757007: Changes to mirrors in support of metadata access at runtime. Assumes VM changes in flight.… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« runtime/lib/mirrors_impl.dart ('K') | « sdk/lib/mirrors/mirrors.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/metadata_test.dart
===================================================================
--- tests/lib/mirrors/metadata_test.dart (revision 23928)
+++ tests/lib/mirrors/metadata_test.dart (working copy)
@@ -39,7 +39,6 @@
' in $mirror at index $i';
}
}
- print(metadata);
Ivan Posva 2013/06/14 15:16:48 Please leave the print in.
gbracha 2013/06/14 20:42:46 Done.
}
@symbol @string @symbol
@@ -51,14 +50,15 @@
}
MirrorSystem mirrors = currentMirrorSystem();
- checkMetadata(mirrors.findLibrary(const Symbol('test.metadata_test')).first,
- [string, symbol]);
+ LibraryMirror lib = mirrors.findLibrary(const Symbol('test.metadata_test')).first;
+/* checkMetadata(mirrors.findLibrary(const Symbol('test.metadata_test')).first,
Ivan Posva 2013/06/14 15:16:48 I think the easiest way is to split this into sepa
gbracha 2013/06/14 20:42:46 Done.
+ [string, symbol]); */
ClassMirror myClassMirror = reflectClass(MyClass);
checkMetadata(myClassMirror, [symbol, string]);
- ClosureMirror closure = reflect(main);
- checkMetadata(closure.function, [symbol, string, symbol]);
- closure = reflect(new MyClass().myMethod);
- checkMetadata(closure.function, [string, symbol, string]);
+ MethodMirror function = lib.functions[const Symbol('main')];
+ checkMetadata(function, [symbol, string, symbol]);
+ MethodMirror method = myClassMirror.methods[const Symbol('myMethod')];
+ checkMetadata(method, [string, symbol, string]);
VariableMirror xMirror = myClassMirror.variables[const Symbol('x')];
checkMetadata(xMirror, [hest, hest, symbol]);
« runtime/lib/mirrors_impl.dart ('K') | « sdk/lib/mirrors/mirrors.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698