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

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

Issue 276043003: Lay waste to ClosureMirror.findInContext. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove stub in dart2js Created 6 years, 7 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/lib.status ('k') | tests/lib/mirrors/find_in_context_private_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/find_in_context_fake_function_test.dart
diff --git a/tests/lib/mirrors/find_in_context_fake_function_test.dart b/tests/lib/mirrors/find_in_context_fake_function_test.dart
deleted file mode 100644
index 93aeeb8b8ffa79b8ecbaed0dad12209c21409e8a..0000000000000000000000000000000000000000
--- a/tests/lib/mirrors/find_in_context_fake_function_test.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// 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
-
-// Regression test: this used to crash the VM.
-
-library test.find_in_context_fake_function;
-
-import "dart:mirrors";
-import "package:expect/expect.dart";
-
-var topLevelField = 1;
-get topLevelGetter => 2;
-topLevelFunction() => 3;
-
-class FakeFunction1 {
- var field = 4;
- get getter => 5;
- method() => 6;
- static var staticField = 7;
- static get staticGetter => 8;
- staticFunction() => 9;
- call(x) {
- var local = x * 2;
- return local;
- }
-}
-
-class FakeFunction2 implements Function {
- var field = 10;
- get getter => 11;
- method() => 12;
- static var staticField = 13;
- static get staticGetter => 14;
- staticFunction() => 15;
- noSuchMethod(msg) {
- var local = msg.positionalArguments;
- if (msg.memberName != #call) return super.noSuchMethod(msg);
- return local.join('+');
- }
-}
-
-doFindInContext(cm, name, value) {
- Expect.equals(value,
- cm.findInContext(name).reflectee);
-}
-dontFindInContext(cm, name) {
- Expect.isNull(cm.findInContext(name));
-}
-
-main() {
- ClosureMirror cm = reflect(new FakeFunction1());
- dontFindInContext(cm, #local);
- dontFindInContext(cm, const Symbol('this'));
- dontFindInContext(cm, #field);
- dontFindInContext(cm, #getter);
- dontFindInContext(cm, #method);
- dontFindInContext(cm, #staticField);
- dontFindInContext(cm, #staticGetter);
- dontFindInContext(cm, #staticFunction);
- dontFindInContext(cm, #topLevelField);
- dontFindInContext(cm, #topLevelGetter);
- dontFindInContext(cm, #topLevelFunction);
-
- cm = reflect(new FakeFunction2());
- dontFindInContext(cm, #local);
- dontFindInContext(cm, const Symbol('this'));
- dontFindInContext(cm, #field);
- dontFindInContext(cm, #getter);
- dontFindInContext(cm, #method);
- dontFindInContext(cm, #staticField);
- dontFindInContext(cm, #staticGetter);
- dontFindInContext(cm, #staticFunction);
- dontFindInContext(cm, #topLevelField);
- dontFindInContext(cm, #topLevelGetter);
- dontFindInContext(cm, #topLevelFunction);
-}
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/find_in_context_private_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698