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 58% |
copy from tests/lib/mirrors/unmangled_type_test.dart |
copy to tests/lib/mirrors/parameter_is_const_test.dart |
index dbc6b62437908677c6fb6c1dab670b8d0dd7d2b6..45185a9b88d15539aa12dbc1f65b2cc2269e7be3 100644 |
--- a/tests/lib/mirrors/unmangled_type_test.dart |
+++ b/tests/lib/mirrors/parameter_is_const_test.dart |
@@ -2,14 +2,19 @@ |
// 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( |
+ const /// 01: compile-time error |
+ param) {} |
} |
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); |
} |