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

Unified Diff: tests/lib/mirrors/generics_substitution_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/generic_type_mirror_test.dart ('k') | tests/lib/mirrors/generics_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/generics_substitution_test.dart
diff --git a/tests/lib/mirrors/generics_substitution_test.dart b/tests/lib/mirrors/generics_substitution_test.dart
index 1d0e9247a817257a44f65380d2e4766efb288ee7..58a0269b2ee2ee290f0001cac951a6489040b26f 100644
--- a/tests/lib/mirrors/generics_substitution_test.dart
+++ b/tests/lib/mirrors/generics_substitution_test.dart
@@ -29,9 +29,12 @@ main() {
Expect.isFalse(superOfTAndInt.isOriginalDeclaration);
Expect.isFalse(superOfStringAndInt.isOriginalDeclaration);
- Symbol r(ClassMirror cm) => cm.variables[#r].type.simpleName;
- Symbol s(ClassMirror cm) => cm.methods[#s].parameters[0].type.simpleName;
- Symbol t(ClassMirror cm) => cm.methods[#t].returnType.simpleName;
+ Symbol r(ClassMirror cm) =>
+ (cm.declarations[#r] as VariableMirror).type.simpleName;
+ Symbol s(ClassMirror cm) =>
+ (cm.declarations[#s] as MethodMirror).parameters[0].type.simpleName;
+ Symbol t(ClassMirror cm) =>
+ (cm.declarations[#t] as MethodMirror).returnType.simpleName;
Expect.equals(#T, r(genericDecl.superclass)); /// 01: ok
Expect.equals(#int, s(genericDecl.superclass));
« no previous file with comments | « tests/lib/mirrors/generic_type_mirror_test.dart ('k') | tests/lib/mirrors/generics_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698