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

Side by Side Diff: pkg/unittest/lib/interfaces.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
OLDNEW
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 // To decouple the reporting of errors, and allow for extensibility of 5 // To decouple the reporting of errors, and allow for extensibility of
6 // matchers, we make use of some interfaces. 6 // matchers, we make use of some interfaces.
7 7
8 /** 8 /**
9 * The ErrorFormatter type is used for functions that 9 * The ErrorFormatter type is used for functions that
10 * can be used to build up error reports upon [expect] failures. 10 * can be used to build up error reports upon [expect] failures.
11 * There is one built-in implementation ([defaultErrorFormatter]) 11 * There is one built-in implementation ([defaultErrorFormatter])
12 * which is used by the default failure handler. If the failure handler 12 * which is used by the default failure handler. If the failure handler
13 * is replaced it may be desirable to replace the [stringDescription] 13 * is replaced it may be desirable to replace the [stringDescription]
14 * error formatter with another. 14 * error formatter with another.
15 */ 15 */
16 16
17 part of unittest; 17 part of matcher;
18 18
19 typedef String ErrorFormatter(actual, Matcher matcher, String reason, 19 typedef String ErrorFormatter(actual, Matcher matcher, String reason,
20 MatchState matchState, bool verbose); 20 MatchState matchState, bool verbose);
21 21
22 /** 22 /**
23 * Matchers build up their error messages by appending to 23 * Matchers build up their error messages by appending to
24 * Description objects. This interface is implemented by 24 * Description objects. This interface is implemented by
25 * StringDescription. This interface is unlikely to need 25 * StringDescription. This interface is unlikely to need
26 * other implementations, but could be useful to replace in 26 * other implementations, but could be useful to replace in
27 * some cases - e.g. language conversion. 27 * some cases - e.g. language conversion.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 * the [reason] (argument from [expect]), some additonal [matchState] 93 * the [reason] (argument from [expect]), some additonal [matchState]
94 * generated by the [matcher], and a verbose flag which controls in 94 * generated by the [matcher], and a verbose flag which controls in
95 * some cases how much [matchState] information is used. It will use 95 * some cases how much [matchState] information is used. It will use
96 * these to create a detailed error message (typically by calling 96 * these to create a detailed error message (typically by calling
97 * an [ErrorFormatter]) and then call [fail] with this message. 97 * an [ErrorFormatter]) and then call [fail] with this message.
98 */ 98 */
99 void failMatch(actual, Matcher matcher, String reason, 99 void failMatch(actual, Matcher matcher, String reason,
100 MatchState matchState, bool verbose); 100 MatchState matchState, bool verbose);
101 } 101 }
102 102
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698