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

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

Issue 37033002: dart:io | Remove uses of Options class from standalone tests. Mark Options deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove commented lines from standalone.status. Created 7 years, 2 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Utility script to generate some output on stdout and stderr. 5 // Utility script to generate some output on stdout and stderr.
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:math"; 8 import "dart:math";
9 import "dart:io"; 9 import "dart:io";
10 10
11 main() { 11 main(List<String> arguments) {
12 var options = new Options(); 12 var blockCount = int.parse(arguments[0]);
13 var blockCount = int.parse(options.arguments[0]); 13 var stdoutBlockSize = int.parse(arguments[1]);
14 var stdoutBlockSize = int.parse(options.arguments[1]); 14 var stderrBlockSize = int.parse(arguments[2]);
15 var stderrBlockSize = int.parse(options.arguments[2]);
16 var stdoutBlock = 15 var stdoutBlock =
17 new String.fromCharCodes(new List.filled(stdoutBlockSize, 65)); 16 new String.fromCharCodes(new List.filled(stdoutBlockSize, 65));
18 var stderrBlock = 17 var stderrBlock =
19 new String.fromCharCodes(new List.filled(stderrBlockSize, 66)); 18 new String.fromCharCodes(new List.filled(stderrBlockSize, 66));
20 for (int i = 0; i < blockCount; i++) { 19 for (int i = 0; i < blockCount; i++) {
21 stdout.write(stdoutBlock); 20 stdout.write(stdoutBlock);
22 stderr.write(stderrBlock); 21 stderr.write(stderrBlock);
23 } 22 }
24 Future.wait([stdout.close(), stderr.close()]).then((_) { 23 Future.wait([stdout.close(), stderr.close()]).then((_) {
25 exit(int.parse(options.arguments[3])); 24 exit(int.parse(arguments[3]));
26 }); 25 });
27 } 26 }
OLDNEW
« no previous file with comments | « tests/standalone/io/process_std_io_script2.dart ('k') | tests/standalone/io/raw_socket_cross_process_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698