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

Unified Diff: tests/lib/mirrors/reflected_type_test.dart

Issue 103713006: Implement ClassMirror.reflectedType in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « tests/lib/lib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/reflected_type_test.dart
diff --git a/tests/lib/mirrors/reflected_type_test.dart b/tests/lib/mirrors/reflected_type_test.dart
index 70ebcf39043550b7f2310453bc6fcaf9fdebcfd4..a574434f1b2c273f2939fb5814e3139a0c5b0a77 100644
--- a/tests/lib/mirrors/reflected_type_test.dart
+++ b/tests/lib/mirrors/reflected_type_test.dart
@@ -19,17 +19,27 @@ class H<A,B,C> {}
expectReflectedType(classMirror, expectedType) {
if (expectedType == null) {
- Expect.isFalse(classMirror.hasReflectedType);
+ Expect.isFalse(classMirror.hasReflectedType,
+ "$classMirror should not have a reflected type");
Expect.throws(() => classMirror.reflectedType,
- (e) => e is UnsupportedError,
- "Should not have a reflected type");
+ (e) => e is UnsupportedError);
} else {
- Expect.isTrue(classMirror.hasReflectedType);
+ Expect.isTrue(classMirror.hasReflectedType,
+ "$classMirror should have a reflected type");
Expect.equals(expectedType, classMirror.reflectedType);
}
}
main() {
+ // Basic non-generic types, including intercepted types.
+ expectReflectedType(reflectClass(Object), Object);
+ expectReflectedType(reflectClass(String), String);
+ expectReflectedType(reflectClass(int), int);
+ expectReflectedType(reflectClass(num), num);
+ expectReflectedType(reflectClass(double), double);
+ expectReflectedType(reflectClass(bool), bool);
+ expectReflectedType(reflectClass(Null), Null);
+
// Declarations.
expectReflectedType(reflectClass(A), null);
expectReflectedType(reflectClass(B), B);
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698