| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 test("prints a warning and doesn't pause for unsupported platforms", () { | 153 test("prints a warning and doesn't pause for unsupported platforms", () { |
| 154 d.file("test.dart", """ | 154 d.file("test.dart", """ |
| 155 import 'package:test/test.dart'; | 155 import 'package:test/test.dart'; |
| 156 | 156 |
| 157 void main() { | 157 void main() { |
| 158 test("success", () {}); | 158 test("success", () {}); |
| 159 } | 159 } |
| 160 """).create(); | 160 """).create(); |
| 161 | 161 |
| 162 var test = runTest( | 162 var test = runTest( |
| 163 ["--pause-after-load", "-p", "vm", "-p", "phantomjs", "test.dart"]); | 163 ["--pause-after-load", "-p", "vm", "test.dart"]); |
| 164 test.stderr.expect( | 164 test.stderr.expect( |
| 165 "Warning: Debugging is currently unsupported on the Dart VM and " | 165 "Warning: Debugging is currently unsupported on the Dart VM."); |
| 166 "PhantomJS."); | 166 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); |
| 167 test.stdout.expect(consumeThrough(contains("+2: All tests passed!"))); | |
| 168 test.shouldExit(0); | 167 test.shouldExit(0); |
| 169 }); | 168 }); |
| 170 | 169 |
| 171 test("can mix supported and unsupported platforms", () { | 170 test("can mix supported and unsupported platforms", () { |
| 172 d.file("test.dart", """ | 171 d.file("test.dart", """ |
| 173 import 'package:test/test.dart'; | 172 import 'package:test/test.dart'; |
| 174 | 173 |
| 175 void main() { | 174 void main() { |
| 176 print('loaded test!'); | 175 print('loaded test!'); |
| 177 | 176 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // our input. | 313 // our input. |
| 315 await new Future.delayed(new Duration(seconds: 2)); | 314 await new Future.delayed(new Duration(seconds: 2)); |
| 316 expect(nextLineFired, isFalse); | 315 expect(nextLineFired, isFalse); |
| 317 }); | 316 }); |
| 318 | 317 |
| 319 test.writeLine(''); | 318 test.writeLine(''); |
| 320 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); | 319 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); |
| 321 test.shouldExit(0); | 320 test.shouldExit(0); |
| 322 }); | 321 }); |
| 323 } | 322 } |
| OLD | NEW |