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

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

Issue 24631003: Add proper API for creating private symbols wrt a library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: amend tests Created 7 years, 3 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
Index: tests/lib/mirrors/closures_test.dart
diff --git a/tests/lib/mirrors/closures_test.dart b/tests/lib/mirrors/closures_test.dart
index 5f861c6cc1cb276f5ea4e6e7bddfe7ec2f65b4a8..14a7619368535cca591b73dcb5c2ebec2b115545 100644
--- a/tests/lib/mirrors/closures_test.dart
+++ b/tests/lib/mirrors/closures_test.dart
@@ -6,22 +6,22 @@ import 'dart:mirrors';
import 'package:expect/expect.dart';
import 'stringify.dart';
+bool isDart2js = false;
+
testIntercepted() {
var instance = [];
- var methodMirror = reflect(instance.toString);
- String rest = ' in s(List)';
- rest = ''; /// 01: ok
- expect('Method(s(toString)$rest)', methodMirror.function);
- Expect.equals('[]', methodMirror.apply([]).reflectee);
+ var closureMirror = reflect(instance.toString);
+ var methodMirror = closureMirror.function;
+ Expect.equals(#toString, methodMirror.simpleName);
+ Expect.equals('[]', closureMirror.apply([]).reflectee);
}
testNonIntercepted() {
var closure = new Map().containsKey;
- var mirror = reflect(closure);
- String rest = ' in s(_HashMap)'; // Might become Map instead.
rmacnak 2013/09/27 01:38:27 Testing the function's owner is bogus because the
- rest = ''; /// 01: ok
- expect('Method(s(containsKey)$rest)', mirror.function);
- Expect.isFalse(mirror.apply([7]).reflectee);
+ var closureMirror = reflect(closure);
+ var methodMirror = closureMirror.function;
+ Expect.equals(#containsKey, methodMirror.simpleName);
+ Expect.isFalse(closureMirror.apply([7]).reflectee);
}
main() {

Powered by Google App Engine
This is Rietveld 408576698