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

Side by Side Diff: tests/compiler/dart2js/deprecated_features_test.dart

Issue 21013004: Remove support for getters with parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Test that deprecated language features are diagnosed correctly. 5 // Test that deprecated language features are diagnosed correctly.
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart'; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // offset<source>:path:kind: message 47 // offset<source>:path:kind: message
48 // 48 //
49 // "offset" is the character offset from the beginning of TEST_SOURCE. 49 // "offset" is the character offset from the beginning of TEST_SOURCE.
50 // "source" is the substring of TEST_SOURCE that the compiler is 50 // "source" is the substring of TEST_SOURCE that the compiler is
51 // indicating as erroneous. 51 // indicating as erroneous.
52 // "path" is the URI path. 52 // "path" is the URI path.
53 // "kind" is the result of calling toString on a [Diagnostic] object. 53 // "kind" is the result of calling toString on a [Diagnostic] object.
54 // "message" is the expected message as a [String]. This is a 54 // "message" is the expected message as a [String]. This is a
55 // short-term solution and should eventually changed to include 55 // short-term solution and should eventually changed to include
56 // a symbolic reference to a MessageKind. 56 // a symbolic reference to a MessageKind.
57 "19<()>::${deprecatedMessage('getter parameters')}\n", 57 "",
58 messages.toString()); 58 messages.toString());
59 } 59 }
60 60
61 deprecatedMessage(feature) { 61 deprecatedMessage(feature) {
62 return 62 return
63 "warning: Warning: Deprecated language feature, $feature" 63 "warning: Warning: Deprecated language feature, $feature"
64 ", will be removed in a future Dart milestone."; 64 ", will be removed in a future Dart milestone.";
65 } 65 }
66 66
67 const Map<String, String> TEST_SOURCE = 67 const Map<String, String> TEST_SOURCE =
68 const <String, String>{ '': """ 68 const <String, String>{ '': """
69 class Foo { 69 class Foo {
70 get x() => null;
71 } 70 }
72 71
73 main() { 72 main() {
74 var a = new Foo(); 73 var a = new Foo();
75 } 74 }
76 """, 75 """,
77 }; 76 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698