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_process_test; | 5 library scheduled_process_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:path/path.dart' as path; | 10 import 'package:path/path.dart' as path; |
11 import 'package:scheduled_test/scheduled_process.dart'; | 11 import 'package:scheduled_test/scheduled_process.dart'; |
12 import 'package:scheduled_test/scheduled_test.dart'; | 12 import 'package:scheduled_test/scheduled_test.dart'; |
13 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; | |
14 | 13 |
15 import 'metatest.dart'; | 14 import 'metatest.dart'; |
16 import 'utils.dart'; | 15 import 'utils.dart'; |
17 | 16 |
18 void main() { | 17 void main() { |
19 setUpTimeout(); | 18 setUpTimeout(); |
20 | 19 |
21 expectTestsPass("a process must have kill() or shouldExit() called", () { | 20 expectTestsPass("a process must have kill() or shouldExit() called", () { |
22 var errors; | 21 var errors; |
23 test('test 1', () { | 22 test('test 1', () { |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 382 |
384 currentSchedule.onComplete.schedule(() { | 383 currentSchedule.onComplete.schedule(() { |
385 return tempDir.catchError((_) => null).then((dir) { | 384 return tempDir.catchError((_) => null).then((dir) { |
386 if (dir == null) return; | 385 if (dir == null) return; |
387 return new Directory(dir).delete(recursive: true); | 386 return new Directory(dir).delete(recursive: true); |
388 }); | 387 }); |
389 }, 'clean up temp dir'); | 388 }, 'clean up temp dir'); |
390 | 389 |
391 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]); | 390 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]); |
392 } | 391 } |
OLD | NEW |