Index: tests/language/redirecting_factory_reflection_test.dart |
diff --git a/tests/lib/mirrors/typedef_library_test.dart b/tests/language/redirecting_factory_reflection_test.dart |
similarity index 50% |
copy from tests/lib/mirrors/typedef_library_test.dart |
copy to tests/language/redirecting_factory_reflection_test.dart |
index 6549797a49a0fe338b8a0acb0c5d643ef49a896e..af39373979bc72406783fa62c47056de3f644f42 100644 |
--- a/tests/lib/mirrors/typedef_library_test.dart |
+++ b/tests/language/redirecting_factory_reflection_test.dart |
@@ -2,16 +2,21 @@ |
// 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 foo; |
- |
-@MirrorsUsed(targets: const ["foo", "bar"]) |
import 'dart:mirrors'; |
-import 'typedef_library.dart'; |
- |
import 'package:expect/expect.dart'; |
+abstract class A<T> { |
+ get t; |
+ factory A() = B<T, A<T>>; |
+} |
+ |
+class B<X, Y> implements A<X> { |
+ final t; |
+ B() : t = Y; |
+} |
+ |
main() { |
- var barLibrary = currentMirrorSystem().findLibrary(new Symbol("bar")); |
- var gTypedef = barLibrary.declarations[new Symbol("G")]; |
- Expect.equals("G", MirrorSystem.getName(gTypedef.simpleName)); |
+ ClassMirror m = reflectClass(A); |
+ var i = m.newInstance(const Symbol(''), []).reflectee; |
+ Expect.equals(i.t.toString(), 'A'); |
} |