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

Unified Diff: tests/lib_strong/mirrors/generic_function_typedef_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/generic_function_typedef_test.dart
diff --git a/tests/lib_strong/mirrors/generic_function_typedef_test.dart b/tests/lib_strong/mirrors/generic_function_typedef_test.dart
index 7f11d2213949f908397510c306903b2a2e84c2ee..e119d519079b6074e42fd2d3a99911656397fe37 100644
--- a/tests/lib_strong/mirrors/generic_function_typedef_test.dart
+++ b/tests/lib_strong/mirrors/generic_function_typedef_test.dart
@@ -25,13 +25,21 @@ reflectTypeDeclaration(t) => reflectType(t).originalDeclaration;
main() {
TypeMirror dynamicMirror = currentMirrorSystem().dynamicType;
- TypedefMirror predicateOfNum = (reflectClass(C).declarations[#predicateOfNum] as VariableMirror).type;
- TypedefMirror transformOfString = (reflectClass(C).declarations[#transformOfString] as VariableMirror).type;
- TypedefMirror transformOfR = (reflectClass(C).declarations[#transformOfR] as VariableMirror).type;
- TypedefMirror transformOfDouble = (reflect(new C<double>()).type.declarations[#transformOfR] as VariableMirror).type;
-
- TypeVariableMirror tFromGenericPredicate = reflectTypeDeclaration(GenericPredicate).typeVariables[0];
- TypeVariableMirror sFromGenericTransform = reflectTypeDeclaration(GenericTransform).typeVariables[0];
+ TypedefMirror predicateOfNum =
+ (reflectClass(C).declarations[#predicateOfNum] as VariableMirror).type;
+ TypedefMirror transformOfString =
+ (reflectClass(C).declarations[#transformOfString] as VariableMirror).type;
+ TypedefMirror transformOfR =
+ (reflectClass(C).declarations[#transformOfR] as VariableMirror).type;
+ TypedefMirror transformOfDouble = (reflect(new C<double>())
+ .type
+ .declarations[#transformOfR] as VariableMirror)
+ .type;
+
+ TypeVariableMirror tFromGenericPredicate =
+ reflectTypeDeclaration(GenericPredicate).typeVariables[0];
+ TypeVariableMirror sFromGenericTransform =
+ reflectTypeDeclaration(GenericTransform).typeVariables[0];
TypeVariableMirror rFromC = reflectClass(C).typeVariables[0];
// Typedefs.
@@ -51,13 +59,14 @@ main() {
typeArguments(transformOfR, [rFromC]);
typeArguments(transformOfDouble, [reflectClass(double)]);
- Expect.isTrue(reflectTypeDeclaration(NonGenericPredicate).isOriginalDeclaration);
+ Expect.isTrue(
+ reflectTypeDeclaration(NonGenericPredicate).isOriginalDeclaration);
Expect.isTrue(reflectTypeDeclaration(GenericPredicate).isOriginalDeclaration);
- Expect.isTrue(reflectTypeDeclaration(GenericTransform).isOriginalDeclaration);
- Expect.isFalse(predicateOfNum.isOriginalDeclaration);
- Expect.isFalse(transformOfString.isOriginalDeclaration);
- Expect.isFalse(transformOfR.isOriginalDeclaration);
- Expect.isFalse(transformOfDouble.isOriginalDeclaration);
+ Expect.isTrue(reflectTypeDeclaration(GenericTransform).isOriginalDeclaration);
+ Expect.isFalse(predicateOfNum.isOriginalDeclaration);
+ Expect.isFalse(transformOfString.isOriginalDeclaration);
+ Expect.isFalse(transformOfR.isOriginalDeclaration);
+ Expect.isFalse(transformOfDouble.isOriginalDeclaration);
// Function types.
typeParameters(reflectTypeDeclaration(NonGenericPredicate).referent, []);
@@ -77,42 +86,40 @@ main() {
typeArguments(transformOfDouble.referent, []);
// Function types are always non-generic. Only the typedef is generic.
- Expect.isTrue(reflectTypeDeclaration(NonGenericPredicate).referent.isOriginalDeclaration);
- Expect.isTrue(reflectTypeDeclaration(GenericPredicate).referent.isOriginalDeclaration);
- Expect.isTrue(reflectTypeDeclaration(GenericTransform).referent.isOriginalDeclaration);
- Expect.isTrue(predicateOfNum.referent.isOriginalDeclaration);
- Expect.isTrue(transformOfString.referent.isOriginalDeclaration);
+ Expect.isTrue(reflectTypeDeclaration(NonGenericPredicate)
+ .referent
+ .isOriginalDeclaration);
+ Expect.isTrue(
+ reflectTypeDeclaration(GenericPredicate).referent.isOriginalDeclaration);
+ Expect.isTrue(
+ reflectTypeDeclaration(GenericTransform).referent.isOriginalDeclaration);
+ Expect.isTrue(predicateOfNum.referent.isOriginalDeclaration);
+ Expect.isTrue(transformOfString.referent.isOriginalDeclaration);
Expect.isTrue(transformOfR.referent.isOriginalDeclaration);
- Expect.isTrue(transformOfDouble.referent.isOriginalDeclaration);
+ Expect.isTrue(transformOfDouble.referent.isOriginalDeclaration);
Expect.equals(reflectClass(num),
- reflectTypeDeclaration(NonGenericPredicate).referent.parameters[0].type);
+ reflectTypeDeclaration(NonGenericPredicate).referent.parameters[0].type);
Expect.equals(tFromGenericPredicate,
- reflectTypeDeclaration(GenericPredicate).referent.parameters[0].type);
+ reflectTypeDeclaration(GenericPredicate).referent.parameters[0].type);
Expect.equals(sFromGenericTransform,
- reflectTypeDeclaration(GenericTransform).referent.parameters[0].type);
+ reflectTypeDeclaration(GenericTransform).referent.parameters[0].type);
- Expect.equals(reflectClass(num),
- predicateOfNum.referent.parameters[0].type);
- Expect.equals(reflectClass(String),
- transformOfString.referent.parameters[0].type);
- Expect.equals(rFromC,
- transformOfR.referent.parameters[0].type);
- Expect.equals(reflectClass(double),
- transformOfDouble.referent.parameters[0].type);
+ Expect.equals(reflectClass(num), predicateOfNum.referent.parameters[0].type);
+ Expect.equals(
+ reflectClass(String), transformOfString.referent.parameters[0].type);
+ Expect.equals(rFromC, transformOfR.referent.parameters[0].type);
+ Expect.equals(
+ reflectClass(double), transformOfDouble.referent.parameters[0].type);
Expect.equals(reflectClass(bool),
- reflectTypeDeclaration(NonGenericPredicate).referent.returnType);
+ reflectTypeDeclaration(NonGenericPredicate).referent.returnType);
Expect.equals(reflectClass(bool),
- reflectTypeDeclaration(GenericPredicate).referent.returnType);
+ reflectTypeDeclaration(GenericPredicate).referent.returnType);
Expect.equals(sFromGenericTransform,
- reflectTypeDeclaration(GenericTransform).referent.returnType);
- Expect.equals(reflectClass(bool),
- predicateOfNum.referent.returnType);
- Expect.equals(reflectClass(String),
- transformOfString.referent.returnType);
- Expect.equals(rFromC,
- transformOfR.referent.returnType);
- Expect.equals(reflectClass(double),
- transformOfDouble.referent.returnType);
+ reflectTypeDeclaration(GenericTransform).referent.returnType);
+ Expect.equals(reflectClass(bool), predicateOfNum.referent.returnType);
+ Expect.equals(reflectClass(String), transformOfString.referent.returnType);
+ Expect.equals(rFromC, transformOfR.referent.returnType);
+ Expect.equals(reflectClass(double), transformOfDouble.referent.returnType);
}

Powered by Google App Engine
This is Rietveld 408576698