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

Unified Diff: tests/lib/mirrors/method_mirror_source_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/method_mirror_source_test.dart
diff --git a/tests/lib/mirrors/method_mirror_source_test.dart b/tests/lib/mirrors/method_mirror_source_test.dart
index fcbc7c63740404c81c6d77f37e3ae9ad1d58583b..094e36d73ce1d89afc6e33f76d9ad388010a36b1 100644
--- a/tests/lib/mirrors/method_mirror_source_test.dart
+++ b/tests/lib/mirrors/method_mirror_source_test.dart
@@ -55,35 +55,35 @@ class C extends S {
main() {
// Top-level members
LibraryMirror lib = reflectClass(C).owner;
- expectSource(lib.members[const Symbol("foo1")],
+ expectSource(lib.members[#foo1],
"foo1() {}");
- expectSource(lib.members[const Symbol("x")],
+ expectSource(lib.members[#x],
"int get x => 42;");
expectSource(lib.members[const Symbol("x=")],
"set x(value) { }");
// Class members
ClassMirror cm = reflectClass(C);
- expectSource(cm.members[const Symbol("foo")],
+ expectSource(cm.members[#foo],
"static dynamic foo() {\n"
" // Happy foo.\n"
" }");
- expectSource(cm.members[const Symbol("bar")],
+ expectSource(cm.members[#bar],
"void bar() { /* Not so happy bar. */ }");
- expectSource(cm.members[const Symbol("someX")],
+ expectSource(cm.members[#someX],
"num get someX =>\n"
" 181;");
expectSource(cm.members[const Symbol("someX=")],
"set someX(v) {\n"
" // Discard this one.\n"
" }");
- expectSource(cm.constructors[const Symbol("C")],
+ expectSource(cm.constructors[#C],
"C(this._x, y)\n"
" : _y = y,\n"
" super();");
- expectSource(cm.constructors[const Symbol("C.other")],
+ expectSource(cm.constructors[#C.other],
"factory C.other(num z) {}");
- expectSource(cm.constructors[const Symbol("C.other3")],
+ expectSource(cm.constructors[#C.other3],
"factory C.other3() = C.other2;");
// Closures
« no previous file with comments | « tests/lib/mirrors/method_mirror_returntype_test.dart ('k') | tests/lib/mirrors/mirrors_resolve_fields_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698