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

Unified Diff: tests/lib_strong/mirrors/generic_interface_test.dart

Issue 2770063002: Revert "Format all multitests" (Closed)
Patch Set: Created 3 years, 9 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_interface_test.dart
diff --git a/tests/lib_strong/mirrors/generic_interface_test.dart b/tests/lib_strong/mirrors/generic_interface_test.dart
index 053569c9f7e6c870cf1d9d005c7cdee59ae3c43f..0875a225155fe863f5e78b5ac3d72087f7cfd771 100644
--- a/tests/lib_strong/mirrors/generic_interface_test.dart
+++ b/tests/lib_strong/mirrors/generic_interface_test.dart
@@ -11,25 +11,19 @@ import 'package:expect/expect.dart';
import 'generics_helper.dart';
class Interface<T> {}
-
class Bounded<S extends num> {}
class Fixed implements Interface<int> {}
-
class Generic<R> implements Interface<R> {}
class Bienbounded implements Bounded<int> {}
-
class Malbounded implements Bounded<String> {} // //# 01: static type warning
class FBounded implements Interface<FBounded> {}
class Mixin {}
-
class FixedMixinApplication = Object with Mixin implements Interface<int>;
class GenericMixinApplication<X> = Object with Mixin implements Interface<X>;
-
class FixedClass extends Object with Mixin implements Interface<int> {}
-
class GenericClass<Y> extends Object with Mixin implements Interface<Y> {}
main() {
@@ -40,26 +34,19 @@ main() {
ClassMirror interfaceOfInt = reflectClass(Fixed).superinterfaces.single;
ClassMirror interfaceOfR = reflectClass(Generic).superinterfaces.single;
- ClassMirror interfaceOfBool =
- reflect(new Generic<bool>()).type.superinterfaces.single;
+ ClassMirror interfaceOfBool = reflect(new Generic<bool>()).type.superinterfaces.single;
ClassMirror boundedOfInt = reflectClass(Bienbounded).superinterfaces.single;
ClassMirror boundedOfString = reflectClass(Malbounded).superinterfaces.single; // //# 01: continued
- ClassMirror interfaceOfFBounded =
- reflectClass(FBounded).superinterfaces.single;
-
- ClassMirror interfaceOfInt2 =
- reflectClass(FixedMixinApplication).superinterfaces.single;
- ClassMirror interfaceOfX =
- reflectClass(GenericMixinApplication).superinterfaces.single;
- ClassMirror interfaceOfDouble = reflect(new GenericMixinApplication<double>())
- .type
- .superinterfaces
- .single;
+ ClassMirror interfaceOfFBounded = reflectClass(FBounded).superinterfaces.single;
+
+ ClassMirror interfaceOfInt2 = reflectClass(FixedMixinApplication).superinterfaces.single;
+ ClassMirror interfaceOfX = reflectClass(GenericMixinApplication).superinterfaces.single;
+ ClassMirror interfaceOfDouble = reflect(new GenericMixinApplication<double>()).type.superinterfaces.single;
ClassMirror interfaceOfInt3 = reflectClass(FixedClass).superinterfaces.single;
ClassMirror interfaceOfY = reflectClass(GenericClass).superinterfaces.single;
- ClassMirror interfaceOfDouble2 =
- reflect(new GenericClass<double>()).type.superinterfaces.single;
+ ClassMirror interfaceOfDouble2 = reflect(new GenericClass<double>()).type.superinterfaces.single;
+
Expect.isTrue(interfaceDecl.isOriginalDeclaration);
Expect.isTrue(boundedDecl.isOriginalDeclaration);
@@ -77,13 +64,12 @@ main() {
Expect.isFalse(interfaceOfY.isOriginalDeclaration);
Expect.isFalse(interfaceOfDouble2.isOriginalDeclaration);
+
TypeVariableMirror tFromInterface = interfaceDecl.typeVariables.single;
TypeVariableMirror sFromBounded = boundedDecl.typeVariables.single;
TypeVariableMirror rFromGeneric = reflectClass(Generic).typeVariables.single;
- TypeVariableMirror xFromGenericMixinApplication =
- reflectClass(GenericMixinApplication).typeVariables.single;
- TypeVariableMirror yFromGenericClass =
- reflectClass(GenericClass).typeVariables.single;
+ TypeVariableMirror xFromGenericMixinApplication = reflectClass(GenericMixinApplication).typeVariables.single;
+ TypeVariableMirror yFromGenericClass = reflectClass(GenericClass).typeVariables.single;
Expect.equals(reflectClass(Object), tFromInterface.upperBound);
Expect.equals(reflectClass(num), sFromBounded.upperBound);
@@ -91,6 +77,7 @@ main() {
Expect.equals(reflectClass(Object), xFromGenericMixinApplication.upperBound);
Expect.equals(reflectClass(Object), yFromGenericClass.upperBound);
+
typeParameters(interfaceDecl, [#T]);
typeParameters(boundedDecl, [#S]);
typeParameters(interfaceOfInt, [#T]);
« no previous file with comments | « tests/lib_strong/mirrors/generic_f_bounded_test.dart ('k') | tests/lib_strong/mirrors/generic_superclass_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698