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

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

Issue 64793003: Update mirror tests for removed API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 7 years, 1 month 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/removed_api_test.dart ('k') | tests/lib/mirrors/static_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/return_type_test.dart
diff --git a/tests/lib/mirrors/return_type_test.dart b/tests/lib/mirrors/return_type_test.dart
index 6b90061cc8325bc9dde6a04dd3b1123e98693a6f..547e7610fb2e1fb97045d3482deacf643e24d75f 100644
--- a/tests/lib/mirrors/return_type_test.dart
+++ b/tests/lib/mirrors/return_type_test.dart
@@ -20,8 +20,16 @@ class B {
// List<int> j() {}
}
+methodsOf(ClassMirror cm) {
+ var result = new Map();
+ cm.declarations.forEach((k,v) {
+ if(v is MethodMirror && v.isRegularMethod) result[k] = v;
+ });
+ return result;
+}
+
main() {
- var methods = reflectClass(B).methods;
+ var methods = methodsOf(reflectClass(B));
expect('{f: Method(s(f) in s(B)), '
'g: Method(s(g) in s(B)), '
@@ -37,6 +45,4 @@ main() {
expect('Class(s(int) in s(dart.core), top-level)', g.returnType);
expect('Class(s(List) in s(dart.core), top-level)', h.returnType);
expect('Class(s(B) in s(test.return_type_test), top-level)', i.returnType);
-
- print(methods);
}
« no previous file with comments | « tests/lib/mirrors/removed_api_test.dart ('k') | tests/lib/mirrors/static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698