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

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

Issue 12079098: Revert "Take type arguments into account in interface type subtype check." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/type_substitution_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_test_helper.dart
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
deleted file mode 100644
index 631faba9bfeae1518d2c9d4ac8f724ffbd6a77f0..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// 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 type_test_helper;
-
-import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";
-import '../../../sdk/lib/_internal/compiler/implementation/dart_types.dart';
-import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart";
-import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart";
-import "../../../sdk/lib/_internal/compiler/implementation/util/util.dart";
-import "compiler_helper.dart";
-import "dart:uri";
-
-InterfaceType instantiate(ClassElement element, List<DartType> arguments) {
- return new InterfaceType(element, new Link<DartType>.fromList(arguments));
-}
-
-class TypeEnvironment {
- final Compiler compiler;
-
- factory TypeEnvironment(String source) {
- var uri = new Uri.fromComponents(scheme: 'source');
- Compiler compiler = compilerFor('''
- main() {}
- $source''',
- uri);
- compiler.runCompiler(uri);
- return new TypeEnvironment._(compiler);
- }
-
- TypeEnvironment._(Compiler this.compiler);
-
- Element getElement(String name) {
- var element = findElement(compiler, name);
- Expect.isNotNull(element);
- if (identical(element.kind, ElementKind.CLASS)) {
- element.ensureResolved(compiler);
- }
- return element;
- }
-
- DartType getElementType(String name) {
- return getElement(name).computeType(compiler);
- }
-
- DartType operator[] (String name) {
- if (name == 'dynamic') return compiler.types.dynamicType;
- return getElementType(name);
- }
-
- bool isSubtype(DartType T, DartType S) {
- return compiler.types.isSubtype(T, S);
- }
-}
« no previous file with comments | « tests/compiler/dart2js/type_substitution_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698