| 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 | 9 |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; | 11 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; |
| 11 | 12 |
| 12 import 'metatest.dart'; | 13 import 'metatest.dart'; |
| 13 import 'utils.dart'; | 14 import 'utils.dart'; |
| 14 | 15 |
| 15 void main() { | 16 void main() { |
| 17 metaSetUp(() { |
| 18 // The windows bots are very slow, so we increase the default timeout. |
| 19 if (Platform.operatingSystem != "windows") return; |
| 20 currentSchedule.timeout = new Duration(seconds: 10); |
| 21 }); |
| 22 |
| 16 expectTestsPass('a scheduled test with a correct synchronous expectation ' | 23 expectTestsPass('a scheduled test with a correct synchronous expectation ' |
| 17 'should pass', () { | 24 'should pass', () { |
| 18 test('test', () { | 25 test('test', () { |
| 19 expect('foo', equals('foo')); | 26 expect('foo', equals('foo')); |
| 20 }); | 27 }); |
| 21 }); | 28 }); |
| 22 | 29 |
| 23 expectTestsFail('a scheduled test with an incorrect synchronous expectation ' | 30 expectTestsFail('a scheduled test with an incorrect synchronous expectation ' |
| 24 'should fail', () { | 31 'should fail', () { |
| 25 test('test', () { | 32 test('test', () { |
| (...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 expectTestsFail("aborting the schedule after an out-of-band error should " | 1439 expectTestsFail("aborting the schedule after an out-of-band error should " |
| 1433 "still surface the error", () { | 1440 "still surface the error", () { |
| 1434 test('test', () { | 1441 test('test', () { |
| 1435 schedule(() { | 1442 schedule(() { |
| 1436 currentSchedule.signalError('error'); | 1443 currentSchedule.signalError('error'); |
| 1437 currentSchedule.abort(); | 1444 currentSchedule.abort(); |
| 1438 }); | 1445 }); |
| 1439 }); | 1446 }); |
| 1440 }); | 1447 }); |
| 1441 } | 1448 } |
| OLD | NEW |