Index: dart/tests/lib/mirrors/mirrors_used_merge_test.dart |
diff --git a/dart/tests/compiler/dart2js_extra/mirrors_used_native_test.dart b/dart/tests/lib/mirrors/mirrors_used_merge_test.dart |
similarity index 50% |
copy from dart/tests/compiler/dart2js_extra/mirrors_used_native_test.dart |
copy to dart/tests/lib/mirrors/mirrors_used_merge_test.dart |
index a546682f0c82ad8145e358df464f8ea016b85000..534c5e71dd2ad7bd495a54afa24d99001495c707 100644 |
--- a/dart/tests/compiler/dart2js_extra/mirrors_used_native_test.dart |
+++ b/dart/tests/lib/mirrors/mirrors_used_merge_test.dart |
@@ -2,13 +2,14 @@ |
// 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. |
-@MirrorsUsed(targets: 'List') |
-import 'dart:mirrors'; |
+/// Test that two MirrorsUsed annotations can be merged with out crashing |
+/// dart2js. |
-import 'package:expect/expect.dart'; |
+@MirrorsUsed(symbols: const ['foo']) |
+@MirrorsUsed(symbols: const ['bar']) |
+import 'dart:mirrors'; |
main() { |
- Expect.equals(3, reflect([1, 2, 3]).getField(#length).reflectee); |
- Expect.throws(() => reflect({"hest": 42}).getField(#length), |
- (e) => e is UnsupportedError); |
+ // Do nothing, just make sure that merging the annotations doesn't crash |
+ // dart2js. |
} |