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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 d.async(pubServePort.then((port) { | 327 d.async(pubServePort.then((port) { |
328 return d.file("dart_test.yaml", JSON.encode({ | 328 return d.file("dart_test.yaml", JSON.encode({ |
329 "pub_serve": port | 329 "pub_serve": port |
330 })); | 330 })); |
331 })).create(); | 331 })).create(); |
332 | 332 |
333 var test = runTest([]); | 333 var test = runTest([]); |
334 test.stdout.expect(consumeThrough(contains('+1: All tests passed!'))); | 334 test.stdout.expect(consumeThrough(contains('+1: All tests passed!'))); |
335 test.shouldExit(0); | 335 test.shouldExit(0); |
336 pub.kill(); | 336 pub.kill(); |
337 }); | 337 }, tags: 'pub'); |
338 | 338 |
339 test("uses the specified concurrency", () { | 339 test("uses the specified concurrency", () { |
340 d.file("dart_test.yaml", JSON.encode({ | 340 d.file("dart_test.yaml", JSON.encode({ |
341 "concurrency": 2 | 341 "concurrency": 2 |
342 })).create(); | 342 })).create(); |
343 | 343 |
344 d.file("test.dart", """ | 344 d.file("test.dart", """ |
345 import 'package:test/test.dart'; | 345 import 'package:test/test.dart'; |
346 | 346 |
347 void main() { | 347 void main() { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 test("failure", () => throw "oh no"); | 535 test("failure", () => throw "oh no"); |
536 } | 536 } |
537 """) | 537 """) |
538 ]).create(); | 538 ]).create(); |
539 | 539 |
540 var test = runTest([]); | 540 var test = runTest([]); |
541 test.stdout.expect(consumeThrough(contains('All tests passed!'))); | 541 test.stdout.expect(consumeThrough(contains('All tests passed!'))); |
542 test.shouldExit(0); | 542 test.shouldExit(0); |
543 }); | 543 }); |
544 } | 544 } |
OLD | NEW |