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

Side by Side Diff: tests/standalone/io/platform_test.dart

Issue 51043004: Remove uses of Options from tools directory. Fix platform_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tools/coverage.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 import "dart:isolate"; 7 import "dart:isolate";
8 8
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 30 matching lines...) Expand all
41 "Platform.executableArguments": Platform.executableArguments}); 41 "Platform.executableArguments": Platform.executableArguments});
42 } 42 }
43 43
44 testIsolate() { 44 testIsolate() {
45 asyncStart(); 45 asyncStart();
46 ReceivePort port = new ReceivePort(); 46 ReceivePort port = new ReceivePort();
47 var remote = Isolate.spawn(f, port.sendPort); 47 var remote = Isolate.spawn(f, port.sendPort);
48 port.first.then((results) { 48 port.first.then((results) {
49 Expect.equals(Platform.executable, results["Platform.executable"]); 49 Expect.equals(Platform.executable, results["Platform.executable"]);
50 50
51 Uri uri = Uri.file(results["Platform.script"]); 51 Uri uri = new Uri.file(results["Platform.script"]);
52 // SpawnFunction retains the script url of the parent which in this 52 // SpawnFunction retains the script url of the parent which in this
53 // case was a relative path. 53 // case was a relative path.
54 Expect.equals("", uri.scheme); 54 Expect.equals("file", uri.scheme);
55 Expect.isTrue(uri.path.endsWith('tests/standalone/io/platform_test.dart')); 55 Expect.isTrue(uri.path.endsWith('tests/standalone/io/platform_test.dart'));
56 Expect.equals(Platform.packageRoot, results["Platform.packageRoot"]); 56 Expect.equals(Platform.packageRoot, results["Platform.packageRoot"]);
57 Expect.listEquals(Platform.executableArguments, 57 Expect.listEquals(Platform.executableArguments,
58 results["Platform.executableArguments"]); 58 results["Platform.executableArguments"]);
59 asyncEnd(); 59 asyncEnd();
60 }); 60 });
61 } 61 }
62 62
63 main() { 63 main() {
64 test(); 64 test();
65 testIsolate(); 65 testIsolate();
66 } 66 }
OLDNEW
« no previous file with comments | « no previous file | tools/coverage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698