Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: test_reflectable/test/reflect_type_test.dart

Issue 1181153003: Add `.type` to the transformed InstanceMirror. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Clarify comment Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « reflectable/lib/src/transformer_implementation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ });
}
« no previous file with comments | « reflectable/lib/src/transformer_implementation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698