Chromium Code Reviews| 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
|
| } |