| OLD | NEW |
| 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 library scheduled_test.scheduled_process; | 5 library scheduled_test.scheduled_process; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| 11 import 'package:stack_trace/stack_trace.dart'; | |
| 12 | |
| 13 import 'scheduled_stream.dart'; | 11 import 'scheduled_stream.dart'; |
| 14 import 'scheduled_test.dart'; | 12 import 'scheduled_test.dart'; |
| 15 import 'src/utils.dart'; | 13 import 'src/utils.dart'; |
| 16 import 'src/value_future.dart'; | 14 import 'src/value_future.dart'; |
| 17 | 15 |
| 18 /// A class representing a [Process] that is scheduled to run in the course of | 16 /// A class representing a [Process] that is scheduled to run in the course of |
| 19 /// the test. This class allows actions on the process to be scheduled | 17 /// the test. This class allows actions on the process to be scheduled |
| 20 /// synchronously. All operations on this class are scheduled. | 18 /// synchronously. All operations on this class are scheduled. |
| 21 /// | 19 /// |
| 22 /// Before running the test, either [shouldExit] or [kill] must be called on | 20 /// Before running the test, either [shouldExit] or [kill] must be called on |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 schedule(() { | 318 schedule(() { |
| 321 return _exitCode.then((exitCode) { | 319 return _exitCode.then((exitCode) { |
| 322 if (expectedExitCode != null) { | 320 if (expectedExitCode != null) { |
| 323 expect(exitCode, equals(expectedExitCode)); | 321 expect(exitCode, equals(expectedExitCode)); |
| 324 } | 322 } |
| 325 }); | 323 }); |
| 326 }, "waiting for process '$description' to exit"); | 324 }, "waiting for process '$description' to exit"); |
| 327 _scheduledExitTask = currentSchedule.tasks.contents.last; | 325 _scheduledExitTask = currentSchedule.tasks.contents.last; |
| 328 } | 326 } |
| 329 } | 327 } |
| OLD | NEW |