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

Unified Diff: tests/compiler/dart2js/mixin_typevariable_test.dart

Issue 177963002: Use List instead of Link in the type system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 6 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
« no previous file with comments | « tests/compiler/dart2js/members_test.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mixin_typevariable_test.dart
diff --git a/tests/compiler/dart2js/mixin_typevariable_test.dart b/tests/compiler/dart2js/mixin_typevariable_test.dart
index 47bca492aeed9e05440b0d263f797814e3479aac..c7ffcc479fb28e326a39b3508c5c85f1801b4e1d 100644
--- a/tests/compiler/dart2js/mixin_typevariable_test.dart
+++ b/tests/compiler/dart2js/mixin_typevariable_test.dart
@@ -44,13 +44,13 @@ void testMixinSupertypes() {
void testSupertypes(ClassElement element) {
if (element != Object) {
- Expect.isTrue(element.typeVariables.slowLength() == 1);
+ Expect.isTrue(element.typeVariables.length == 1);
Expect.equals(element,
- element.typeVariables.head.element.enclosingElement);
+ element.typeVariables.first.element.enclosingElement);
}
for (InterfaceType supertype in element.allSupertypesAndSelf.types) {
if (!supertype.typeArguments.isEmpty) {
- Expect.equals(element.typeVariables, supertype.typeArguments,
+ Expect.listEquals(element.typeVariables, supertype.typeArguments,
"Type argument mismatch on supertype $supertype of $element.");
} else {
Expect.equals(Object, supertype.element);
@@ -113,17 +113,17 @@ void testNonTrivialSubstitutions() {
void testSupertypes(ClassElement element,
Map<ClassElement, List<DartType>> typeArguments) {
if (element != Object) {
- Expect.isTrue(element.typeVariables.slowLength() == 1);
+ Expect.isTrue(element.typeVariables.length == 1);
Expect.equals(element,
- element.typeVariables.head.element.enclosingElement);
+ element.typeVariables.first.element.enclosingElement);
}
for (InterfaceType supertype in element.allSupertypesAndSelf.types) {
if (typeArguments.containsKey(supertype.element)) {
Expect.listEquals(typeArguments[supertype.element],
- supertype.typeArguments.toList(),
+ supertype.typeArguments,
"Type argument mismatch on supertype $supertype of $element.");
} else if (!supertype.typeArguments.isEmpty) {
- Expect.equals(element.typeVariables, supertype.typeArguments,
+ Expect.listEquals(element.typeVariables, supertype.typeArguments,
"Type argument mismatch on supertype $supertype of $element.");
} else {
Expect.equals(Object, supertype.element);
@@ -135,24 +135,24 @@ void testNonTrivialSubstitutions() {
testSupertypes(C1.superclass, {A: [_dynamic], B: [_dynamic, _dynamic]});
testSupertypes(C2, {A: [_dynamic], B: [_dynamic, _dynamic]});
- DartType D1_T = D1.typeVariables.head;
+ DartType D1_T = D1.typeVariables.first;
testSupertypes(D1, {A: [D1_T], B: [D1_T, instantiate(A, [D1_T])]});
- DartType D1_superclass_T = D1.superclass.typeVariables.head;
+ DartType D1_superclass_T = D1.superclass.typeVariables.first;
testSupertypes(D1.superclass,
{A: [D1_superclass_T],
B: [D1_superclass_T, instantiate(A, [D1_superclass_T])]});
- DartType D2_T = D2.typeVariables.head;
+ DartType D2_T = D2.typeVariables.first;
testSupertypes(D2, {A: [D2_T], B: [D2_T, instantiate(A, [D2_T])]});
testSupertypes(E1, {A: [_], B: [_, instantiate(A, [_])]});
testSupertypes(E1.superclass, {A: [_], B: [_, instantiate(A, [_])]});
testSupertypes(E2, {A: [_], B: [_, instantiate(A, [_])]});
- DartType F1_T = F1.typeVariables.head;
+ DartType F1_T = F1.typeVariables.first;
testSupertypes(F1, {A: [_], B: [_, instantiate(B, [F1_T, _])]});
- DartType F1_superclass_T = F1.superclass.typeVariables.head;
+ DartType F1_superclass_T = F1.superclass.typeVariables.first;
testSupertypes(F1.superclass, {A: [_], B: [_, instantiate(B, [F1_superclass_T, _])]});
- DartType F2_T = F2.typeVariables.head;
+ DartType F2_T = F2.typeVariables.first;
testSupertypes(F2, {A: [_], B: [_, instantiate(B, [F2_T, _])]});
}));
}
« no previous file with comments | « tests/compiler/dart2js/members_test.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698