| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:scheduled_test/descriptor.dart' as d; | 10 import 'package:scheduled_test/descriptor.dart' as d; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 "Once you're finished, return to this terminal and press Enter." | 234 "Once you're finished, return to this terminal and press Enter." |
| 235 ]))); | 235 ]))); |
| 236 | 236 |
| 237 test.signal(ProcessSignal.SIGTERM); | 237 test.signal(ProcessSignal.SIGTERM); |
| 238 test.shouldExit(); | 238 test.shouldExit(); |
| 239 test.stderr.expect(isDone); | 239 test.stderr.expect(isDone); |
| 240 }, testOn: "!windows"); | 240 }, testOn: "!windows"); |
| 241 | 241 |
| 242 test("disables timeouts", () { | 242 test("disables timeouts", () { |
| 243 d.file("test.dart", """ | 243 d.file("test.dart", """ |
| 244 import 'dart:async'; |
| 245 |
| 244 import 'package:test/test.dart'; | 246 import 'package:test/test.dart'; |
| 245 | 247 |
| 246 void main() { | 248 void main() { |
| 247 print('loaded test 1!'); | 249 print('loaded test 1!'); |
| 248 | 250 |
| 249 test("success", () {}, timeout: new Timeout(Duration.ZERO)); | 251 test("success", () async { |
| 252 await new Future.delayed(Duration.ZERO); |
| 253 }, timeout: new Timeout(Duration.ZERO)); |
| 250 } | 254 } |
| 251 """).create(); | 255 """).create(); |
| 252 | 256 |
| 253 var test = runTest( | 257 var test = runTest( |
| 254 ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]); | 258 ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]); |
| 255 test.stdout.expect(consumeThrough("loaded test 1!")); | 259 test.stdout.expect(consumeThrough("loaded test 1!")); |
| 256 test.stdout.expect(consumeThrough(inOrder([ | 260 test.stdout.expect(consumeThrough(inOrder([ |
| 257 startsWith("Observatory URL: "), | 261 startsWith("Observatory URL: "), |
| 258 "The test runner is paused. Open the dev console in Dartium or the " | 262 "The test runner is paused. Open the dev console in Dartium or the " |
| 259 "Observatory and set breakpoints.", | 263 "Observatory and set breakpoints.", |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // our input. | 317 // our input. |
| 314 await new Future.delayed(new Duration(seconds: 2)); | 318 await new Future.delayed(new Duration(seconds: 2)); |
| 315 expect(nextLineFired, isFalse); | 319 expect(nextLineFired, isFalse); |
| 316 }); | 320 }); |
| 317 | 321 |
| 318 test.writeLine(''); | 322 test.writeLine(''); |
| 319 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); | 323 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); |
| 320 test.shouldExit(0); | 324 test.shouldExit(0); |
| 321 }); | 325 }); |
| 322 } | 326 } |
| OLD | NEW |