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

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

Issue 19299003: Moved some MethodMirror properties from embedded API to native calls. (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 | « tests/lib/lib.status ('k') | tests/lib/mirrors/method_mirror_properties_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/method_mirror_name_test.dart
diff --git a/tests/lib/mirrors/method_mirror_test.dart b/tests/lib/mirrors/method_mirror_name_test.dart
similarity index 52%
rename from tests/lib/mirrors/method_mirror_test.dart
rename to tests/lib/mirrors/method_mirror_name_test.dart
index 16851c9c209a1634de02ddac7d1103fd82c14204..a921d333864fb2c4210fdb135dfcf19af3029072 100644
--- a/tests/lib/mirrors/method_mirror_test.dart
+++ b/tests/lib/mirrors/method_mirror_name_test.dart
@@ -4,18 +4,14 @@
import "dart:mirrors";
-import "../../../pkg/unittest/lib/unittest.dart";
-
-String _symbolToString(Symbol sym) {
- return MirrorSystem.getName(sym);
-}
+import "package:expect/expect.dart";
+import "stringify.dart";
doNothing42() {}
main() {
// Regression test for http://www.dartbug.com/6335
- test("NamedMethodName", () {
- var closureMirror = reflect(doNothing42);
- expect(_symbolToString(closureMirror.function.simpleName), "doNothing42");
- });
+ var closureMirror = reflect(doNothing42);
+ Expect.equals(stringifySymbol(closureMirror.function.simpleName),
+ "s(doNothing42)");
ahe 2013/07/17 14:43:57 I would have written this line as: expect('s(doNo
}
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/method_mirror_properties_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698