Chromium Code Reviews| Index: tests/lib/mirrors/metadata_test.dart |
| =================================================================== |
| --- tests/lib/mirrors/metadata_test.dart (revision 23928) |
| +++ tests/lib/mirrors/metadata_test.dart (working copy) |
| @@ -39,7 +39,6 @@ |
| ' in $mirror at index $i'; |
| } |
| } |
| - print(metadata); |
|
Ivan Posva
2013/06/14 15:16:48
Please leave the print in.
gbracha
2013/06/14 20:42:46
Done.
|
| } |
| @symbol @string @symbol |
| @@ -51,14 +50,15 @@ |
| } |
| MirrorSystem mirrors = currentMirrorSystem(); |
| - checkMetadata(mirrors.findLibrary(const Symbol('test.metadata_test')).first, |
| - [string, symbol]); |
| + LibraryMirror lib = mirrors.findLibrary(const Symbol('test.metadata_test')).first; |
| +/* checkMetadata(mirrors.findLibrary(const Symbol('test.metadata_test')).first, |
|
Ivan Posva
2013/06/14 15:16:48
I think the easiest way is to split this into sepa
gbracha
2013/06/14 20:42:46
Done.
|
| + [string, symbol]); */ |
| ClassMirror myClassMirror = reflectClass(MyClass); |
| checkMetadata(myClassMirror, [symbol, string]); |
| - ClosureMirror closure = reflect(main); |
| - checkMetadata(closure.function, [symbol, string, symbol]); |
| - closure = reflect(new MyClass().myMethod); |
| - checkMetadata(closure.function, [string, symbol, string]); |
| + MethodMirror function = lib.functions[const Symbol('main')]; |
| + checkMetadata(function, [symbol, string, symbol]); |
| + MethodMirror method = myClassMirror.methods[const Symbol('myMethod')]; |
| + checkMetadata(method, [string, symbol, string]); |
| VariableMirror xMirror = myClassMirror.variables[const Symbol('x')]; |
| checkMetadata(xMirror, [hest, hest, symbol]); |