| 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 pretty_print; | 5 library unittest.pretty_print; |
| 6 | 6 |
| 7 import 'utils.dart'; | 7 import 'utils.dart'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Returns a pretty-printed representation of [object]. | 10 * Returns a pretty-printed representation of [object]. |
| 11 * | 11 * |
| 12 * If [maxLineLength] is passed, this will attempt to ensure that each line is | 12 * If [maxLineLength] is passed, this will attempt to ensure that each line is |
| 13 * no longer than [maxLineLength] characters long. This isn't guaranteed, since | 13 * no longer than [maxLineLength] characters long. This isn't guaranteed, since |
| 14 * individual objects may have string representations that are too long, but | 14 * individual objects may have string representations that are too long, but |
| 15 * most lines will be less than [maxLineLength] long. | 15 * most lines will be less than [maxLineLength] long. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } else { | 93 } else { |
| 94 return "${typeName(object)}:$value"; | 94 return "${typeName(object)}:$value"; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 return _prettyPrint(object, 0, new Set(), true); | 99 return _prettyPrint(object, 0, new Set(), true); |
| 100 } | 100 } |
| 101 | 101 |
| 102 String _indent(int length) => new List.filled(length, ' ').join(''); | 102 String _indent(int length) => new List.filled(length, ' ').join(''); |
| OLD | NEW |