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

Side by Side Diff: pkg/unittest/lib/src/basematcher.dart

Issue 18442002: Add missing newline after Actual value in fail message. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/unittest/lib/mock.dart ('k') | pkg/unittest/lib/src/core_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of matcher;
6
7 /**
8 * BaseMatcher is the base class for all matchers. To implement a new
9 * matcher, either add a class that implements Matcher or a class that
10 * extends BaseMatcher. Extending BaseMatcher has the benefit that a
11 * default implementation of describeMismatch will be provided.
12 */
13 abstract class BaseMatcher implements Matcher {
14 const BaseMatcher();
15
16 /**
17 * Tests the matcher against a given [item]
18 * and return true if the match succeeds; false otherwise.
19 * [matchState] may be used to return additional info for
20 * the use of [describeMismatch].
21 */
22 bool matches(item, Map matchState);
23
24 /**
25 * Creates a textual description of a matcher,
26 * by appending to [mismatchDescription].
27 */
28 Description describe(Description mismatchDescription);
29
30 /**
31 * Generates a description of the matcher failed for a particular
32 * [item], by appending the description to [mismatchDescription].
33 * It does not check whether the [item] fails the match, as it is
34 * only called after a failed match. There may be additional info
35 * about the mismatch in [matchState].
36 * The base matcher does not add anything as the actual value is
37 * typically sufficient, but matchers that can add valuable info
38 * should override this.
39 */
40 Description describeMismatch(item, Description mismatchDescription,
41 Map matchState, bool verbose) =>
42 mismatchDescription;
43 }
OLDNEW
« no previous file with comments | « pkg/unittest/lib/mock.dart ('k') | pkg/unittest/lib/src/core_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698