/external/hamcrest/src/org/hamcrest/core/ |
DescribedAs.java | 8 import org.hamcrest.Matcher;
13 * Provides a custom description to another matcher.
17 private final Matcher<T> matcher;
field in class:DescribedAs 22 public DescribedAs(String descriptionTemplate, Matcher<T> matcher, Object[] values) {
24 this.matcher = matcher;
29 return matcher.matches(o);
33 java.util.regex.Matcher arg = ARG_PATTERN.matcher(descriptionTemplate); [all...] |
IsInstanceOf.java | 6 import org.hamcrest.Matcher; 40 public static Matcher<Object> instanceOf(Class<?> type) {
|
IsSame.java | 6 import org.hamcrest.Matcher; 36 public static <T> Matcher<T> sameInstance(T object) {
|
/external/chromium/testing/gmock/test/ |
gmock-matchers_test.cc | 96 using testing::Matcher; 164 Matcher<int> GreaterThan(int n) { 176 // Returns the description of the given matcher. 178 string Describe(const Matcher<T>& m) { 184 // Returns the description of the negation of the given matcher. 186 string DescribeNegation(const Matcher<T>& m) { 248 // Tests implementing a monomorphic matcher using MatchAndExplain(). 270 Matcher<int> m = MakeMatcher(new NewEvenMatcherImpl); 277 // Tests default-constructing a matcher. 279 Matcher<double> m 3236 Matcher<int> matcher = ResultOf(&IntToStringFunction, Eq(string("foo"))); local 3244 Matcher<int> matcher = ResultOf(&IntToStringFunction, StrEq("foo")); local 3256 Matcher<int> matcher = ResultOf(&IntFunction, Ge(85)); local 3268 Matcher<int> matcher = ResultOf(&IntFunction, Eq(80)); local 3285 Matcher<double&> matcher = ResultOf(&DoubleFunction, Ref(x)); local 3307 Matcher<const string&> matcher = ResultOf(&StringFunction, Ref(s)); local 3317 Matcher<int> matcher = ResultOf(IntFunction, Matcher<signed char>(Ge(85))); local 3334 Matcher<int> matcher = ResultOf(IntToStringFunction, StrEq("foo")); local 3348 Matcher<int> matcher = ResultOf(Functor(), Eq(string("foo"))); local [all...] |
/external/llvm/utils/TableGen/ |
DAGISelMatcherOpt.cpp | 1 //===- DAGISelMatcherOpt.cpp - Optimize a DAG Matcher ---------------------===// 10 // This file implements the DAG Matcher optimizer. 23 /// ContractNodes - Turn multiple matcher node patterns like 'MoveChild+Record' 25 static void ContractNodes(OwningPtr<Matcher> &MatcherPtr, 28 Matcher *N = MatcherPtr.get(); 34 OwningPtr<Matcher> Child(Scope->takeChild(i)); 44 Matcher *New = 0; 80 Matcher *EmitNode = MatcherPtr.take(); 81 Matcher *MFR = EmitNode->takeNext(); 82 Matcher *Tail = MFR->takeNext() [all...] |
DAGISelMatcherEmitter.cpp | 1 //===- DAGISelMatcherEmitter.cpp - Matcher Emitter ------------------------===// 10 // This file contains code to generate C++ code for a matcher. 54 unsigned EmitMatcherList(const Matcher *N, unsigned Indent, 59 void EmitHistogram(const Matcher *N, formatted_raw_ostream &OS); 61 unsigned EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, 135 /// EmitMatcher - Emit bytes for the specified matcher and return 138 EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx, 143 case Matcher::Scope: { 205 case Matcher::RecordNode: 214 case Matcher::RecordChild [all...] |
/external/chromium/testing/gmock/include/gmock/internal/ |
gmock-generated-internal-utils.h | 47 class Matcher; 64 // MatcherTuple<T>::type is a tuple type where each field is a Matcher 76 typedef ::std::tr1::tuple<Matcher<A1> > type; 81 typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type; 86 typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type; 91 typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> [all...] |
/external/junit/src/org/junit/rules/ |
ExpectedException.java | 7 import org.hamcrest.Matcher; 53 private Matcher<Object> fMatcher= null; 65 * Adds {@code matcher} to the list of requirements for any thrown exception. 69 public void expect(Matcher<?> matcher) { 71 fMatcher= (Matcher<Object>) matcher; 73 fMatcher= both(fMatcher).and(matcher); 93 * Adds {@code matcher} to the list of requirements for the message 96 public void expectMessage(Matcher<String> matcher) [all...] |
/external/clang/include/clang/ASTMatchers/ |
ASTMatchersInternal.h | 10 // Implements the base layer of the matcher framework. 12 // Matchers are methods that return a Matcher<T> which provides a method 19 // 1. A function Matcher<T> MatcherName(<arguments>) which returns a Matcher<T> 21 // on the arguments. Matcher<T>s form an implicit reverse hierarchy 22 // to clang's AST class hierarchy, meaning that you can use a Matcher<Base> 23 // everywhere a Matcher<Derived> is required. 26 // The matcher functions are defined in ASTMatchers.h. To make it possible 27 // to implement both the matcher function and the implementation of the matcher [all...] |
ASTMatchers.h | 18 // which returns a matcher that can be used to find all AST nodes that declare 23 // use the id(...) matcher around the match expressions that match the nodes 33 // In the given example, each time our matcher finds a match we get a callback 38 // implementation details of the matcher framework. 58 /// \brief Maps string IDs to AST nodes matched by parts of a matcher. 98 /// \brief If the provided matcher matches a node, binds the node to \c ID. 102 internal::Matcher<T> id(const std::string &ID, 110 typedef internal::Matcher<Decl> DeclarationMatcher; 111 typedef internal::Matcher<Stmt> StatementMatcher; 112 typedef internal::Matcher<QualType> TypeMatcher [all...] |
ASTMatchFinder.h | 13 // The general idea is to construct a matcher expression that describes a 15 // expression matches is registered, and the matcher is run over the AST of 112 /// \brief Adds a matcher to execute when running over the AST. 167 /// \brief Returns the results of matching \p Matcher on \p Node. 170 /// \p Matcher on \p Node and returns the collected results. 179 match(MatcherT Matcher, const NodeT &Node, ASTContext &Context); 183 match(MatcherT Matcher, const ast_type_traits::DynTypedNode &Node, 194 /// Decl *D = selectFirst<Decl>("id", match(Matcher.bind("id"), 221 match(MatcherT Matcher, const ast_type_traits::DynTypedNode &Node, 225 Finder.addMatcher(Matcher, &Callback) [all...] |
/external/junit/src/org/junit/experimental/results/ |
ResultMatchers.java | 5 import org.hamcrest.Matcher; 20 public static Matcher<PrintableResult> isSuccessful() { 27 public static Matcher<PrintableResult> failureCountIs(final int count) { 43 public static Matcher<Object> hasSingleFailureContaining(final String string) { 59 public static Matcher<PrintableResult> hasFailureContaining(final String string) {
|
/external/mockito/src/org/mockito/internal/matchers/ |
MatchersPrinter.java | 11 import org.hamcrest.Matcher;
19 public String getArgumentsLine(List<Matcher> matchers, PrintSettings printSettings) {
25 public String getArgumentsBlock(List<Matcher> matchers, PrintSettings printSettings) {
31 private List<SelfDescribing> applyPrintSettings(List<Matcher> matchers, PrintSettings printSettings) {
34 for (final Matcher matcher : matchers) {
35 if (matcher instanceof ContainsExtraTypeInformation && printSettings.extraTypeInfoFor(i)) {
36 withPrintSettings.add(((ContainsExtraTypeInformation) matcher).withExtraTypeInfo());
38 withPrintSettings.add(matcher);
|
LocalizedMatcher.java | 14 public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation, CapturesArguments, MatcherDecorator, Serializable {
17 private final Matcher actualMatcher;
20 public LocalizedMatcher(Matcher actualMatcher) {
66 public Matcher getActualMatcher() {
|
/external/mockito/src/org/mockito/internal/verification/argumentmatching/ |
ArgumentMatchingTool.java | 10 import org.hamcrest.Matcher;
20 public Integer[] getSuspiciouslyNotMatchingArgsIndexes(List<Matcher> matchers, Object[] arguments) {
27 for (Matcher m : matchers) {
39 private boolean safelyMatches(Matcher m, Object arg) {
47 private boolean toStringEquals(Matcher m, Object arg) {
|
/external/junit/src/org/junit/internal/ |
AssumptionViolatedException.java | 4 import org.hamcrest.Matcher; 13 private final Matcher<?> fMatcher; 15 public AssumptionViolatedException(Object value, Matcher<?> matcher) { 18 fMatcher= matcher;
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/matchers/ |
CompoundButtonCheckedMatcher.java | 6 import org.hamcrest.Matcher; 25 public static <T extends CompoundButton> Matcher<T> isChecked(boolean expectedChecked) {
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/build/ |
BaseBuilderTest.java | 19 import java.util.regex.Matcher; 30 Matcher m = p.matcher(s);
|
/external/mockito/src/org/mockito/internal/invocation/ |
ArgumentsComparator.java | 7 import org.hamcrest.Matcher;
42 List<Matcher> matchers = invocationMatcher.getMatchers();
49 Matcher m = matchers.get(i);
52 Matcher actualMatcher;
|
ArgumentsProcessor.java | 7 import org.hamcrest.Matcher; 41 public static List<Matcher> argumentsToMatchers(Object[] arguments) { 42 List<Matcher> matchers = new ArrayList<Matcher>(arguments.length);
|
InvocationMatcher.java | 14 import org.hamcrest.Matcher; 28 private final List<Matcher> matchers; 30 public InvocationMatcher(Invocation invocation, List<Matcher> matchers) { 40 this(invocation, Collections.<Matcher>emptyList()); 51 public List<Matcher> getMatchers() { 122 Matcher m = matchers.get(position); 133 private boolean isVarargMatcher(Matcher matcher) { 134 Matcher actualMatcher = matcher; [all...] |
MatchersBinder.java | 8 import org.hamcrest.Matcher; 26 InvocationMatcher invocationWithMatchers = new InvocationMatcher(invocation, (List<Matcher>)(List) lastMatchers);
|
/external/apache-harmony/regex/src/test/java/org/apache/harmony/tests/java/util/regex/ |
MatcherTest.java | 20 import java.util.regex.Matcher; 46 Matcher m = p.matcher("axxxxxa"); 81 Matcher m = pat.matcher("Today is XX-XX-XX ..."); 93 Matcher m = p.matcher("xx $ equals to xx rur."); 107 Matcher mat = pat.matcher(input); 113 * Class under test for Matcher reset(CharSequence 605 Matcher matcher = pattern.matcher(input); local 651 Matcher matcher = pattern.matcher("abcde"); local 671 Matcher matcher = pattern.matcher(inputStr); local 706 Matcher matcher = pattern.matcher(s[i]); local 751 Matcher matcher = pattern.matcher(input); local [all...] |
/external/chromium/chrome/browser/sync/ |
js_test_util.h | 27 // A matcher for gmock. Use like: 30 ::testing::Matcher<const JsArgList&> HasArgs(const JsArgList& expected_args); 33 ::testing::Matcher<const JsArgList&> HasArgsAsList(
|
/external/junit/src/org/junit/ |
Assume.java | 7 import org.hamcrest.Matcher; 51 * Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>. 61 * @param <T> the static type accepted by the matcher (this can flag obvious compile-time problems such as {@code assumeThat(1, is("a"))} 63 * @param matcher an expression, built of {@link Matcher}s, specifying allowed values 68 public static <T> void assumeThat(T actual, Matcher<T> matcher) { 69 if (!matcher.matches(actual)) 70 throw new AssumptionViolatedException(actual, matcher);
|