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 616fbb6eda3b329c9019fcd3b0d87ee111786ed3..294de12d35c50389b03f6c334c2f5a0702d29412 100644 |
--- a/runtime/observatory/tests/service/capture_stdio_test.dart |
+++ b/runtime/observatory/tests/service/capture_stdio_test.dart |
@@ -24,58 +24,67 @@ 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); |