| Index: tests/compiler/dart2js/deprecated_features_test.dart
|
| diff --git a/tests/compiler/dart2js/deprecated_features_test.dart b/tests/compiler/dart2js/deprecated_features_test.dart
|
| deleted file mode 100644
|
| index 9e39e7b9816be610ee15e30cab93355d747b7ebd..0000000000000000000000000000000000000000
|
| --- a/tests/compiler/dart2js/deprecated_features_test.dart
|
| +++ /dev/null
|
| @@ -1,76 +0,0 @@
|
| -// Copyright (c) 2012, 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.
|
| -
|
| -// Test that deprecated language features are diagnosed correctly.
|
| -
|
| -import "package:expect/expect.dart";
|
| -import 'dart:async';
|
| -
|
| -import '../../../sdk/lib/_internal/compiler/compiler.dart';
|
| -import '../../utils/dummy_compiler_test.dart' as dummy;
|
| -
|
| -main() {
|
| - StringBuffer messages = new StringBuffer();
|
| - void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
|
| - if (kind == Diagnostic.VERBOSE_INFO) return;
|
| - if (identical(kind.name, 'source map')) return;
|
| - if (uri == null) {
|
| - messages.write('$kind: $message\n');
|
| - } else {
|
| - Expect.equals('main:${uri.path}', '$uri');
|
| - String source = TEST_SOURCE[uri.path];
|
| - Expect.isNotNull(source);
|
| - messages.write('$begin<${source.substring(begin, end)}>:${uri.path}:'
|
| - '$kind: $message\n');
|
| - }
|
| - }
|
| -
|
| - Future<String> provider(Uri uri) {
|
| - if (uri.scheme != "main") return dummy.provider(uri);
|
| - String source = TEST_SOURCE[uri.path];
|
| - Expect.isNotNull(source);
|
| - return new Future<String>.value(source);
|
| - }
|
| -
|
| - String code = deprecatedFutureValue(
|
| - compile(new Uri(scheme: 'main'),
|
| - new Uri(scheme: 'lib', path: '/'),
|
| - new Uri(scheme: 'package', path: '/'),
|
| - provider, handler));
|
| - if (code == null) {
|
| - throw 'Compilation failed: ${messages}';
|
| - }
|
| - Expect.stringEquals(
|
| - // This string is composed of lines of the following format:
|
| - //
|
| - // offset<source>:path:kind: message
|
| - //
|
| - // "offset" is the character offset from the beginning of TEST_SOURCE.
|
| - // "source" is the substring of TEST_SOURCE that the compiler is
|
| - // indicating as erroneous.
|
| - // "path" is the URI path.
|
| - // "kind" is the result of calling toString on a [Diagnostic] object.
|
| - // "message" is the expected message as a [String]. This is a
|
| - // short-term solution and should eventually changed to include
|
| - // a symbolic reference to a MessageKind.
|
| - "",
|
| - messages.toString());
|
| -}
|
| -
|
| -deprecatedMessage(feature) {
|
| - return
|
| - "warning: Warning: Deprecated language feature, $feature"
|
| - ", will be removed in a future Dart milestone.";
|
| -}
|
| -
|
| -const Map<String, String> TEST_SOURCE =
|
| - const <String, String>{ '': """
|
| -class Foo {
|
| -}
|
| -
|
| -main() {
|
| - var a = new Foo();
|
| -}
|
| -""",
|
| - };
|
|
|