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

Unified Diff: packages/unittest/lib/src/matcher/util.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/unittest/lib/src/matcher/operator_matchers.dart ('k') | packages/unittest/lib/unittest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/unittest/lib/src/matcher/util.dart
diff --git a/packages/unittest/lib/src/matcher/util.dart b/packages/unittest/lib/src/matcher/util.dart
index b98c1a84af8ac8106bae34571f41e1b4bc5fd251..1550974d05b62e6b4d48d4ea9ba0daba32804e93 100644
--- a/packages/unittest/lib/src/matcher/util.dart
+++ b/packages/unittest/lib/src/matcher/util.dart
@@ -7,6 +7,8 @@ library unittest.matcher.util;
import 'core_matchers.dart';
import 'interfaces.dart';
+typedef bool _Predicate(value);
+
/// A [Map] between whitespace characters and their escape sequences.
const _escapeMap = const {
'\n': r'\n',
@@ -38,7 +40,7 @@ void addStateInfo(Map matchState, Map values) {
Matcher wrapMatcher(x) {
if (x is Matcher) {
return x;
- } else if (x is Function) {
+ } else if (x is _Predicate) {
return predicate(x);
} else {
return equals(x);
« no previous file with comments | « packages/unittest/lib/src/matcher/operator_matchers.dart ('k') | packages/unittest/lib/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698