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

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

Issue 2617743002: Add mirrors tests for Null type. (Closed)
Patch Set: Created 3 years, 11 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 | « tests/lib/mirrors/relation_subclass_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/relation_subtype_test.dart
diff --git a/tests/lib/mirrors/relation_subtype_test.dart b/tests/lib/mirrors/relation_subtype_test.dart
index 9504c8cc4ed7bc1b487f8315047b53447d5eeb0b..ab015ce03c83e914b56515dac6a1233cde491f26 100644
--- a/tests/lib/mirrors/relation_subtype_test.dart
+++ b/tests/lib/mirrors/relation_subtype_test.dart
@@ -33,11 +33,13 @@ test(MirrorSystem mirrors) {
TypeMirror Sub1 = thisLibrary.declarations[#Subclass1];
TypeMirror Sub2 = thisLibrary.declarations[#Subclass2];
TypeMirror Obj = coreLibrary.declarations[#Object];
+ TypeMirror Nul = coreLibrary.declarations[#Null];
Expect.isTrue(Obj.isSubtypeOf(Obj));
Expect.isTrue(Super.isSubtypeOf(Super));
Expect.isTrue(Sub1.isSubtypeOf(Sub1));
Expect.isTrue(Sub2.isSubtypeOf(Sub2));
+ Expect.isTrue(Nul.isSubtypeOf(Nul));
Expect.isTrue(Sub1.isSubtypeOf(Super));
Expect.isFalse(Super.isSubtypeOf(Sub1));
@@ -57,6 +59,10 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Super.isSubtypeOf(Obj));
Expect.isFalse(Obj.isSubtypeOf(Super));
+ Expect.isTrue(Nul.isSubtypeOf(Obj));
+ Expect.isFalse(Obj.isSubtypeOf(Nul));
+ Expect.isTrue(Nul.isSubtypeOf(Super)); // Null type is bottom type.
+ Expect.isFalse(Super.isSubtypeOf(Nul));
// Function typedef - argument type.
TypeMirror Func = coreLibrary.declarations[#Function];
« no previous file with comments | « tests/lib/mirrors/relation_subclass_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698