| 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);
|
| + });
|
| }
|
|
|