Chromium Code Reviews| Index: tests/lib/mirrors/parameter_is_const_test.dart |
| diff --git a/tests/lib/mirrors/unmangled_type_test.dart b/tests/lib/mirrors/parameter_is_const_test.dart |
| similarity index 63% |
| copy from tests/lib/mirrors/unmangled_type_test.dart |
| copy to tests/lib/mirrors/parameter_is_const_test.dart |
| index dbc6b62437908677c6fb6c1dab670b8d0dd7d2b6..3bf14ae08425c4e9599bafa1ddb9325e21616fcd 100644 |
| --- a/tests/lib/mirrors/unmangled_type_test.dart |
| +++ b/tests/lib/mirrors/parameter_is_const_test.dart |
| @@ -2,14 +2,17 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| +library test.parameter_is_const; |
| + |
| import 'dart:mirrors'; |
| import 'package:expect/expect.dart'; |
| -class Foo { |
| +class Class { |
| + foo(param) {} |
|
ahe
2013/11/11 10:23:07
For completeness, how about adding:
foo(
const //
rmacnak
2013/11/11 17:54:22
Done.
|
| } |
| main() { |
| - Expect.stringEquals('Foo', '${new Foo().runtimeType}'); |
| - Expect.stringEquals('foo', MirrorSystem.getName(new Symbol('foo'))); |
| + MethodMirror mm = reflectClass(Class).declarations[#foo]; |
| + Expect.isFalse(mm.parameters.single.isConst); |
| } |