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

Unified Diff: packages/matcher/lib/src/pretty_print.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/matcher/lib/src/order_matchers.dart ('k') | packages/matcher/lib/src/string_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/matcher/lib/src/pretty_print.dart
diff --git a/packages/matcher/lib/src/pretty_print.dart b/packages/matcher/lib/src/pretty_print.dart
index c20102be09715db1d6381eb2c2a47c36552b5ddd..826cad0682537e2df935a9eac5fc4edf0b56230d 100644
--- a/packages/matcher/lib/src/pretty_print.dart
+++ b/packages/matcher/lib/src/pretty_print.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library matcher.pretty_print;
-
import 'description.dart';
import 'interfaces.dart';
import 'util.dart';
@@ -51,9 +49,13 @@ String prettyPrint(object, {int maxLineLength, int maxItems}) {
}
// Otherwise, print each member on its own line.
- return "$type[\n" + strings.map((string) {
- return _indent(indent + 2) + string;
- }).join(",\n") + "\n" + _indent(indent) + "]";
+ return "$type[\n" +
+ strings.map((string) {
+ return _indent(indent + 2) + string;
+ }).join(",\n") +
+ "\n" +
+ _indent(indent) +
+ "]";
} else if (object is Map) {
// Convert the contents of the map to string representations.
var strings = object.keys.map((key) {
@@ -75,9 +77,13 @@ String prettyPrint(object, {int maxLineLength, int maxItems}) {
}
// Otherwise, print each key/value pair on its own line.
- return "{\n" + strings.map((string) {
- return _indent(indent + 2) + string;
- }).join(",\n") + "\n" + _indent(indent) + "}";
+ return "{\n" +
+ strings.map((string) {
+ return _indent(indent + 2) + string;
+ }).join(",\n") +
+ "\n" +
+ _indent(indent) +
+ "}";
} else if (object is String) {
// Escape strings and print each line on its own line.
var lines = object.split("\n");
« no previous file with comments | « packages/matcher/lib/src/order_matchers.dart ('k') | packages/matcher/lib/src/string_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698