Index: tests/lib_strong/mirrors/field_metadata_test.dart |
diff --git a/tests/lib_strong/mirrors/field_metadata_test.dart b/tests/lib_strong/mirrors/field_metadata_test.dart |
index d64144dffbed799c8b0662409a82e6cc80b27987..a8db33dfb3c297d32d8954a6e397b18557543226 100644 |
--- a/tests/lib_strong/mirrors/field_metadata_test.dart |
+++ b/tests/lib_strong/mirrors/field_metadata_test.dart |
@@ -17,6 +17,11 @@ class Foo { |
@Bar('baz') |
final String y = 'hi'; |
+ |
+ @Bar('foo') |
+ void set z(int val) { |
+ x = val; |
+ } |
} |
void main() { |
@@ -28,6 +33,12 @@ void main() { |
Expect.equals(f.x, 42); |
Expect.equals(f.y, 'hi'); |
+ Expect.throws(() { |
+ f.z = 'hello'; |
+ }); |
+ f.z = 0; |
+ Expect.equals(f.x, 0); |
+ |
var members = reflect(f).type.declarations; |
var x = members[#x] as VariableMirror; |
var y = members[#y] as VariableMirror; |