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

Unified Diff: third_party/dart-packages/matcher/matcher/src/interfaces.dart

Issue 1063233004: Teach dart_package to understand the packages/ subdirectory (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 8 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
Index: third_party/dart-packages/matcher/matcher/src/interfaces.dart
diff --git a/third_party/dart-packages/matcher/matcher/src/interfaces.dart b/third_party/dart-packages/matcher/matcher/src/interfaces.dart
deleted file mode 100644
index 984d8628d3dda180051a151c14036db14e50de03..0000000000000000000000000000000000000000
--- a/third_party/dart-packages/matcher/matcher/src/interfaces.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// 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.interfaces;
-
-// To decouple the reporting of errors, and allow for extensibility of
-// matchers, we make use of some interfaces.
-
-/// Matchers build up their error messages by appending to
-/// Description objects. This interface is implemented by
-/// StringDescription. This interface is unlikely to need
-/// other implementations, but could be useful to replace in
-/// some cases - e.g. language conversion.
-abstract class Description {
- int get length;
-
- /// Change the value of the description.
- Description replace(String text);
-
- /// This is used to add arbitrary text to the description.
- Description add(String text);
-
- /// This is used to add a meaningful description of a value.
- Description addDescriptionOf(value);
-
- /// This is used to add a description of an [Iterable] [list],
- /// with appropriate [start] and [end] markers and inter-element [separator].
- Description addAll(String start, String separator, String end, Iterable list);
-}
-
-/// [expect] Matchers must implement/extend the Matcher class.
-/// The base Matcher class has a generic implementation of [describeMismatch]
-/// so this does not need to be provided unless a more clear description is
-/// required. The other two methods ([matches] and [describe])
-/// must always be provided as they are highly matcher-specific.
-abstract class Matcher {
- const Matcher();
-
- /// This does the matching of the actual vs expected values.
- /// [item] is the actual value. [matchState] can be supplied
- /// and may be used to add details about the mismatch that are too
- /// costly to determine in [describeMismatch].
- bool matches(item, Map matchState);
-
- /// This builds a textual description of the matcher.
- Description describe(Description description);
-
- /// This builds a textual description of a specific mismatch. [item]
- /// is the value that was tested by [matches]; [matchState] is
- /// the [Map] that was passed to and supplemented by [matches]
- /// with additional information about the mismatch, and [mismatchDescription]
- /// is the [Description] that is being built to decribe the mismatch.
- /// A few matchers make use of the [verbose] flag to provide detailed
- /// information that is not typically included but can be of help in
- /// diagnosing failures, such as stack traces.
- Description describeMismatch(
- item, Description mismatchDescription, Map matchState, bool verbose) =>
- mismatchDescription;
-}

Powered by Google App Engine
This is Rietveld 408576698