| 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 'package:scheduled_test/descriptor.dart' as d; | 7 import 'package:scheduled_test/descriptor.dart' as d; |
| 8 import 'package:scheduled_test/scheduled_stream.dart'; | 8 import 'package:scheduled_test/scheduled_stream.dart'; |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 | 10 |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 +0: loading test.dart | 315 +0: loading test.dart |
| 316 +0: skip 1 | 316 +0: skip 1 |
| 317 +0 ~1: skip 1 | 317 +0 ~1: skip 1 |
| 318 +0 ~1: skip 2 | 318 +0 ~1: skip 2 |
| 319 +0 ~2: skip 2 | 319 +0 ~2: skip 2 |
| 320 +0 ~2: skip 3 | 320 +0 ~2: skip 3 |
| 321 +0 ~3: skip 3 | 321 +0 ~3: skip 3 |
| 322 +0 ~3: All tests skipped."""); | 322 +0 ~3: All tests skipped."""); |
| 323 }); | 323 }); |
| 324 | 324 |
| 325 test("displays a skipped group", () { |
| 326 _expectReport(""" |
| 327 group('skip', () { |
| 328 test('test 1', () {}); |
| 329 test('test 2', () {}); |
| 330 test('test 3', () {}); |
| 331 }, skip: true);""", |
| 332 """ |
| 333 +0: loading test.dart |
| 334 +0: skip |
| 335 +0 ~1: skip |
| 336 +0 ~1: All tests skipped."""); |
| 337 }); |
| 338 |
| 325 test("runs skipped tests along with successful tests", () { | 339 test("runs skipped tests along with successful tests", () { |
| 326 _expectReport(""" | 340 _expectReport(""" |
| 327 test('skip 1', () {}, skip: true); | 341 test('skip 1', () {}, skip: true); |
| 328 test('success 1', () {}); | 342 test('success 1', () {}); |
| 329 test('skip 2', () {}, skip: true); | 343 test('skip 2', () {}, skip: true); |
| 330 test('success 2', () {});""", | 344 test('success 2', () {});""", |
| 331 """ | 345 """ |
| 332 +0: loading test.dart | 346 +0: loading test.dart |
| 333 +0: skip 1 | 347 +0: skip 1 |
| 334 +0 ~1: skip 1 | 348 +0 ~1: skip 1 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 // Un-indent the expected string. | 445 // Un-indent the expected string. |
| 432 var indentation = expected.indexOf(new RegExp("[^ ]")); | 446 var indentation = expected.indexOf(new RegExp("[^ ]")); |
| 433 expected = expected.split("\n").map((line) { | 447 expected = expected.split("\n").map((line) { |
| 434 if (line.isEmpty) return line; | 448 if (line.isEmpty) return line; |
| 435 return line.substring(indentation); | 449 return line.substring(indentation); |
| 436 }).join("\n"); | 450 }).join("\n"); |
| 437 | 451 |
| 438 expect(actual, equals(expected)); | 452 expect(actual, equals(expected)); |
| 439 }); | 453 }); |
| 440 } | 454 } |
| OLD | NEW |