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

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

Issue 1279493002: Don't double-print skipped tests in the expanded reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 4 months 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/runner/reporter/expanded.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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 +1 ~2 -2: success 2 290 +1 ~2 -2: success 2
291 +2 ~2 -2: Some tests failed."""); 291 +2 ~2 -2: Some tests failed.""");
292 }); 292 });
293 293
294 test("displays the skip reason if available", () { 294 test("displays the skip reason if available", () {
295 _expectReport(""" 295 _expectReport("""
296 test('skip 1', () {}, skip: 'some reason'); 296 test('skip 1', () {}, skip: 'some reason');
297 test('skip 2', () {}, skip: 'or another');""", 297 test('skip 2', () {}, skip: 'or another');""",
298 """ 298 """
299 +0: skip 1 299 +0: skip 1
300 +0 ~1: skip 1
301 Skip: some reason 300 Skip: some reason
302 +0 ~1: skip 2 301 +0 ~1: skip 2
303 +0 ~2: skip 2
304 Skip: or another 302 Skip: or another
305 +0 ~2: All tests skipped."""); 303 +0 ~2: All tests skipped.""");
306 }); 304 });
307 }); 305 });
308 } 306 }
309 307
310 void _expectReport(String tests, String expected) { 308 void _expectReport(String tests, String expected) {
311 var dart = """ 309 var dart = """
312 import 'dart:async'; 310 import 'dart:async';
313 311
(...skipping 21 matching lines...) Expand all
335 // Un-indent the expected string. 333 // Un-indent the expected string.
336 var indentation = expected.indexOf(new RegExp("[^ ]")); 334 var indentation = expected.indexOf(new RegExp("[^ ]"));
337 expected = expected.split("\n").map((line) { 335 expected = expected.split("\n").map((line) {
338 if (line.isEmpty) return line; 336 if (line.isEmpty) return line;
339 return line.substring(indentation); 337 return line.substring(indentation);
340 }).join("\n"); 338 }).join("\n");
341 339
342 expect(actual, equals(expected)); 340 expect(actual, equals(expected));
343 }); 341 });
344 } 342 }
OLDNEW
« no previous file with comments | « lib/src/runner/reporter/expanded.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698