OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 matcher.description; | |
6 | |
7 import 'interfaces.dart'; | 5 import 'interfaces.dart'; |
8 import 'pretty_print.dart'; | 6 import 'pretty_print.dart'; |
9 | 7 |
10 /// The default implementation of [Description]. This should rarely need | 8 /// The default implementation of [Description]. This should rarely need |
11 /// substitution, although conceivably it is a place where other languages | 9 /// substitution, although conceivably it is a place where other languages |
12 /// could be supported. | 10 /// could be supported. |
13 class StringDescription implements Description { | 11 class StringDescription implements Description { |
14 final StringBuffer _out = new StringBuffer(); | 12 final StringBuffer _out = new StringBuffer(); |
15 | 13 |
16 /// Initialize the description with initial contents [init]. | 14 /// Initialize the description with initial contents [init]. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 if (separate) { | 57 if (separate) { |
60 add(separator); | 58 add(separator); |
61 } | 59 } |
62 addDescriptionOf(item); | 60 addDescriptionOf(item); |
63 separate = true; | 61 separate = true; |
64 } | 62 } |
65 add(end); | 63 add(end); |
66 return this; | 64 return this; |
67 } | 65 } |
68 } | 66 } |
OLD | NEW |