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

Side by Side Diff: dart/tests/utils/dummy_compiler_test.dart

Issue 10850015: Changed default Uri constructor to Uri.fromComponents(), new default constructor is Uri.fromString(… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « dart/tests/compiler/dart2js/unparser_test.dart ('k') | dart/tests/utils/uri_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 6
7 #import('../../lib/compiler/compiler.dart'); 7 #import('../../lib/compiler/compiler.dart');
8 #import('dart:uri'); 8 #import('dart:uri');
9 9
10 Future<String> provider(Uri uri) { 10 Future<String> provider(Uri uri) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) { 43 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
44 if (uri === null) { 44 if (uri === null) {
45 print('$kind: $message'); 45 print('$kind: $message');
46 } else { 46 } else {
47 print('$uri:$begin:$end: $kind: $message'); 47 print('$uri:$begin:$end: $kind: $message');
48 } 48 }
49 } 49 }
50 50
51 main() { 51 main() {
52 String code = compile(new Uri(scheme: 'main'), 52 String code = compile(new Uri.fromComponents(scheme: 'main'),
53 new Uri(scheme: 'lib'), 53 new Uri.fromComponents(scheme: 'lib'),
54 new Uri(scheme: 'package'), 54 new Uri.fromComponents(scheme: 'package'),
55 provider, handler).value; 55 provider, handler).value;
56 if (code === null) { 56 if (code === null) {
57 throw 'Compilation failed'; 57 throw 'Compilation failed';
58 } 58 }
59 } 59 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/unparser_test.dart ('k') | dart/tests/utils/uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698