| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 test('skip 1', () {}, skip: true); | 244 test('skip 1', () {}, skip: true); |
| 245 test('skip 2', () {}, skip: true); | 245 test('skip 2', () {}, skip: true); |
| 246 test('skip 3', () {}, skip: true);""", | 246 test('skip 3', () {}, skip: true);""", |
| 247 """ | 247 """ |
| 248 +0: skip 1 | 248 +0: skip 1 |
| 249 +0 ~1: skip 2 | 249 +0 ~1: skip 2 |
| 250 +0 ~2: skip 3 | 250 +0 ~2: skip 3 |
| 251 +0 ~3: All tests skipped."""); | 251 +0 ~3: All tests skipped."""); |
| 252 }); | 252 }); |
| 253 | 253 |
| 254 test("displays a skipped group", () { |
| 255 _expectReport(""" |
| 256 group('skip', () { |
| 257 test('test 1', () {}); |
| 258 test('test 2', () {}); |
| 259 test('test 3', () {}); |
| 260 }, skip: true);""", |
| 261 """ |
| 262 +0: skip |
| 263 +0 ~1: All tests skipped."""); |
| 264 }); |
| 265 |
| 254 test("runs skipped tests along with successful tests", () { | 266 test("runs skipped tests along with successful tests", () { |
| 255 _expectReport(""" | 267 _expectReport(""" |
| 256 test('skip 1', () {}, skip: true); | 268 test('skip 1', () {}, skip: true); |
| 257 test('success 1', () {}); | 269 test('success 1', () {}); |
| 258 test('skip 2', () {}, skip: true); | 270 test('skip 2', () {}, skip: true); |
| 259 test('success 2', () {});""", | 271 test('success 2', () {});""", |
| 260 """ | 272 """ |
| 261 +0: skip 1 | 273 +0: skip 1 |
| 262 +0 ~1: success 1 | 274 +0 ~1: success 1 |
| 263 +1 ~1: skip 2 | 275 +1 ~1: skip 2 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // Un-indent the expected string. | 345 // Un-indent the expected string. |
| 334 var indentation = expected.indexOf(new RegExp("[^ ]")); | 346 var indentation = expected.indexOf(new RegExp("[^ ]")); |
| 335 expected = expected.split("\n").map((line) { | 347 expected = expected.split("\n").map((line) { |
| 336 if (line.isEmpty) return line; | 348 if (line.isEmpty) return line; |
| 337 return line.substring(indentation); | 349 return line.substring(indentation); |
| 338 }).join("\n"); | 350 }).join("\n"); |
| 339 | 351 |
| 340 expect(actual, equals(expected)); | 352 expect(actual, equals(expected)); |
| 341 }); | 353 }); |
| 342 } | 354 } |
| OLD | NEW |