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

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

Issue 1268013004: Don't print clock updates between prints. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Fix changelog. 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/compact.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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 () => print('hello'));""", 279 () => print('hello'));""",
280 """ 280 """
281 +0: loading test.dart 281 +0: loading test.dart
282 +0: really ... longer than that. No, yet longer. A little more... okay , that should do it. 282 +0: really ... longer than that. No, yet longer. A little more... okay , that should do it.
283 +0: really gosh dang long test name. Even longer than that. No, yet lo nger. A little more... okay, that should do it. 283 +0: really gosh dang long test name. Even longer than that. No, yet lo nger. A little more... okay, that should do it.
284 hello 284 hello
285 285
286 +1: really ... longer than that. No, yet longer. A little more... okay , that should do it. 286 +1: really ... longer than that. No, yet longer. A little more... okay , that should do it.
287 +1: All tests passed!"""); 287 +1: All tests passed!""");
288 }); 288 });
289
290 test("doesn't print a clock update between two prints", () {
291 _expectReport("""
292 test('slow', () async {
293 print('hello');
294 await new Future.delayed(new Duration(seconds: 3));
295 print('goodbye');
296 });""",
297 """
298 +0: loading test.dart
299 +0: slow
300 hello
301 goodbye
302
303 +1: slow
304 +1: All tests passed!""");
305 });
289 }); 306 });
290 307
291 group("skip:", () { 308 group("skip:", () {
292 test("displays skipped tests separately", () { 309 test("displays skipped tests separately", () {
293 _expectReport(""" 310 _expectReport("""
294 test('skip 1', () {}, skip: true); 311 test('skip 1', () {}, skip: true);
295 test('skip 2', () {}, skip: true); 312 test('skip 2', () {}, skip: true);
296 test('skip 3', () {}, skip: true);""", 313 test('skip 3', () {}, skip: true);""",
297 """ 314 """
298 +0: loading test.dart 315 +0: loading test.dart
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // Un-indent the expected string. 431 // Un-indent the expected string.
415 var indentation = expected.indexOf(new RegExp("[^ ]")); 432 var indentation = expected.indexOf(new RegExp("[^ ]"));
416 expected = expected.split("\n").map((line) { 433 expected = expected.split("\n").map((line) {
417 if (line.isEmpty) return line; 434 if (line.isEmpty) return line;
418 return line.substring(indentation); 435 return line.substring(indentation);
419 }).join("\n"); 436 }).join("\n");
420 437
421 expect(actual, equals(expected)); 438 expect(actual, equals(expected));
422 }); 439 });
423 } 440 }
OLDNEW
« no previous file with comments | « lib/src/runner/reporter/compact.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698