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

Unified Diff: pkg/matcher/lib/src/core_matchers.dart

Issue 629113002: Adjusting matcher comments with one-line summaries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merging master Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/matcher/lib/src/expect.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/matcher/lib/src/core_matchers.dart
diff --git a/pkg/matcher/lib/src/core_matchers.dart b/pkg/matcher/lib/src/core_matchers.dart
index 8de3a013def9b8dda05e12f59408c9deac11a58e..c3c996d908f27b76033061e179bd73530abe8e45 100644
--- a/pkg/matcher/lib/src/core_matchers.dart
+++ b/pkg/matcher/lib/src/core_matchers.dart
@@ -389,6 +389,7 @@ class isInstanceOf<T> extends Matcher {
}
/// A matcher that matches a function call against no exception.
+///
/// The function will be called once. Any exceptions will be silently swallowed.
/// The value passed to expect() should be a reference to the function.
/// Note that the function cannot take arguments; to handle this
@@ -502,12 +503,13 @@ class _HasLength extends Matcher {
}
}
-/// Returns a matcher that matches if the match argument contains
-/// the expected value. For [String]s this means substring matching;
+/// Returns a matcher that matches if the match argument contains the expected
+/// value.
+///
+/// For [String]s this means substring matching;
/// for [Map]s it means the map has the key, and for [Iterable]s
-/// (including [Iterable]s) it means the iterable has a matching
-/// element. In the case of iterables, [expected] can itself be a
-/// matcher.
+/// it means the iterable has a matching element. In the case of iterables,
+/// [expected] can itself be a matcher.
Matcher contains(expected) => new _Contains(expected);
class _Contains extends Matcher {
@@ -569,7 +571,9 @@ class _In extends Matcher {
}
/// Returns a matcher that uses an arbitrary function that returns
-/// true or false for the actual value. For example:
+/// true or false for the actual value.
+///
+/// For example:
///
/// expect(v, predicate((x) => ((x % 2) == 0), "is even"))
Matcher predicate(bool f(value), [String description = 'satisfies function']) =>
« no previous file with comments | « no previous file | pkg/matcher/lib/src/expect.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698