| Index: tests/lib/mirrors/class_mirror_type_variables_test.dart
|
| diff --git a/tests/lib/mirrors/class_mirror_type_variables_test.dart b/tests/lib/mirrors/class_mirror_type_variables_test.dart
|
| index 2a3ea7ef7a47a2d250029d27b0d313f91c3bcfb4..ee7baf95b8def14d0b03a87d9c43dd527904cea4 100644
|
| --- a/tests/lib/mirrors/class_mirror_type_variables_test.dart
|
| +++ b/tests/lib/mirrors/class_mirror_type_variables_test.dart
|
| @@ -6,44 +6,15 @@ import "dart:mirrors";
|
|
|
| import "package:expect/expect.dart";
|
|
|
| -class NoTypeParams {}
|
| -class A<T, S extends String> {}
|
| -class B<Z extends B<Z>> {}
|
| class C<R,S,T> {
|
| R foo(R r) => r;
|
| S bar(S s) => s;
|
| T baz(T t) => t;
|
| }
|
|
|
| -testNoTypeParams() {
|
| - ClassMirror cm = reflectClass(NoTypeParams);
|
| - Expect.equals(cm.typeVariables.length, 0);
|
| -}
|
| -
|
| -void testA() {
|
| - ClassMirror a = reflectClass(A);
|
| - Expect.equals(2, a.typeVariables.length);
|
| -
|
| - TypeVariableMirror aT = a.typeVariables[0];
|
| - TypeVariableMirror aS = a.typeVariables[1];
|
| - TypeMirror aTBound = aT.upperBound.originalDeclaration;
|
| - TypeMirror aSBound = aS.upperBound.originalDeclaration;
|
| -
|
| - Expect.equals(reflectClass(Object), aTBound);
|
| - Expect.equals(reflectClass(String), aSBound);
|
| -}
|
| -
|
| -void testB() {
|
| - ClassMirror b = reflectClass(B);
|
| - Expect.equals(1, b.typeVariables.length);
|
| -
|
| - TypeVariableMirror bZ = b.typeVariables[0];
|
| - ClassMirror bZBound = bZ.upperBound.originalDeclaration;
|
| - Expect.equals(b, bZBound);
|
| - Expect.equals(bZ, bZBound.typeVariables[0]);
|
| -}
|
| +class NoTypeParams {}
|
|
|
| -testC() {
|
| +main() {
|
| ClassMirror cm;
|
| cm = reflectClass(C);
|
| Expect.equals(3, cm.typeVariables.length);
|
| @@ -54,11 +25,6 @@ testC() {
|
| Expect.equals(#R, values.elementAt(0).simpleName);
|
| Expect.equals(#S, values.elementAt(1).simpleName);
|
| Expect.equals(#T, values.elementAt(2).simpleName);
|
| + cm = reflectClass(NoTypeParams);
|
| + Expect.equals(cm.typeVariables.length, 0);
|
| }
|
| -
|
| -main() {
|
| - testNoTypeParams();
|
| - testA();
|
| - testB();
|
| - testC();
|
| -}
|
|
|