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

Unified Diff: tests/lib_strong/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_strong/mirrors/relation_assignable_test.dart
diff --git a/tests/lib_strong/mirrors/relation_assignable_test.dart b/tests/lib_strong/mirrors/relation_assignable_test.dart
index 970aedf58faa2a77419cafd873deab681f6f78a0..71cd5285ba26a55d002cba104f4c8365f51dd27a 100644
--- a/tests/lib_strong/mirrors/relation_assignable_test.dart
+++ b/tests/lib_strong/mirrors/relation_assignable_test.dart
@@ -9,7 +9,9 @@ import "dart:mirrors";
import "package:expect/expect.dart";
class Superclass {}
+
class Subclass1 extends Superclass {}
+
class Subclass2 extends Superclass {}
typedef bool NumberPredicate(num x);
@@ -21,7 +23,9 @@ typedef int IntegerGenerator();
typedef double DoubleGenerator();
class A<T> {}
+
class B<T> extends A<T> {}
+
class C<T extends num> {}
test(MirrorSystem mirrors) {
@@ -57,7 +61,6 @@ test(MirrorSystem mirrors) {
Expect.isTrue(Super.isAssignableTo(Obj));
Expect.isTrue(Obj.isAssignableTo(Super));
-
// Function typedef - argument type.
TypeMirror Func = coreLibrary.declarations[#Function];
TypedefMirror NumPred = thisLibrary.declarations[#NumberPredicate];
@@ -90,7 +93,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];
@@ -121,7 +123,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;
@@ -153,7 +154,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;
@@ -184,7 +184,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));
@@ -193,7 +192,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));
@@ -202,7 +200,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;
@@ -221,12 +218,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