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

Unified Diff: lib/src/prints_matcher.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/pretty_print.dart ('k') | lib/src/string_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prints_matcher.dart
diff --git a/lib/src/prints_matcher.dart b/lib/src/prints_matcher.dart
index 8faa8956abe65a7d42107ec2e467c392f0f651e9..be6abe36833e331d9e94b60d5cabf1e616004648 100644
--- a/lib/src/prints_matcher.dart
+++ b/lib/src/prints_matcher.dart
@@ -31,8 +31,8 @@ class _Prints extends Matcher {
if (item is! Function) return false;
var buffer = new StringBuffer();
- var result = runZoned(item, zoneSpecification:
- new ZoneSpecification(print: (_, __, ____, line) {
+ var result = runZoned(item,
+ zoneSpecification: new ZoneSpecification(print: (_, __, ____, line) {
buffer.writeln(line);
}));
@@ -50,8 +50,8 @@ class _Prints extends Matcher {
Description describe(Description description) =>
description.add('prints ').addDescriptionOf(_matcher);
- Description describeMismatch(item, Description description, Map matchState,
- bool verbose) {
+ Description describeMismatch(
+ item, Description description, Map matchState, bool verbose) {
var actual = matchState.remove('prints.actual');
if (actual == null) return description;
if (actual.isEmpty) return description.add("printed nothing.");
@@ -60,8 +60,9 @@ class _Prints extends Matcher {
// Create a new description for the matcher because at least
// [_StringEqualsMatcher] replaces the previous contents of the description.
- var innerMismatch = _matcher.describeMismatch(
- actual, new StringDescription(), matchState, verbose).toString();
+ var innerMismatch = _matcher
+ .describeMismatch(actual, new StringDescription(), matchState, verbose)
+ .toString();
if (innerMismatch.isNotEmpty) {
description.add('\n Which: ').add(innerMismatch.toString());
« no previous file with comments | « lib/src/pretty_print.dart ('k') | lib/src/string_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698