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

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

Issue 52953002: Hide ClosureMirror.findInContext behind a flag for 1.0. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 2 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/find_in_context_private_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/find_in_context_test.dart
diff --git a/tests/lib/mirrors/closure_mirror_find_in_context_test.dart b/tests/lib/mirrors/find_in_context_test.dart
similarity index 94%
rename from tests/lib/mirrors/closure_mirror_find_in_context_test.dart
rename to tests/lib/mirrors/find_in_context_test.dart
index b26a1400dbec0d435268b2f42069689169bb0159..348cd3a5ed60436b2c8aae37e3806b1b9f92bc2c 100644
--- a/tests/lib/mirrors/closure_mirror_find_in_context_test.dart
+++ b/tests/lib/mirrors/find_in_context_test.dart
@@ -2,6 +2,8 @@
// 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.
+// VMOptions=--support_find_in_context=true
+
import "dart:mirrors";
import "stringify.dart";
@@ -69,12 +71,16 @@ main() {
Expect.equals(null, result);
result = cm.findInContext(#staticFooInS);
+ Expect.isFalse(result is InstanceMirror);
+ Expect.equals(null, result);
+
+ result = cm.findInContext(#S.staticFooInS);
Expect.isTrue(result is ClosureMirror);
expect("Instance(value = staticFooInS)", result.apply(const []));
result = cm.findInContext(#C.staticFooInS);
- Expect.isTrue(result is ClosureMirror);
- expect("Instance(value = staticFooInS)", result.apply(const []));
+ Expect.isFalse(result is InstanceMirror);
+ Expect.equals(null, result);
result = cm.findInContext(#C.staticInC);
expect("Instance(value = staticInC)", result);
« no previous file with comments | « tests/lib/mirrors/find_in_context_private_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698