Index: test_reflectable/test/reflect_type_test.dart |
diff --git a/test_reflectable/test/reflect_type_test.dart b/test_reflectable/test/reflect_type_test.dart |
index b922e462a6ad8ddd4aa7197a75265da229333c04..db34a6ee2ef5ca882b8701453401a1d1186c4054 100644 |
--- a/test_reflectable/test/reflect_type_test.dart |
+++ b/test_reflectable/test/reflect_type_test.dart |
@@ -17,11 +17,17 @@ class A {} |
class B {} |
main() { |
+ const myReflectable = const MyReflectable(); |
test("reflectType", () { |
- ClassMirror cm = const MyReflectable().reflectType(A); |
+ ClassMirror cm = myReflectable.reflectType(A); |
expect(cm, new isInstanceOf<ClassMirror>()); |
expect(cm.simpleName, "A"); |
expect(() => const MyReflectable().reflectType(B), |
throwsA(new isInstanceOf<NoSuchCapabilityError>())); |
}); |
+ test("InstanceMirror.type", () { |
+ ClassMirror cm = const MyReflectable().reflectType(A); |
+ ClassMirror cm2 = myReflectable.reflect(new A()).type; |
+ expect(cm.qualifiedName, cm2.qualifiedName); |
+ }); |
} |