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:convert'; | 7 import 'dart:convert'; |
8 | 8 |
9 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
10 import 'package:scheduled_test/descriptor.dart' as d; | 10 import 'package:scheduled_test/descriptor.dart' as d; |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 void main() { | 367 void main() { |
368 test("success", () => new Future.delayed(Duration.ZERO)); | 368 test("success", () => new Future.delayed(Duration.ZERO)); |
369 } | 369 } |
370 """).create(); | 370 """).create(); |
371 | 371 |
372 var test = runTest(["--timeout=none", "test.dart"]); | 372 var test = runTest(["--timeout=none", "test.dart"]); |
373 test.stdout.expect(consumeThrough(contains("All tests passed!"))); | 373 test.stdout.expect(consumeThrough(contains("All tests passed!"))); |
374 test.shouldExit(0); | 374 test.shouldExit(0); |
375 }); | 375 }); |
376 | 376 |
377 | |
378 test("uses the specified regexp names", () { | 377 test("uses the specified regexp names", () { |
379 d.file("dart_test.yaml", JSON.encode({ | 378 d.file("dart_test.yaml", JSON.encode({ |
380 "names": ["z[ia]p", "a"] | 379 "names": ["z[ia]p", "a"] |
381 })).create(); | 380 })).create(); |
382 | 381 |
383 d.file("test.dart", """ | 382 d.file("test.dart", """ |
384 import 'package:test/test.dart'; | 383 import 'package:test/test.dart'; |
385 | 384 |
386 void main() { | 385 void main() { |
387 test("zip", () {}); | 386 test("zip", () {}); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 test("failure", () => throw "oh no"); | 489 test("failure", () => throw "oh no"); |
491 } | 490 } |
492 """) | 491 """) |
493 ]).create(); | 492 ]).create(); |
494 | 493 |
495 var test = runTest([]); | 494 var test = runTest([]); |
496 test.stdout.expect(consumeThrough(contains('All tests passed!'))); | 495 test.stdout.expect(consumeThrough(contains('All tests passed!'))); |
497 test.shouldExit(0); | 496 test.shouldExit(0); |
498 }); | 497 }); |
499 } | 498 } |
OLD | NEW |