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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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/lookup_map_test.dart ('k') | tests/compiler/dart2js/loop_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/lookup_member_test.dart
diff --git a/tests/compiler/dart2js/lookup_member_test.dart b/tests/compiler/dart2js/lookup_member_test.dart
index aec363a5a99d0ffb5c6aebeea0505f438f9f75a4..27f49c7390b4885448839788181c79e81fa35965 100644
--- a/tests/compiler/dart2js/lookup_member_test.dart
+++ b/tests/compiler/dart2js/lookup_member_test.dart
@@ -9,7 +9,7 @@ import "package:async_helper/async_helper.dart";
import 'type_test_helper.dart';
import 'package:compiler/src/dart_types.dart';
import "package:compiler/src/elements/elements.dart"
- show Element, ClassElement, MemberSignature, PublicName;
+ show Element, ClassElement, MemberSignature, PublicName;
void main() {
test();
@@ -30,50 +30,49 @@ void test() {
V boz;
}
""").then((env) {
- void expect(InterfaceType receiverType, String memberName,
- DartType expectedType) {
- MemberSignature member = receiverType.lookupInterfaceMember(
- new PublicName(memberName));
- Expect.isNotNull(member);
- DartType memberType = member.type;
- Expect.equals(expectedType, memberType,
- 'Wrong member type for $receiverType.$memberName.');
- }
+ void expect(InterfaceType receiverType, String memberName,
+ DartType expectedType) {
+ MemberSignature member =
+ receiverType.lookupInterfaceMember(new PublicName(memberName));
+ Expect.isNotNull(member);
+ DartType memberType = member.type;
+ Expect.equals(expectedType, memberType,
+ 'Wrong member type for $receiverType.$memberName.');
+ }
- DartType int_ = env['int'];
- DartType String_ = env['String'];
+ DartType int_ = env['int'];
+ DartType String_ = env['String'];
- ClassElement A = env.getElement('A');
- DartType T = A.typeVariables.first;
- DartType A_T = A.thisType;
- expect(A_T, 'foo', T);
+ ClassElement A = env.getElement('A');
+ DartType T = A.typeVariables.first;
+ DartType A_T = A.thisType;
+ expect(A_T, 'foo', T);
- DartType A_int = instantiate(A, [int_]);
- expect(A_int, 'foo', int_);
+ DartType A_int = instantiate(A, [int_]);
+ expect(A_int, 'foo', int_);
- ClassElement B = env.getElement('B');
- DartType S = B.typeVariables.first;
- DartType B_S = B.thisType;
- expect(B_S, 'foo', instantiate(A, [S]));
- expect(B_S, 'bar', S);
+ ClassElement B = env.getElement('B');
+ DartType S = B.typeVariables.first;
+ DartType B_S = B.thisType;
+ expect(B_S, 'foo', instantiate(A, [S]));
+ expect(B_S, 'bar', S);
- DartType B_int = instantiate(B, [int_]);
- expect(B_int, 'foo', A_int);
- expect(B_int, 'bar', int_);
+ DartType B_int = instantiate(B, [int_]);
+ expect(B_int, 'foo', A_int);
+ expect(B_int, 'bar', int_);
- ClassElement C = env.getElement('C');
- DartType U = C.typeVariables.first;
- DartType C_U = C.thisType;
- expect(C_U, 'foo', instantiate(A, [String_]));
- expect(C_U, 'bar', String_);
- expect(C_U, 'baz', U);
- expect(C_U, 'boz', instantiate(B, [U]));
+ ClassElement C = env.getElement('C');
+ DartType U = C.typeVariables.first;
+ DartType C_U = C.thisType;
+ expect(C_U, 'foo', instantiate(A, [String_]));
+ expect(C_U, 'bar', String_);
+ expect(C_U, 'baz', U);
+ expect(C_U, 'boz', instantiate(B, [U]));
- DartType C_int = instantiate(C, [int_]);
- expect(C_int, 'foo', instantiate(A, [String_]));
- expect(C_int, 'bar', String_);
- expect(C_int, 'baz', int_);
- expect(C_int, 'boz', instantiate(B, [int_]));
- }));
+ DartType C_int = instantiate(C, [int_]);
+ expect(C_int, 'foo', instantiate(A, [String_]));
+ expect(C_int, 'bar', String_);
+ expect(C_int, 'baz', int_);
+ expect(C_int, 'boz', instantiate(B, [int_]));
+ }));
}
-
« no previous file with comments | « tests/compiler/dart2js/lookup_map_test.dart ('k') | tests/compiler/dart2js/loop_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698