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

Side by Side Diff: pkg/matcher/lib/src/pretty_print.dart

Issue 208823005: pkg/matcher (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nit Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « pkg/matcher/lib/src/operator_matchers.dart ('k') | pkg/matcher/lib/src/string_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 unittest.pretty_print; 5 library matcher.pretty_print;
6 6
7 import '../matcher.dart'; 7 import 'description.dart';
8 import 'interfaces.dart';
8 import 'utils.dart'; 9 import 'utils.dart';
9 10
10 /** 11 /**
11 * Returns a pretty-printed representation of [object]. 12 * Returns a pretty-printed representation of [object].
12 * 13 *
13 * If [maxLineLength] is passed, this will attempt to ensure that each line is 14 * If [maxLineLength] is passed, this will attempt to ensure that each line is
14 * no longer than [maxLineLength] characters long. This isn't guaranteed, since 15 * no longer than [maxLineLength] characters long. This isn't guaranteed, since
15 * individual objects may have string representations that are too long, but 16 * individual objects may have string representations that are too long, but
16 * most lines will be less than [maxLineLength] long. 17 * most lines will be less than [maxLineLength] long.
17 * 18 *
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } else { 102 } else {
102 return "${typeName(object)}:$value"; 103 return "${typeName(object)}:$value";
103 } 104 }
104 } 105 }
105 } 106 }
106 107
107 return _prettyPrint(object, 0, new Set(), true); 108 return _prettyPrint(object, 0, new Set(), true);
108 } 109 }
109 110
110 String _indent(int length) => new List.filled(length, ' ').join(''); 111 String _indent(int length) => new List.filled(length, ' ').join('');
OLDNEW
« no previous file with comments | « pkg/matcher/lib/src/operator_matchers.dart ('k') | pkg/matcher/lib/src/string_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698