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

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

Issue 24239010: Use symbol literals in the mirror tests. (Except for void, the empty string and setters.) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge line Created 7 years, 3 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
Index: tests/lib/mirrors/metadata_test.dart
diff --git a/tests/lib/mirrors/metadata_test.dart b/tests/lib/mirrors/metadata_test.dart
index 164a5ae011ce52b600c0724f96a121f72a33197f..260874600d9551c9a153222a7e4249209215f5ad 100644
--- a/tests/lib/mirrors/metadata_test.dart
+++ b/tests/lib/mirrors/metadata_test.dart
@@ -53,18 +53,18 @@ main() {
MirrorSystem mirrors = currentMirrorSystem();
ClassMirror myClassMirror = reflectClass(MyClass);
checkMetadata(myClassMirror, [symbol, string]);
- LibraryMirror lib = mirrors.findLibrary(const Symbol('test.metadata_test')).first;
- MethodMirror function = lib.functions[const Symbol('main')];
+ LibraryMirror lib = mirrors.findLibrary(#test.metadata_test).first;
+ MethodMirror function = lib.functions[#main];
checkMetadata(function, [symbol, string, symbol]);
- MethodMirror method = myClassMirror.methods[const Symbol('myMethod')];
+ MethodMirror method = myClassMirror.methods[#myMethod];
checkMetadata(method, [string, symbol, string]);
- method = myClassMirror.methods[const Symbol('myOtherMethod')];
+ method = myClassMirror.methods[#myOtherMethod];
checkMetadata(method, []);
- VariableMirror xMirror = myClassMirror.variables[const Symbol('x')];
+ VariableMirror xMirror = myClassMirror.variables[#x];
checkMetadata(xMirror, [hest, hest, symbol]);
- VariableMirror yMirror = myClassMirror.variables[const Symbol('y')];
+ VariableMirror yMirror = myClassMirror.variables[#y];
checkMetadata(yMirror, []);
// TODO(ahe): Test local functions.
« no previous file with comments | « tests/lib/mirrors/metadata_constructed_constant_test.dart ('k') | tests/lib/mirrors/method_mirror_properties_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698