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

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

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/lib/mirrors/relation_assignable_test.dart
diff --git a/tests/lib/mirrors/relation_assignable_test.dart b/tests/lib/mirrors/relation_assignable_test.dart
index d59d6236ce5c868dc665bd33aa98adf545b0855c..e7843d5b1daf9e05bd68286b50c7fd6a13b2100a 100644
--- a/tests/lib/mirrors/relation_assignable_test.dart
+++ b/tests/lib/mirrors/relation_assignable_test.dart
@@ -10,7 +10,9 @@ import "dart:mirrors";
import "package:expect/expect.dart";
class Superclass {}
+
class Subclass1 extends Superclass {}
+
class Subclass2 extends Superclass {}
typedef bool NumberPredicate(num x);
@@ -22,7 +24,9 @@ typedef int IntegerGenerator();
typedef double DoubleGenerator();
class A<T> {}
+
class B<T> extends A<T> {}
+
class C<T extends num> {}
test(MirrorSystem mirrors) {
@@ -62,7 +66,7 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Nul.isAssignableTo(Obj));
Expect.isTrue(Obj.isAssignableTo(Nul));
- Expect.isTrue(Nul.isAssignableTo(Super)); // Null type is bottom type.
+ Expect.isTrue(Nul.isAssignableTo(Super)); // Null type is bottom type.
Expect.isTrue(Super.isAssignableTo(Nul));
// Function typedef - argument type.
@@ -97,7 +101,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Obj.isAssignableTo(IntPred));
Expect.isTrue(Obj.isAssignableTo(DubPred));
-
// Function typedef - return type.
TypedefMirror NumGen = thisLibrary.declarations[#NumberGenerator];
TypedefMirror IntGen = thisLibrary.declarations[#IntegerGenerator];
@@ -128,7 +131,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Obj.isAssignableTo(IntGen));
Expect.isTrue(Obj.isAssignableTo(DubGen));
-
// Function - argument type.
TypeMirror NumPredRef = NumPred.referent;
TypeMirror IntPredRef = IntPred.referent;
@@ -160,7 +162,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Obj.isAssignableTo(IntPredRef));
Expect.isTrue(Obj.isAssignableTo(DubPredRef));
-
// Function - return type.
TypeMirror NumGenRef = NumGen.referent;
TypeMirror IntGenRef = IntGen.referent;
@@ -191,7 +192,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Obj.isAssignableTo(IntGenRef));
Expect.isTrue(Obj.isAssignableTo(DubGenRef));
-
// Function typedef / function.
Expect.isTrue(NumPred.isAssignableTo(NumPredRef));
Expect.isTrue(IntPred.isAssignableTo(IntPredRef));
@@ -200,7 +200,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(IntPredRef.isAssignableTo(IntPred));
Expect.isTrue(DubPredRef.isAssignableTo(DubPred));
-
// Function typedef / function.
Expect.isTrue(NumGen.isAssignableTo(NumGenRef));
Expect.isTrue(IntGen.isAssignableTo(IntGenRef));
@@ -209,7 +208,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(IntGenRef.isAssignableTo(IntGen));
Expect.isTrue(DubGenRef.isAssignableTo(DubGen));
-
// Type variable.
TypeMirror TFromA =
(thisLibrary.declarations[#A] as ClassMirror).typeVariables.single;
@@ -228,12 +226,11 @@ test(MirrorSystem mirrors) {
Expect.isFalse(TFromB.isAssignableTo(TFromC));
Expect.isFalse(TFromC.isAssignableTo(TFromA));
Expect.isFalse(TFromC.isAssignableTo(TFromB));
-
+
TypeMirror Num = coreLibrary.declarations[#num];
Expect.isTrue(TFromC.isAssignableTo(Num));
Expect.isTrue(Num.isAssignableTo(TFromC));
-
// dynamic & void.
TypeMirror Dynamic = mirrors.dynamicType;
Expect.isTrue(Dynamic.isAssignableTo(Dynamic));

Powered by Google App Engine
This is Rietveld 408576698