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

Side by Side Diff: lib/src/description.dart

Issue 840133003: matcher: fixed status file, formatting, tweaks to readme (Closed) Base URL: https://github.com/dart-lang/matcher.git@master
Patch Set: nits Created 5 years, 11 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/core_matchers.dart ('k') | lib/src/error_matchers.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library matcher.description; 5 library matcher.description;
6 6
7 import 'interfaces.dart'; 7 import 'interfaces.dart';
8 import 'pretty_print.dart'; 8 import 'pretty_print.dart';
9 9
10 /// The default implementation of [Description]. This should rarely need 10 /// The default implementation of [Description]. This should rarely need
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 value.describe(this); 44 value.describe(this);
45 } else { 45 } else {
46 add(prettyPrint(value, maxLineLength: 80, maxItems: 25)); 46 add(prettyPrint(value, maxLineLength: 80, maxItems: 25));
47 } 47 }
48 return this; 48 return this;
49 } 49 }
50 50
51 /// Append an [Iterable] [list] of objects to the description, using the 51 /// Append an [Iterable] [list] of objects to the description, using the
52 /// specified [separator] and framing the list with [start] 52 /// specified [separator] and framing the list with [start]
53 /// and [end]. 53 /// and [end].
54 Description addAll(String start, String separator, String end, 54 Description addAll(
55 Iterable list) { 55 String start, String separator, String end, Iterable list) {
56 var separate = false; 56 var separate = false;
57 add(start); 57 add(start);
58 for (var item in list) { 58 for (var item in list) {
59 if (separate) { 59 if (separate) {
60 add(separator); 60 add(separator);
61 } 61 }
62 addDescriptionOf(item); 62 addDescriptionOf(item);
63 separate = true; 63 separate = true;
64 } 64 }
65 add(end); 65 add(end);
66 return this; 66 return this;
67 } 67 }
68 } 68 }
OLDNEW
« no previous file with comments | « lib/src/core_matchers.dart ('k') | lib/src/error_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698