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

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

Issue 20218003: Compare against Symbol instead of calling MirrorSystem.getName() (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/method_mirror_returntype_test.dart
diff --git a/tests/lib/mirrors/method_mirror_returntype_test.dart b/tests/lib/mirrors/method_mirror_returntype_test.dart
index 8057c4991cb7185d868d798f0bfe6424c5f5c6ed..5d13ece75c27e1d74c92ed57aed9d9a26d6bd2ec 100644
--- a/tests/lib/mirrors/method_mirror_returntype_test.dart
+++ b/tests/lib/mirrors/method_mirror_returntype_test.dart
@@ -6,8 +6,6 @@ import "dart:mirrors";
import "package:expect/expect.dart";
-_n(symbol) => MirrorSystem.getName(symbol);
-
void voidFunc() {}
dynamicFunc1() {}
@@ -25,20 +23,20 @@ main() {
mm = reflect(intFunc).function;
Expect.equals(true, mm.returnType is TypeMirror);
- Expect.equals("int", _n(mm.returnType.simpleName));
+ Expect.equals(const Symbol("int"), mm.returnType.simpleName);
Expect.equals(true, mm.returnType.owner is LibraryMirror);
mm = reflect(dynamicFunc1).function;
Expect.equals(true, mm.returnType is TypeMirror);
- Expect.equals("dynamic", _n(mm.returnType.simpleName));
+ Expect.equals(const Symbol("dynamic"), mm.returnType.simpleName);
mm = reflect(dynamicFunc2).function;
Expect.equals(true, mm.returnType is TypeMirror);
- Expect.equals("dynamic", _n(mm.returnType.simpleName));
+ Expect.equals(const Symbol("dynamic"), mm.returnType.simpleName);
mm = reflect(voidFunc).function;
Expect.equals(true, mm.returnType is TypeMirror);
- Expect.equals("void", _n(mm.returnType.simpleName));
+ Expect.equals(const Symbol("void"), mm.returnType.simpleName);
ClassMirror cm = reflectClass(C);
mm = cm.members[const Symbol("getE")];
@@ -47,5 +45,5 @@ main() {
// what has to be returned.
//Expect.equals("E", _n(mm.returnType.simpleName));
Expect.equals(true, mm.owner is ClassMirror);
- Expect.equals("C", _n(mm.owner.simpleName));
+ Expect.equals(const Symbol("C"), mm.owner.simpleName);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698