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

Unified Diff: tests/lib/mirrors/invoke_throws_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
« no previous file with comments | « tests/lib/mirrors/intercepted_cache_test.dart ('k') | tests/lib/mirrors/is_odd_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/invoke_throws_test.dart
diff --git a/tests/lib/mirrors/invoke_throws_test.dart b/tests/lib/mirrors/invoke_throws_test.dart
index f3198a1a38b221f05abd4e7559448a8cffadf261..40fa99cfc2b8caa586cc089cad1cb33ef2e497e9 100644
--- a/tests/lib/mirrors/invoke_throws_test.dart
+++ b/tests/lib/mirrors/invoke_throws_test.dart
@@ -35,36 +35,36 @@ libraryFunction() { throw new MyException(); }
main() {
InstanceMirror im = reflect(new Class.noException());
- Expect.throws(() => im.getField(const Symbol('getter')),
+ Expect.throws(() => im.getField(#getter),
(e) => e is MyException);
- Expect.throws(() => im.setField(const Symbol('setter'), ['arg']),
+ Expect.throws(() => im.setField(#setter, ['arg']),
(e) => e is MyException);
- Expect.throws(() => im.invoke(const Symbol('method'), []),
+ Expect.throws(() => im.invoke(#method, []),
(e) => e is MyException);
- Expect.throws(() => im.invoke(const Symbol('triggerNoSuchMethod'), []),
+ Expect.throws(() => im.invoke(#triggerNoSuchMethod, []),
(e) => e is MyException);
ClassMirror cm = reflectClass(Class);
- Expect.throws(() => cm.getField(const Symbol('staticGetter')),
+ Expect.throws(() => cm.getField(#staticGetter),
(e) => e is MyException);
- Expect.throws(() => cm.setField(const Symbol('staticSetter'), ['arg']),
+ Expect.throws(() => cm.setField(#staticSetter, ['arg']),
(e) => e is MyException);
- Expect.throws(() => cm.invoke(const Symbol('staticFunction'), []),
+ Expect.throws(() => cm.invoke(#staticFunction, []),
(e) => e is MyException);
- Expect.throws(() => cm.newInstance(const Symbol('generative'), []),
+ Expect.throws(() => cm.newInstance(#generative, []),
(e) => e is MyException);
- Expect.throws(() => cm.newInstance(const Symbol('redirecting'), []),
+ Expect.throws(() => cm.newInstance(#redirecting, []),
(e) => e is MyException);
- Expect.throws(() => cm.newInstance(const Symbol('faktory'), []),
+ Expect.throws(() => cm.newInstance(#faktory, []),
(e) => e is MyException);
- Expect.throws(() => cm.newInstance(const Symbol('redirectingFactory'), []),
+ Expect.throws(() => cm.newInstance(#redirectingFactory, []),
(e) => e is MyException);
LibraryMirror lm = reflectClass(Class).owner;
- Expect.throws(() => lm.getField(const Symbol('libraryGetter')),
+ Expect.throws(() => lm.getField(#libraryGetter),
(e) => e is MyException);
- Expect.throws(() => lm.setField(const Symbol('librarySetter'), ['arg']),
+ Expect.throws(() => lm.setField(#librarySetter, ['arg']),
(e) => e is MyException);
- Expect.throws(() => lm.invoke(const Symbol('libraryFunction'), []),
+ Expect.throws(() => lm.invoke(#libraryFunction, []),
(e) => e is MyException);
}
« no previous file with comments | « tests/lib/mirrors/intercepted_cache_test.dart ('k') | tests/lib/mirrors/is_odd_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698