| Index: tests/lib/mirrors/static_const_field_test.dart
|
| diff --git a/tests/language/vm/reflect_core_vm_test.dart b/tests/lib/mirrors/static_const_field_test.dart
|
| similarity index 54%
|
| copy from tests/language/vm/reflect_core_vm_test.dart
|
| copy to tests/lib/mirrors/static_const_field_test.dart
|
| index 2474b216f7bf0b641535f0b18af4573eb9c7e723..f6fd959de34473e068f0c6434d1ab41e24014ab2 100644
|
| --- a/tests/language/vm/reflect_core_vm_test.dart
|
| +++ b/tests/lib/mirrors/static_const_field_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.
|
|
|
| -// Test reflection of private functions in core classes.
|
| +// Test that static const fields are accessible by reflection.
|
| +// Regression test for http://dartbug.com/23811.
|
|
|
| -import "package:expect/expect.dart";
|
| +@MirrorsUsed(targets: const [A])
|
| import "dart:mirrors";
|
| +import "package:expect/expect.dart";
|
|
|
| -main() {
|
| - var s = "string";
|
| - var im = reflect(s);
|
| - Expect.throws(() => im.invoke(const Symbol("_setAt"), [0, 65]), (e) => e is NoSuchMethodError);
|
| +class A {
|
| + static const ONE = 1;
|
| }
|
|
|
| +main() {
|
| + Expect.equals(1, reflectClass(A).getField(#ONE).reflectee);
|
| +}
|
|
|