| OLD | NEW |
| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 "0<#library('test');>::${deprecatedMessage('# tags')}\n" | 57 "0<#library('test');>::${deprecatedMessage('# tags')}\n" |
| 58 "19<part 'part.dart';>::${deprecatedMessage('missing part-of tag')}\n" | 58 "19<part 'part.dart';>::${deprecatedMessage('missing part-of tag')}\n" |
| 59 "0<>:/part.dart:info: Note: This file has no part-of tag, but it is being" | 59 "0<>:/part.dart:info: Note: This file has no part-of tag, but it is being" |
| 60 " used as a part.\n" | 60 " used as a part.\n" |
| 61 "57<()>::${deprecatedMessage('getter parameters')}\n", | 61 "57<()>::${deprecatedMessage('getter parameters')}\n", |
| 62 messages.toString()); | 62 messages.toString()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 deprecatedMessage(feature) { | 65 deprecatedMessage(feature) { |
| 66 return | 66 return |
| 67 "warning: Warning: deprecated language feature, $feature" | 67 "warning: Warning: Deprecated language feature, $feature" |
| 68 ", will be removed in a future Dart milestone."; | 68 ", will be removed in a future Dart milestone."; |
| 69 } | 69 } |
| 70 | 70 |
| 71 const Map<String, String> TEST_SOURCE = | 71 const Map<String, String> TEST_SOURCE = |
| 72 const <String, String>{ '': """ | 72 const <String, String>{ '': """ |
| 73 #library('test'); | 73 #library('test'); |
| 74 | 74 |
| 75 part 'part.dart'; | 75 part 'part.dart'; |
| 76 | 76 |
| 77 class Foo { | 77 class Foo { |
| 78 get x() => null; | 78 get x() => null; |
| 79 } | 79 } |
| 80 | 80 |
| 81 main() { | 81 main() { |
| 82 var a = new Foo(); | 82 var a = new Foo(); |
| 83 } | 83 } |
| 84 """, | 84 """, |
| 85 // TODO(ahe): Why isn't this 'part.dart'? Why the leading slash? | 85 // TODO(ahe): Why isn't this 'part.dart'? Why the leading slash? |
| 86 '/part.dart': '', | 86 '/part.dart': '', |
| 87 }; | 87 }; |
| OLD | NEW |