OLD | NEW |
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...) Loading... |
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(''); |
OLD | NEW |