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

Unified Diff: packages/matcher/lib/src/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/matcher/lib/src/string_matchers.dart ('k') | packages/matcher/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/matcher/lib/src/util.dart
diff --git a/packages/matcher/lib/src/util.dart b/packages/matcher/lib/src/util.dart
index 87060097d04a736f66d22d00f6c9984c35784eeb..112819bd724d4d83424320cc10dd9615ded14834 100644
--- a/packages/matcher/lib/src/util.dart
+++ b/packages/matcher/lib/src/util.dart
@@ -2,11 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library 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 +38,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/matcher/lib/src/string_matchers.dart ('k') | packages/matcher/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698