| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // |
| 5 // Utility script to generate some output on stdout and stderr. |
| 6 |
| 7 import "dart:math"; |
| 8 import "dart:io"; |
| 9 |
| 10 main() { |
| 11 var options = new Options(); |
| 12 var blockCount = int.parse(options.arguments[0]); |
| 13 var stdoutBlockSize = int.parse(options.arguments[1]); |
| 14 var stderrBlockSize = int.parse(options.arguments[2]); |
| 15 var stdoutBlock = |
| 16 new String.fromCharCodes(new List.filled(stdoutBlockSize, 65)); |
| 17 var stderrBlock = |
| 18 new String.fromCharCodes(new List.filled(stderrBlockSize, 66)); |
| 19 for (int i = 0; i < blockCount; i++) { |
| 20 stdout.write(stdoutBlock); |
| 21 stderr.write(stderrBlock); |
| 22 } |
| 23 exit(int.parse(options.arguments[3])); |
| 24 } |
| OLD | NEW |