| 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_test; | 5 library scheduled_test_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
| 11 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; | 11 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; |
| 12 | 12 |
| 13 import 'metatest.dart'; | 13 import 'metatest.dart'; |
| 14 import 'utils.dart'; | 14 import 'utils.dart'; |
| 15 | 15 |
| 16 void main() { | 16 void main() { |
| 17 metaSetUp(() { | 17 metaSetUp(() { |
| 18 // The windows bots are very slow, so we increase the default timeout. | 18 // TODO(nweiz): We used to only increase the timeout to 10s for the Windows |
| 19 if (Platform.operatingSystem != "windows") return; | 19 // bots, but the Linux and Mac bots have started taking upwards of 5s when |
| 20 // running pumpEventQueue, so we're increasing the timeout across the board. |
| 20 currentSchedule.timeout = new Duration(seconds: 10); | 21 currentSchedule.timeout = new Duration(seconds: 10); |
| 21 }); | 22 }); |
| 22 | 23 |
| 23 expectTestsPass('a scheduled test with a correct synchronous expectation ' | 24 expectTestsPass('a scheduled test with a correct synchronous expectation ' |
| 24 'should pass', () { | 25 'should pass', () { |
| 25 test('test', () { | 26 test('test', () { |
| 26 expect('foo', equals('foo')); | 27 expect('foo', equals('foo')); |
| 27 }); | 28 }); |
| 28 }); | 29 }); |
| 29 | 30 |
| (...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 expectTestsFail("aborting the schedule after an out-of-band error should " | 1440 expectTestsFail("aborting the schedule after an out-of-band error should " |
| 1440 "still surface the error", () { | 1441 "still surface the error", () { |
| 1441 test('test', () { | 1442 test('test', () { |
| 1442 schedule(() { | 1443 schedule(() { |
| 1443 currentSchedule.signalError('error'); | 1444 currentSchedule.signalError('error'); |
| 1444 currentSchedule.abort(); | 1445 currentSchedule.abort(); |
| 1445 }); | 1446 }); |
| 1446 }); | 1447 }); |
| 1447 }); | 1448 }); |
| 1448 } | 1449 } |
| OLD | NEW |