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

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
« no previous file with comments | « tests/lib/mirrors/library_metadata_test.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)
@@ -2,7 +2,6 @@
// 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.
-@string @symbol
library test.metadata_test;
import 'dart:mirrors';
@@ -51,14 +50,13 @@
}
MirrorSystem mirrors = currentMirrorSystem();
- checkMetadata(mirrors.findLibrary(const Symbol('test.metadata_test')).first,
- [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]);
+ LibraryMirror lib = mirrors.findLibrary(const Symbol('test.metadata_test')).first;
+ 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]);
« no previous file with comments | « tests/lib/mirrors/library_metadata_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698