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

Unified Diff: tests/lib/mirrors/null_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/mirrors_resolve_fields_test.dart ('k') | tests/lib/mirrors/parameter_metadata_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/null_test.dart
diff --git a/tests/lib/mirrors/null_test.dart b/tests/lib/mirrors/null_test.dart
index 10b92f3a45a9eb9f3eb9e4f69f0d72eecb012bba..72f5e23c7fbef2778e3cba073075ef25a8082aa6 100644
--- a/tests/lib/mirrors/null_test.dart
+++ b/tests/lib/mirrors/null_test.dart
@@ -10,25 +10,25 @@ import 'package:expect/expect.dart';
main() {
InstanceMirror nullMirror = reflect(null);
- Expect.isTrue(nullMirror.getField(const Symbol('hashCode')).reflectee is int);
+ Expect.isTrue(nullMirror.getField(#hashCode).reflectee is int);
Expect.equals(null.hashCode,
- nullMirror.getField(const Symbol('hashCode')).reflectee);
+ nullMirror.getField(#hashCode).reflectee);
Expect.equals('Null',
- nullMirror.getField(const Symbol('runtimeType')).reflectee
+ nullMirror.getField(#runtimeType).reflectee
.toString());
- Expect.isTrue(nullMirror.invoke(const Symbol('=='), [null]).reflectee);
- Expect.isFalse(nullMirror.invoke(const Symbol('=='), [new Object()])
+ Expect.isTrue(nullMirror.invoke(#==, [null]).reflectee);
+ Expect.isFalse(nullMirror.invoke(#==, [new Object()])
.reflectee);
Expect.equals('null',
- nullMirror.invoke(const Symbol('toString'), []).reflectee);
- Expect.throws(() => nullMirror.invoke(const Symbol('notDefined'), []),
+ nullMirror.invoke(#toString, []).reflectee);
+ Expect.throws(() => nullMirror.invoke(#notDefined, []),
(e) => e is NoSuchMethodError,
'noSuchMethod');
ClassMirror NullMirror = nullMirror.type;
Expect.equals(reflectClass(Null), NullMirror);
- Expect.equals(const Symbol('Null'), NullMirror.simpleName);
- Expect.equals(const Symbol('Object'), NullMirror.superclass.simpleName);
+ Expect.equals(#Null, NullMirror.simpleName);
+ Expect.equals(#Object, NullMirror.superclass.simpleName);
Expect.equals(null, NullMirror.superclass.superclass);
Expect.listEquals([], NullMirror.superinterfaces);
Expect.equals(currentMirrorSystem().libraries[Uri.parse('dart:core')],
« no previous file with comments | « tests/lib/mirrors/mirrors_resolve_fields_test.dart ('k') | tests/lib/mirrors/parameter_metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698