Index: runtime/observatory/tests/service/capture_stdio_test.dart |
diff --git a/runtime/observatory/tests/service/capture_stdio_test.dart b/runtime/observatory/tests/service/capture_stdio_test.dart |
index 294de12d35c50389b03f6c334c2f5a0702d29412..616fbb6eda3b329c9019fcd3b0d87ee111786ed3 100644 |
--- a/runtime/observatory/tests/service/capture_stdio_test.dart |
+++ b/runtime/observatory/tests/service/capture_stdio_test.dart |
@@ -24,67 +24,58 @@ void test() { |
var tests = [ |
hasStoppedAtBreakpoint, |
- |
(Isolate isolate) async { |
Completer completer = new Completer(); |
var stdoutSub; |
- stdoutSub = await isolate.vm.listenEventStream( |
- VM.kStdoutStream, |
- (ServiceEvent event) { |
- expect(event.kind, equals('WriteEvent')); |
- expect(event.bytesAsString, equals('stdout')); |
- stdoutSub.cancel().then((_) { |
- completer.complete(); |
- }); |
+ stdoutSub = await isolate.vm.listenEventStream(VM.kStdoutStream, |
+ (ServiceEvent event) { |
+ expect(event.kind, equals('WriteEvent')); |
+ expect(event.bytesAsString, equals('stdout')); |
+ stdoutSub.cancel().then((_) { |
+ completer.complete(); |
}); |
+ }); |
await isolate.resume(); |
await completer.future; |
}, |
- |
hasStoppedAtBreakpoint, |
- |
(Isolate isolate) async { |
Completer completer = new Completer(); |
var stdoutSub; |
int eventNumber = 1; |
- stdoutSub = await isolate.vm.listenEventStream( |
- VM.kStdoutStream, |
- (ServiceEvent event) { |
- expect(event.kind, equals('WriteEvent')); |
- if (eventNumber == 1) { |
- expect(event.bytesAsString, equals('print')); |
- } else if (eventNumber == 2) { |
- expect(event.bytesAsString, equals('\n')); |
- stdoutSub.cancel().then((_) { |
- completer.complete(); |
- }); |
- } else { |
- expect(true, false); |
- } |
- eventNumber++; |
- }); |
+ stdoutSub = await isolate.vm.listenEventStream(VM.kStdoutStream, |
+ (ServiceEvent event) { |
+ expect(event.kind, equals('WriteEvent')); |
+ if (eventNumber == 1) { |
+ expect(event.bytesAsString, equals('print')); |
+ } else if (eventNumber == 2) { |
+ expect(event.bytesAsString, equals('\n')); |
+ stdoutSub.cancel().then((_) { |
+ completer.complete(); |
+ }); |
+ } else { |
+ expect(true, false); |
+ } |
+ eventNumber++; |
+ }); |
await isolate.resume(); |
await completer.future; |
}, |
- |
hasStoppedAtBreakpoint, |
- |
(Isolate isolate) async { |
Completer completer = new Completer(); |
var stderrSub; |
- stderrSub = await isolate.vm.listenEventStream( |
- VM.kStderrStream, |
- (ServiceEvent event) { |
- expect(event.kind, equals('WriteEvent')); |
- expect(event.bytesAsString, equals('stderr')); |
- stderrSub.cancel().then((_) { |
- completer.complete(); |
- }); |
+ stderrSub = await isolate.vm.listenEventStream(VM.kStderrStream, |
+ (ServiceEvent event) { |
+ expect(event.kind, equals('WriteEvent')); |
+ expect(event.bytesAsString, equals('stderr')); |
+ stderrSub.cancel().then((_) { |
+ completer.complete(); |
}); |
+ }); |
await isolate.resume(); |
await completer.future; |
}, |
]; |
- |
main(args) => runIsolateTests(args, tests, testeeConcurrent: test); |