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

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: maintain dart2js coverage 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/lib.status ('k') | tests/lib/mirrors/intercepted_object_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..35e81f9805821b2bd2becc4aa986948e3379bfc0 100644
--- a/tests/lib/mirrors/closures_test.dart
+++ b/tests/lib/mirrors/closures_test.dart
@@ -8,20 +8,18 @@ import 'stringify.dart';
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.
- 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() {
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/intercepted_object_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698