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

Unified Diff: tests/standalone/io/print_sync_test.dart

Issue 25465002: Always mark stdout as blocking when using 'print'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/print_sync_test.dart
diff --git a/tests/compiler/dart2js/dead_code_test.dart b/tests/standalone/io/print_sync_test.dart
similarity index 50%
copy from tests/compiler/dart2js/dead_code_test.dart
copy to tests/standalone/io/print_sync_test.dart
index e4096c0073ddd5cbfed6d5d94dcff11073e0bb3d..74cc7edcef9c9fafa9319c360f91179c04a15565 100644
--- a/tests/compiler/dart2js/dead_code_test.dart
+++ b/tests/standalone/io/print_sync_test.dart
@@ -2,22 +2,18 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'dart:io';
+
import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
-import 'compiler_helper.dart';
-
-String TEST = r'''
-main() {
- foo(null);
-}
-foo(a) {
- if (a != null) return 42;
- return 54;
-}
-''';
-main() {
- asyncTest(() => compileAll(TEST).then((generated) {
- Expect.isFalse(generated.contains('return 42'), 'dead code not eliminated');
- }));
+void main() {
+ asyncStart();
+ Process.run(Platform.executable,
+ [Uri.parse(Platform.script)
+ .resolve('print_sync_script.dart').toString()])
+ .then((out) {
+ asyncEnd();
+ Expect.equals(1002, out.stdout.split('\n').length);
+ });
}
« tests/standalone/io/print_sync_script.dart ('K') | « tests/standalone/io/print_sync_script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698