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

Side by Side Diff: test/runner/expanded_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 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 | « test/runner/compact_reporter_test.dart ('k') | no next file » | 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « test/runner/compact_reporter_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698