| 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 "", | 56 "", |
| 57 startsWith("Observatory URL: "), | 57 startsWith("Observatory URL: "), |
| 58 startsWith("Remote debugger URL: "), | 58 startsWith("Remote debugger URL: "), |
| 59 "The test runner is paused. Open the remote debugger or the Observatory " | 59 "The test runner is paused. Open the remote debugger or the Observatory " |
| 60 "and set breakpoints. Once", | 60 "and set breakpoints. Once", |
| 61 "you're finished, return to this terminal and press Enter." | 61 "you're finished, return to this terminal and press Enter." |
| 62 ])); | 62 ])); |
| 63 | 63 |
| 64 schedule(() async { | 64 schedule(() async { |
| 65 var nextLineFired = false; | 65 var nextLineFired = false; |
| 66 test.stdout.next().then(expectAsync((line) { | 66 test.stdout.next().then(expectAsync1((line) { |
| 67 expect(line, contains("+0: success")); | 67 expect(line, contains("+0: success")); |
| 68 nextLineFired = true; | 68 nextLineFired = true; |
| 69 })); | 69 })); |
| 70 | 70 |
| 71 // Wait a little bit to be sure that the tests don't start running without | 71 // Wait a little bit to be sure that the tests don't start running without |
| 72 // our input. | 72 // our input. |
| 73 await new Future.delayed(new Duration(seconds: 2)); | 73 await new Future.delayed(new Duration(seconds: 2)); |
| 74 expect(nextLineFired, isFalse); | 74 expect(nextLineFired, isFalse); |
| 75 }); | 75 }); |
| 76 | 76 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 test("failure", () => throw "oh no"); | 554 test("failure", () => throw "oh no"); |
| 555 } | 555 } |
| 556 """) | 556 """) |
| 557 ]).create(); | 557 ]).create(); |
| 558 | 558 |
| 559 var test = runTest([]); | 559 var test = runTest([]); |
| 560 test.stdout.expect(consumeThrough(contains('All tests passed!'))); | 560 test.stdout.expect(consumeThrough(contains('All tests passed!'))); |
| 561 test.shouldExit(0); | 561 test.shouldExit(0); |
| 562 }); | 562 }); |
| 563 } | 563 } |
| OLD | NEW |