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

Unified Diff: tests/lib/mirrors/immutable_collections_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/hierarchy_invariants_test.dart ('k') | tests/lib/mirrors/inherit_field_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/immutable_collections_test.dart
diff --git a/tests/lib/mirrors/immutable_collections_test.dart b/tests/lib/mirrors/immutable_collections_test.dart
index 391fce449aad0e100c3126465a96ebf75e850a64..7f9ea0b871099aa924f28c7dba5423d5fcf39a16 100644
--- a/tests/lib/mirrors/immutable_collections_test.dart
+++ b/tests/lib/mirrors/immutable_collections_test.dart
@@ -41,22 +41,13 @@ checkMethod(MethodMirror mm) {
}
checkClass(ClassMirror cm) {
- checkMap(cm.members, 'ClassMirror.members');
- checkMap(cm.variables, 'ClassMirror.variables');
- checkMap(cm.methods, 'ClassMirror.methods');
- checkMap(cm.getters, 'ClassMirror.getters');
- checkMap(cm.setters, 'ClassMirror.setters');
- checkMap(cm.constructors, 'ClassMirror.constructors');
+ checkMap(cm.declarations, 'ClassMirror.declarations');
checkList(cm.metadata, 'ClassMirror.metadata');
checkList(cm.superinterfaces, 'ClassMirror.superinterfaces');
checkList(cm.typeArguments, 'ClassMirror.typeArguments');
checkList(cm.typeVariables, 'ClassMirror.typeVariables');
- cm.methods.values.forEach(checkMethod);
- cm.getters.values.forEach(checkMethod);
- cm.setters.values.forEach(checkMethod);
- cm.constructors.values.forEach(checkMethod);
- cm.variables.values.forEach(checkVariable);
+ cm.declarations.values.forEach(checkDeclaration);
cm.typeVariables.forEach(checkTypeVariable);
}
@@ -64,22 +55,19 @@ checkType(TypeMirror tm) {
checkList(tm.metadata, 'TypeMirror.metadata');
}
+checkDeclaration(DeclarationMirror dm) {
+ if (dm is MethodMirror) checkMethod(dm);
+ if (dm is ClassMirror) checkClass(dm);
+ if (dm is TypeMirror) checkType(dm);
+ if (dm is VariableMirror) checkVariable(dm);
+ if (dm is TypeVariableMirror) checkTypeVariable(dm);
+}
+
checkLibrary(LibraryMirror lm) {
- checkMap(lm.members, 'LibraryMirror.members');
- checkMap(lm.variables, 'LibraryMirror.variables');
- checkMap(lm.classes, 'LibraryMirror.classes');
- checkMap(lm.types, 'LibraryMirror.types');
- checkMap(lm.functions, 'LibraryMirror.functions');
- checkMap(lm.getters, 'LibraryMirror.getters');
- checkMap(lm.setters, 'LibraryMirror.setters');
+ checkMap(lm.declarations, 'LibraryMirror.declarations');
checkList(lm.metadata, 'LibraryMirror.metadata');
- lm.types.values.forEach(checkType);
- lm.classes.values.forEach(checkClass);
- lm.functions.values.forEach(checkMethod);
- lm.getters.values.forEach(checkMethod);
- lm.setters.values.forEach(checkMethod);
- lm.variables.values.forEach(checkVariable);
+ lm.declarations.values.forEach(checkDeclaration);
}
main() {
« no previous file with comments | « tests/lib/mirrors/hierarchy_invariants_test.dart ('k') | tests/lib/mirrors/inherit_field_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698