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

Unified Diff: tests/lib/mirrors/field_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
Index: tests/lib/mirrors/field_type_test.dart
diff --git a/tests/lib/mirrors/field_type_test.dart b/tests/lib/mirrors/field_type_test.dart
index 0191f3f6ea310d31b489845f56db224dfc4bcfca..a5e6b716ae9ff0f9115f4b209523fcf0d8184ad3 100644
--- a/tests/lib/mirrors/field_type_test.dart
+++ b/tests/lib/mirrors/field_type_test.dart
@@ -26,11 +26,12 @@ class H<T> {}
testOriginalDeclaration() {
ClassMirror a = reflectClass(A);
- VariableMirror staticField = a.variables[#staticField];
- VariableMirror field = a.variables[#field];
- VariableMirror dynamicTypeField = a.variables[#dynamicTypeField];
- VariableMirror typeVariableField = a.variables[#typeVariableField];
- VariableMirror parameterizedTypeField = a.variables[#parameterizedTypeField];
+ VariableMirror staticField = a.declarations[#staticField];
+ VariableMirror field = a.declarations[#field];
+ VariableMirror dynamicTypeField = a.declarations[#dynamicTypeField];
+ VariableMirror typeVariableField = a.declarations[#typeVariableField];
+ VariableMirror parameterizedTypeField =
+ a.declarations[#parameterizedTypeField];
Expect.equals(reflectType(int), staticField.type);
Expect.equals(reflectClass(String), field.type);
@@ -45,12 +46,12 @@ testOriginalDeclaration() {
testInstance() {
ClassMirror aOfString = reflect(new A<String>()).type;
- VariableMirror staticField = aOfString.variables[#staticField];
- VariableMirror field = aOfString.variables[#field];
- VariableMirror dynamicTypeField = aOfString.variables[#dynamicTypeField];
- VariableMirror typeVariableField = aOfString.variables[#typeVariableField];
+ VariableMirror staticField = aOfString.declarations[#staticField];
+ VariableMirror field = aOfString.declarations[#field];
+ VariableMirror dynamicTypeField = aOfString.declarations[#dynamicTypeField];
+ VariableMirror typeVariableField = aOfString.declarations[#typeVariableField];
VariableMirror parameterizedTypeField =
- aOfString.variables[#parameterizedTypeField];
+ aOfString.declarations[#parameterizedTypeField];
Expect.equals(reflectType(int), staticField.type);
Expect.equals(reflectClass(String), field.type);
@@ -65,7 +66,7 @@ testInstance() {
testTopLevel() {
LibraryMirror currentLibrary = currentMirrorSystem().findLibrary(#field_test);
- VariableMirror topLevel = currentLibrary.variables.values.first;
+ VariableMirror topLevel = currentLibrary.declarations[#toplevelVariable];
Expect.equals(reflectClass(String), topLevel.type);
}
« no previous file with comments | « tests/lib/mirrors/fake_function_with_call_test.dart ('k') | tests/lib/mirrors/generic_function_typedef_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698