| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 @TestOn("vm") | 5 @TestOn("vm") |
| 6 | 6 |
| 7 import 'dart:io'; | |
| 8 import 'dart:math' as math; | |
| 9 | |
| 10 import 'package:scheduled_test/descriptor.dart' as d; | 7 import 'package:scheduled_test/descriptor.dart' as d; |
| 11 import 'package:scheduled_test/scheduled_stream.dart'; | |
| 12 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 13 import 'package:test/src/util/exit_codes.dart' as exit_codes; | |
| 14 | 9 |
| 15 import '../io.dart'; | 10 import '../io.dart'; |
| 16 | 11 |
| 17 void main() { | 12 void main() { |
| 18 useSandbox(); | 13 useSandbox(); |
| 19 | 14 |
| 20 test("respects top-level @Timeout declarations", () { | 15 test("respects top-level @Timeout declarations", () { |
| 21 d.file("test.dart", ''' | 16 d.file("test.dart", ''' |
| 22 @Timeout(const Duration(seconds: 0)) | 17 @Timeout(const Duration(seconds: 0)) |
| 23 | 18 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // test to fail. | 77 // test to fail. |
| 83 var test = runTest(["--timeout=0.016x", "test.dart"]); | 78 var test = runTest(["--timeout=0.016x", "test.dart"]); |
| 84 test.stdout.expect(containsInOrder([ | 79 test.stdout.expect(containsInOrder([ |
| 85 "Test timed out after 0.4 seconds.", | 80 "Test timed out after 0.4 seconds.", |
| 86 "-1: Some tests failed." | 81 "-1: Some tests failed." |
| 87 ])); | 82 ])); |
| 88 test.shouldExit(1); | 83 test.shouldExit(1); |
| 89 }); | 84 }); |
| 90 } | 85 } |
| 91 | 86 |
| OLD | NEW |