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

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

Issue 211243009: Implement MethodMirror.location in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add to api and fix type warnings Created 6 years, 9 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/method_mirror_location_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/mirrors_reader_test.dart
diff --git a/tests/lib/mirrors/mirrors_reader_test.dart b/tests/lib/mirrors/mirrors_reader_test.dart
index 4cd7b8cfd109cb79dba0caaeef817703d2b120f0..1c69b07928ee73cbf9522572ed53de231b1c20ee 100644
--- a/tests/lib/mirrors/mirrors_reader_test.dart
+++ b/tests/lib/mirrors/mirrors_reader_test.dart
@@ -32,13 +32,17 @@ class RuntimeMirrorsReader extends MirrorsReader {
bool expectUnsupported(var receiver, String tag, UnsupportedError exception) {
// [DeclarationMirror.location] is intentionally not supported in runtime
// mirrors.
- if (receiver is DeclarationMirror && tag == 'location') {
- return true;
- }
+
if (mirrorSystemType == '_LocalMirrorSystem') {
// VM mirror system.
+ if (receiver is DeclarationMirror && tag == 'location') {
+ return receiver is! MethodMirror;
+ }
} else if (mirrorSystemType == 'JsMirrorSystem') {
// Dart2js runtime mirror system.
+ if (receiver is DeclarationMirror && tag == 'location') {
+ return true;
+ }
}
return false;
}
« no previous file with comments | « tests/lib/mirrors/method_mirror_location_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698