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

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

Issue 46063010: Change dart:io Platform.script to return a Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 1 month 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 | « sdk/lib/io/platform_impl.dart ('k') | tests/compiler/dart2js/bad_loop_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 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 10
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 // Deliver the input asynchronously. 37 // Deliver the input asynchronously.
38 return new Future(() => source); 38 return new Future(() => source);
39 } 39 }
40 40
41 main() { 41 main() {
42 var entrypoint = Uri.parse("file:///main.dart"); 42 var entrypoint = Uri.parse("file:///main.dart");
43 43
44 // Find the path to sdk/ in the repo relative to this script. 44 // Find the path to sdk/ in the repo relative to this script.
45 Uri script = currentDirectory.resolve(nativeToUriPath(Platform.script)); 45 Uri script = currentDirectory.resolveUri(Platform.script);
46 Uri libraryRoot = script.resolve('../../../sdk/'); 46 Uri libraryRoot = script.resolve('../../../sdk/');
47 Uri packageRoot = script.resolve('./packages/'); 47 Uri packageRoot = script.resolve('./packages/');
48 48
49 asyncTest(() => compiler.compile(entrypoint, libraryRoot, packageRoot, 49 asyncTest(() => compiler.compile(entrypoint, libraryRoot, packageRoot,
50 provideInput, handleDiagnostic, []).then((code) { 50 provideInput, handleDiagnostic, []).then((code) {
51 Expect.isNotNull(code); 51 Expect.isNotNull(code);
52 })); 52 }));
53 } 53 }
54 54
55 void handleDiagnostic(Uri uri, int begin, int end, String message, 55 void handleDiagnostic(Uri uri, int begin, int end, String message,
56 compiler.Diagnostic kind) { 56 compiler.Diagnostic kind) {
57 print(message); 57 print(message);
58 if (kind != compiler.Diagnostic.VERBOSE_INFO) { 58 if (kind != compiler.Diagnostic.VERBOSE_INFO) {
59 throw 'Unexpected diagnostic kind $kind'; 59 throw 'Unexpected diagnostic kind $kind';
60 } 60 }
61 } 61 }
OLDNEW
« no previous file with comments | « sdk/lib/io/platform_impl.dart ('k') | tests/compiler/dart2js/bad_loop_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698