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

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

Issue 21540002: Remove support for remaining deprecated features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/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();
-}
-""",
- };

Powered by Google App Engine
This is Rietveld 408576698