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

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

Issue 25401004: Use int for size when printing to stdout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | no next file » | 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) 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 String get bigString { 7 String get bigString {
8 var buffer = new StringBuffer(); 8 var buffer = new StringBuffer();
9 for (var i = 0; i < 1000; i++) { 9 for (var i = 0; i < 1000; i++) {
10 buffer.write(i); 10 buffer.write(i);
11 for (var i = 0; i < 200; i++) { 11 for (var i = 0; i < 200; i++) {
12 buffer.write('='); 12 buffer.write('=');
13 } 13 }
14 buffer.writeln(); 14 buffer.writeln();
15 } 15 }
16 return buffer.toString(); 16 return buffer.toString();
17 } 17 }
18 18
19 main() { 19 main() {
20 stdout; // Be sure too mark stdout as non-blocking. 20 stdout; // Be sure to mark stdout as non-blocking.
21 print(bigString); 21 print(bigString);
22 } 22 }
OLDNEW
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698