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

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

Issue 1168393003: Enforce LF line endings in the git database. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 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
Index: tests/compiler/dart2js/type_order_test.dart
diff --git a/tests/compiler/dart2js/type_order_test.dart b/tests/compiler/dart2js/type_order_test.dart
index a3337f333c6ac1560e07dbadcca0587352465048..e4faa0113a4175d7baedfc426a8a979548ba77cb 100644
--- a/tests/compiler/dart2js/type_order_test.dart
+++ b/tests/compiler/dart2js/type_order_test.dart
@@ -1,72 +1,72 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library subtype_test;
-
-import 'package:expect/expect.dart';
-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, TypedefElement;
-
-void main() {
- asyncTest(() => TypeEnvironment.create(r"""
- class A<AT, AS> {}
- typedef BS B<BT, BS>(BT t);
- class C<CT, CS> extends A<CS, CT> {}
- class X {}
- class Y {}
- class Z {}
- """).then((env) {
-
- List types = [];
- DartType add(DartType type) {
- types.add(type);
- return type;
- }
-
- DartType dynamic_ = add(env['dynamic']);
- DartType void_ = add(env['void']);
-
- ClassElement A = env.getElement('A');
- TypedefElement B = env.getElement('B');
- ClassElement C = env.getElement('C');
- DartType X = add(env['X']);
- DartType Y = add(env['Y']);
- DartType Z = add(env['Z']);
-
- InterfaceType A_this = add(A.thisType);
- InterfaceType A_raw = add(A.rawType);
- TypeVariableType AT = add(A_this.typeArguments[0]);
- TypeVariableType AS = add(A_this.typeArguments[1]);
- InterfaceType A_X_Y = add(instantiate(A, [X, Y]));
- InterfaceType A_Y_X = add(instantiate(A, [Y, X]));
-
- TypedefType B_this = add(B.computeType(env.compiler));
- TypedefType B_raw = add(B.rawType);
- TypeVariableType BT = add(B_this.typeArguments[0]);
- TypeVariableType BS = add(B_this.typeArguments[1]);
- FunctionType B_this_alias = add(B.alias);
- TypedefType B_X_Y = add(instantiate(B, [X, Y]));
- FunctionType B_X_Y_alias = add(B_X_Y.unalias(env.compiler));
- TypedefType B_Y_X = add(instantiate(B, [Y, X]));
- FunctionType B_Y_X_alias = add(B_Y_X.unalias(env.compiler));
-
- InterfaceType C_this = add(C.thisType);
- InterfaceType C_raw = add(C.rawType);
- TypeVariableType CT = add(C_this.typeArguments[0]);
- TypeVariableType CS = add(C_this.typeArguments[1]);
-
- Expect.listEquals(
- [void_, dynamic_,
- A_raw, A_this, A_X_Y, A_Y_X, AT, AS,
- B_raw, B_this, B_X_Y, B_Y_X, BT, BS,
- C_raw, C_this, CT, CS,
- X, Y, Z,
- B_this_alias, B_Y_X_alias, B_X_Y_alias,
- ],
- Types.sorted(types));
- }));
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library subtype_test;
+
+import 'package:expect/expect.dart';
+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, TypedefElement;
+
+void main() {
+ asyncTest(() => TypeEnvironment.create(r"""
+ class A<AT, AS> {}
+ typedef BS B<BT, BS>(BT t);
+ class C<CT, CS> extends A<CS, CT> {}
+ class X {}
+ class Y {}
+ class Z {}
+ """).then((env) {
+
+ List types = [];
+ DartType add(DartType type) {
+ types.add(type);
+ return type;
+ }
+
+ DartType dynamic_ = add(env['dynamic']);
+ DartType void_ = add(env['void']);
+
+ ClassElement A = env.getElement('A');
+ TypedefElement B = env.getElement('B');
+ ClassElement C = env.getElement('C');
+ DartType X = add(env['X']);
+ DartType Y = add(env['Y']);
+ DartType Z = add(env['Z']);
+
+ InterfaceType A_this = add(A.thisType);
+ InterfaceType A_raw = add(A.rawType);
+ TypeVariableType AT = add(A_this.typeArguments[0]);
+ TypeVariableType AS = add(A_this.typeArguments[1]);
+ InterfaceType A_X_Y = add(instantiate(A, [X, Y]));
+ InterfaceType A_Y_X = add(instantiate(A, [Y, X]));
+
+ TypedefType B_this = add(B.computeType(env.compiler));
+ TypedefType B_raw = add(B.rawType);
+ TypeVariableType BT = add(B_this.typeArguments[0]);
+ TypeVariableType BS = add(B_this.typeArguments[1]);
+ FunctionType B_this_alias = add(B.alias);
+ TypedefType B_X_Y = add(instantiate(B, [X, Y]));
+ FunctionType B_X_Y_alias = add(B_X_Y.unalias(env.compiler));
+ TypedefType B_Y_X = add(instantiate(B, [Y, X]));
+ FunctionType B_Y_X_alias = add(B_Y_X.unalias(env.compiler));
+
+ InterfaceType C_this = add(C.thisType);
+ InterfaceType C_raw = add(C.rawType);
+ TypeVariableType CT = add(C_this.typeArguments[0]);
+ TypeVariableType CS = add(C_this.typeArguments[1]);
+
+ Expect.listEquals(
+ [void_, dynamic_,
+ A_raw, A_this, A_X_Y, A_Y_X, AT, AS,
+ B_raw, B_this, B_X_Y, B_Y_X, BT, BS,
+ C_raw, C_this, CT, CS,
+ X, Y, Z,
+ B_this_alias, B_Y_X_alias, B_X_Y_alias,
+ ],
+ Types.sorted(types));
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart ('k') | tests/compiler/dart2js/type_promotion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698