Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: test/runner/compact_reporter_test.dart

Issue 1471963002: Fix a bug with skipped groups. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/backend/group.dart ('k') | test/runner/expanded_reporter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/src/backend/group.dart ('k') | test/runner/expanded_reporter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698