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

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

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 'dart:async'; 7 import 'dart:async';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart'; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart';
11 import '../../utils/dummy_compiler_test.dart' as dummy; 11 import '../../utils/dummy_compiler_test.dart' as dummy;
12 12
13 main() { 13 main() {
14 StringBuffer messages = new StringBuffer(); 14 StringBuffer messages = new StringBuffer();
15 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) { 15 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
16 if (kind == Diagnostic.VERBOSE_INFO) return; 16 if (kind == Diagnostic.VERBOSE_INFO) return;
17 if (identical(kind.name, 'source map')) return; 17 if (identical(kind.name, 'source map')) return;
18 if (uri == null) { 18 if (uri == null) {
19 messages.add('$kind: $message\n'); 19 messages.write('$kind: $message\n');
20 } else { 20 } else {
21 Expect.equals('main:${uri.path}', '$uri'); 21 Expect.equals('main:${uri.path}', '$uri');
22 String source = TEST_SOURCE[uri.path]; 22 String source = TEST_SOURCE[uri.path];
23 Expect.isNotNull(source); 23 Expect.isNotNull(source);
24 messages.add('$begin<${source.substring(begin, end)}>:${uri.path}:' 24 messages.write('$begin<${source.substring(begin, end)}>:${uri.path}:'
25 '$kind: $message\n'); 25 '$kind: $message\n');
26 } 26 }
27 } 27 }
28 28
29 Future<String> provider(Uri uri) { 29 Future<String> provider(Uri uri) {
30 if (uri.scheme != "main") return dummy.provider(uri); 30 if (uri.scheme != "main") return dummy.provider(uri);
31 String source = TEST_SOURCE[uri.path]; 31 String source = TEST_SOURCE[uri.path];
32 Expect.isNotNull(source); 32 Expect.isNotNull(source);
33 return (new Completer<String>()..complete(source)).future; 33 return (new Completer<String>()..complete(source)).future;
34 } 34 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 main() { 100 main() {
101 var a = Foo.bar(); 101 var a = Foo.bar();
102 var b = new Foo.bar(); 102 var b = new Foo.bar();
103 new Fisk(); 103 new Fisk();
104 new Fisk.hest(); 104 new Fisk.hest();
105 } 105 }
106 """, 106 """,
107 // TODO(ahe): Why isn't this 'part.dart'? Why the leading slash? 107 // TODO(ahe): Why isn't this 'part.dart'? Why the leading slash?
108 '/part.dart': '', 108 '/part.dart': '',
109 }; 109 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698