Home
last modified time | relevance | path

Searched refs:matchers (Results 1 – 25 of 218) sorted by relevance

123456789

/external/mockito/src/test/java/org/mockito/internal/invocation/
DMatcherApplicationStrategyTest.java12 import static org.mockito.internal.matchers.Any.ANY;
21 import org.mockito.internal.matchers.Any;
22 import org.mockito.internal.matchers.Equals;
23 import org.mockito.internal.matchers.InstanceOf;
34 private List matchers; field in MatcherApplicationStrategyTest
47 matchers = asList(new Equals("1")); in shouldKnowWhenActualArgsSizeIsDifferent1()
50 …boolean match = getMatcherApplicationStrategyFor(invocation, matchers).forEachMatcherAndArgument(R… in shouldKnowWhenActualArgsSizeIsDifferent1()
60 matchers = asList(new Equals("1")); in shouldKnowWhenActualArgsSizeIsDifferent2()
63 …boolean match = getMatcherApplicationStrategyFor(invocation, matchers).forEachMatcherAndArgument(R… in shouldKnowWhenActualArgsSizeIsDifferent2()
73 matchers = asList(new Equals("1")); in shouldKnowWhenActualArgsSizeIsDifferent()
[all …]
/external/mockito/src/main/java/org/mockito/internal/invocation/
DMatcherApplicationStrategy.java15 import org.mockito.internal.matchers.CapturingMatcher;
16 import org.mockito.internal.matchers.VarargMatcher;
22 private final List<ArgumentMatcher<?>> matchers; field in MatcherApplicationStrategy
27 …private MatcherApplicationStrategy(Invocation invocation, List<ArgumentMatcher<?>> matchers, Match… in MatcherApplicationStrategy() argument
31 this.matchers = appendLastMatcherNTimes(matchers, times); in MatcherApplicationStrategy()
33 this.matchers = matchers; in MatcherApplicationStrategy()
51 …rategy getMatcherApplicationStrategyFor(Invocation invocation, List<ArgumentMatcher<?>> matchers) { in getMatcherApplicationStrategyFor() argument
53 MatcherApplicationType type = getMatcherApplicationType(invocation, matchers); in getMatcherApplicationStrategyFor()
54 return new MatcherApplicationStrategy(invocation, matchers, type); in getMatcherApplicationStrategyFor()
79 ArgumentMatcher<?> matcher = matchers.get(i); in forEachMatcherAndArgument()
[all …]
DInvocationMatcher.java19 import org.mockito.internal.matchers.CapturesArguments;
33 private final List<ArgumentMatcher<?>> matchers; field in InvocationMatcher
36 public InvocationMatcher(Invocation invocation, List<ArgumentMatcher> matchers) { in InvocationMatcher() argument
38 if (matchers.isEmpty()) { in InvocationMatcher()
39 this.matchers = (List) argumentsToMatchers(invocation.getArguments()); in InvocationMatcher()
41 this.matchers = (List) matchers; in InvocationMatcher()
70 return (List) matchers; in getMatchers()
76 return new PrintSettings().print((List) matchers, invocation); in toString()
131 … MatcherApplicationStrategy strategy = getMatcherApplicationStrategyFor(invocation, matchers); in captureArgumentsFrom()
151 List matchers = getMatchers();
[all …]
DArgumentsProcessor.java8 import org.mockito.internal.matchers.ArrayEquals;
9 import org.mockito.internal.matchers.Equals;
45 List<ArgumentMatcher> matchers = new ArrayList<ArgumentMatcher>(arguments.length); in argumentsToMatchers() local
48 matchers.add(new ArrayEquals(arg)); in argumentsToMatchers()
50 matchers.add(new Equals(arg)); in argumentsToMatchers()
53 return matchers; in argumentsToMatchers()
/external/easymock/src/org/easymock/internal/
DExpectedInvocation.java25 import org.easymock.internal.matchers.Equals;
36 private final List<IArgumentMatcher> matchers; field in ExpectedInvocation
39 List<IArgumentMatcher> matchers) { in ExpectedInvocation() argument
40 this(invocation, matchers, null); in ExpectedInvocation()
44 List<IArgumentMatcher> matchers, @SuppressWarnings("deprecation") in ExpectedInvocation() argument
48 this.matchers = (matcher == null) ? createMissingMatchers(invocation, in ExpectedInvocation()
49 matchers) : null; in ExpectedInvocation()
53 List<IArgumentMatcher> matchers) { in createMissingMatchers() argument
54 if (matchers != null) { in createMissingMatchers()
55 if (matchers.size() != invocation.getArguments().length) { in createMissingMatchers()
[all …]
DLegacyMatcherProvider.java36 …private transient Map<Method, ArgumentsMatcher> matchers = new HashMap<Method, ArgumentsMatcher>(); field in LegacyMatcherProvider
39 if (!matchers.containsKey(method)) { in getMatcher()
43 matchers.put(method, defaultMatcher); in getMatcher()
45 return matchers.get(method); in getMatcher()
59 if (matchers.containsKey(method) && matchers.get(method) != matcher) { in setMatcher()
68 matchers.put(method, matcher); in setMatcher()
77 matchers = new HashMap<Method, ArgumentsMatcher>(map.size()); in readObject()
82 matchers.put(method, entry.getValue()); in readObject()
95 matchers.size()); in writeObject()
96 for (Map.Entry<Method, ArgumentsMatcher> matcher : matchers.entrySet()) { in writeObject()
/external/hamcrest/hamcrest-library/src/main/java/org/hamcrest/collection/
DIsIterableContainingInRelativeOrder.java14 private final List<Matcher<? super E>> matchers; field in IsIterableContainingInRelativeOrder
16 public IsIterableContainingInRelativeOrder(List<Matcher<? super E>> matchers) { in IsIterableContainingInRelativeOrder() argument
17 this.matchers = matchers; in IsIterableContainingInRelativeOrder()
22 …Order<E> matchSeriesInRelativeOrder = new MatchSeriesInRelativeOrder<E>(matchers, mismatchDescript… in matchesSafely()
28 …description.appendText("iterable containing ").appendList("[", ", ", "]", matchers).appendText(" i… in describeTo()
32 public final List<Matcher<? super F>> matchers; field in IsIterableContainingInRelativeOrder.MatchSeriesInRelativeOrder
37 …public MatchSeriesInRelativeOrder(List<Matcher<? super F>> matchers, Description mismatchDescripti… in MatchSeriesInRelativeOrder() argument
39 if (matchers.isEmpty()) { in MatchSeriesInRelativeOrder()
42 this.matchers = matchers; in MatchSeriesInRelativeOrder()
47 if (nextMatchIx < matchers.size()) { in processItems()
[all …]
DIsIterableContainingInAnyOrder.java15 private final Collection<Matcher<? super T>> matchers; field in IsIterableContainingInAnyOrder
17 public IsIterableContainingInAnyOrder(Collection<Matcher<? super T>> matchers) { in IsIterableContainingInAnyOrder() argument
18 this.matchers = matchers; in IsIterableContainingInAnyOrder()
23 final Matching<T> matching = new Matching<T>(matchers, mismatchDescription); in matchesSafely()
36 .appendList("[", ", ", "]", matchers) in describeTo()
41 private final Collection<Matcher<? super S>> matchers; field in IsIterableContainingInAnyOrder.Matching
44 public Matching(Collection<Matcher<? super S>> matchers, Description mismatchDescription) { in Matching() argument
45 this.matchers = new ArrayList<Matcher<? super S>>(matchers); in Matching()
50 if (matchers.isEmpty()) { in matches()
58 if (matchers.isEmpty()) { in isFinished()
[all …]
DIsIterableContainingInOrder.java15 private final List<Matcher<? super E>> matchers; field in IsIterableContainingInOrder
17 public IsIterableContainingInOrder(List<Matcher<? super E>> matchers) { in IsIterableContainingInOrder() argument
18 this.matchers = matchers; in IsIterableContainingInOrder()
23 final MatchSeries<E> matchSeries = new MatchSeries<E>(matchers, mismatchDescription); in matchesSafely()
35 description.appendText("iterable containing ").appendList("[", ", ", "]", matchers); in describeTo()
39 private final List<Matcher<? super F>> matchers; field in IsIterableContainingInOrder.MatchSeries
43 public MatchSeries(List<Matcher<? super F>> matchers, Description mismatchDescription) { in MatchSeries() argument
45 if (matchers.isEmpty()) { in MatchSeries()
48 this.matchers = matchers; in MatchSeries()
52 if (matchers.size() <= nextMatchIx) { in matches()
[all …]
DIsArrayContainingInAnyOrder.java16 private final Collection<Matcher<? super E>> matchers; field in IsArrayContainingInAnyOrder
18 public IsArrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) { in IsArrayContainingInAnyOrder() argument
19 this.iterableMatcher = new IsIterableContainingInAnyOrder<E>(matchers); in IsArrayContainingInAnyOrder()
20 this.matchers = matchers; in IsArrayContainingInAnyOrder()
35 description.appendList("[", ", ", "]", matchers) in describeTo()
106 List<Matcher<? super E>> matchers = new ArrayList<Matcher<? super E>>(); in arrayContainingInAnyOrder() local
108 matchers.add(equalTo(item)); in arrayContainingInAnyOrder()
110 return new IsArrayContainingInAnyOrder<E>(matchers); in arrayContainingInAnyOrder()
DIsArrayContainingInOrder.java16 private final Collection<Matcher<? super E>> matchers; field in IsArrayContainingInOrder
19 public IsArrayContainingInOrder(List<Matcher<? super E>> matchers) { in IsArrayContainingInOrder() argument
20 this.iterableMatcher = new IsIterableContainingInOrder<E>(matchers); in IsArrayContainingInOrder()
21 this.matchers = matchers; in IsArrayContainingInOrder()
36 description.appendList("[", ", ", "]", matchers); in describeTo()
50 List<Matcher<? super E>> matchers = new ArrayList<Matcher<? super E>>(); in arrayContaining() local
52 matchers.add(equalTo(item)); in arrayContaining()
54 return arrayContaining(matchers); in arrayContaining()
/external/hamcrest/hamcrest-core/src/main/java/org/hamcrest/core/
DAllOf.java16 private final Iterable<Matcher<? super T>> matchers; field in AllOf
18 public AllOf(Iterable<Matcher<? super T>> matchers) { in AllOf() argument
19 this.matchers = matchers; in AllOf()
24 for (Matcher<? super T> matcher : matchers) { in matches()
36 description.appendList("(", " " + "and" + " ", ")", matchers); in describeTo()
44 public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { in allOf() argument
45 return new AllOf<>(matchers); in allOf()
54 public static <T> Matcher<T> allOf(Matcher<? super T>... matchers) { in allOf() argument
55 return allOf((List) Arrays.asList(matchers)); in allOf()
DShortcutCombination.java9 private final Iterable<Matcher<? super T>> matchers; field in ShortcutCombination
11 public ShortcutCombination(Iterable<Matcher<? super T>> matchers) { in ShortcutCombination() argument
12 this.matchers = matchers; in ShortcutCombination()
22 for (Matcher<? super T> matcher : matchers) { in matches()
31 description.appendList("(", " " + operator + " ", ")", matchers); in describeTo()
DAnyOf.java15 public AnyOf(Iterable<Matcher<? super T>> matchers) { in AnyOf() argument
16 super(matchers); in AnyOf()
34 public static <T> AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers) { in anyOf() argument
35 return new AnyOf<>(matchers); in anyOf()
44 public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers) { in anyOf() argument
45 return anyOf((List) Arrays.asList(matchers)); in anyOf()
/external/proguard/src/proguard/util/
DListMatcher.java33 private final StringMatcher[] matchers; field in ListMatcher
37 public ListMatcher(StringMatcher[] matchers) in ListMatcher() argument
39 this(matchers, null); in ListMatcher()
43 public ListMatcher(StringMatcher[] matchers, boolean[] negate) in ListMatcher() argument
45 this.matchers = matchers; in ListMatcher()
55 for (int index = 0; index < matchers.length; index++) in matches()
57 StringMatcher matcher = matchers[index]; in matches()
/external/mockito/src/test/java/org/mockito/internal/verification/argumentmatching/
DArgumentMatchingToolTest.java9 import org.mockito.internal.matchers.ContainsExtraTypeInfo;
10 import org.mockito.internal.matchers.Equals;
27 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(1)); in shouldNotFindAnySuspiciousMatchersWhenNumberOfArgumentsDoesntMatch() local
30 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldNotFindAnySuspiciousMatchersWhenNumberOfArgumentsDoesntMatch()
39 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), new Equals(20)); in shouldNotFindAnySuspiciousMatchersWhenArgumentsMatch() local
42 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldNotFindAnySuspiciousMatchersWhenArgumentsMatch()
55 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), matcherInt20); in shouldFindSuspiciousMatchers() local
56 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldFindSuspiciousMatchers()
117 List<ArgumentMatcher> matchers = (List) singletonList(new StringMatcher()); in shouldUseMatchersSafely() local
120 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldUseMatchersSafely()
/external/mockito/src/main/java/org/mockito/internal/matchers/text/
DMatchersPrinter.java5 package org.mockito.internal.matchers.text;
8 import org.mockito.internal.matchers.ContainsExtraTypeInfo;
18 public String getArgumentsLine(List<ArgumentMatcher> matchers, PrintSettings printSettings) { in getArgumentsLine() argument
19 Iterator args = applyPrintSettings(matchers, printSettings); in getArgumentsLine()
23 public String getArgumentsBlock(List<ArgumentMatcher> matchers, PrintSettings printSettings) { in getArgumentsBlock() argument
24 Iterator args = applyPrintSettings(matchers, printSettings); in getArgumentsBlock()
28 …private Iterator<FormattedText> applyPrintSettings(List<ArgumentMatcher> matchers, PrintSettings p… in applyPrintSettings() argument
31 for (final ArgumentMatcher matcher : matchers) { in applyPrintSettings()
/external/easymock/src/org/easymock/internal/matchers/
DOr.java16 package org.easymock.internal.matchers;
28 private final List<IArgumentMatcher> matchers; field in Or
30 public Or(List<IArgumentMatcher> matchers) { in Or() argument
31 this.matchers = matchers; in Or()
35 for (IArgumentMatcher matcher : matchers) { in matches()
45 for (Iterator<IArgumentMatcher> it = matchers.iterator(); it.hasNext();) { in appendTo()
DAnd.java16 package org.easymock.internal.matchers;
28 private final List<IArgumentMatcher> matchers; field in And
30 public And(List<IArgumentMatcher> matchers) { in And() argument
31 this.matchers = matchers; in And()
35 for (IArgumentMatcher matcher : matchers) { in matches()
45 for (Iterator<IArgumentMatcher> it = matchers.iterator(); it.hasNext();) { in appendTo()
/external/junit/src/main/java/org/junit/rules/
DExpectedExceptionMatcherBuilder.java4 import static org.junit.matchers.JUnitMatchers.isThrowable;
16 private final List<Matcher<?>> matchers = new ArrayList<Matcher<?>>(); field in ExpectedExceptionMatcherBuilder
19 matchers.add(matcher); in add()
23 return !matchers.isEmpty(); in expectsThrowable()
31 if (matchers.size() == 1) { in allOfTheMatchers()
32 return cast(matchers.get(0)); in allOfTheMatchers()
39 return new ArrayList<Matcher<? super Throwable>>((List) matchers); in castedMatchers()
/external/mockito/src/main/java/org/mockito/
DArgumentMatchers.java15 import org.mockito.internal.matchers.Any;
16 import org.mockito.internal.matchers.Contains;
17 import org.mockito.internal.matchers.EndsWith;
18 import org.mockito.internal.matchers.Equals;
19 import org.mockito.internal.matchers.InstanceOf;
20 import org.mockito.internal.matchers.Matches;
21 import org.mockito.internal.matchers.NotNull;
22 import org.mockito.internal.matchers.Null;
23 import org.mockito.internal.matchers.Same;
24 import org.mockito.internal.matchers.StartsWith;
[all …]
/external/clang/docs/
DLibASTMatchers.rst25 AST matchers are predicates on nodes in the AST. Matchers are created by
26 calling creator functions that allow building up a tree of matchers, where
27 inner matchers are used to make the match more specific.
35 unions that are named "``Foo``", in any namespace. By default, matchers that
36 accept multiple inner matchers use an implicit `allOf()
47 matcher you are interested in. Note that there will always be matchers missing
49 AST matchers <astmatchers-writing>` later in this document.
53 The precondition to using the matchers is to understand how the AST for what you
61 In general, the strategy to create the right matchers is:
65 matchers that either match the node you're interested in or narrow down
[all …]
/external/googletest/googlemock/
DCHANGES4 * New feature: matchers DoubleNear(), FloatNear(),
9 * Improvement: when compiled by a C++11 compiler, matchers AllOf()
10 and AnyOf() can accept an arbitrary number of matchers.
11 * Improvement: when compiled by a C++11 compiler, matchers
16 definition of composite matchers.
40 * New matchers: Pointwise(), Each().
67 composite matchers.
68 * The new matcher API lets user-defined matchers generate custom
74 * Regular expression matchers on all platforms.
83 * Custom matchers defined using MatcherInterface or MakePolymorphicMatcher()
[all …]
/external/v8/testing/gmock/
DCHANGES4 * New feature: matchers DoubleNear(), FloatNear(),
9 * Improvement: when compiled by a C++11 compiler, matchers AllOf()
10 and AnyOf() can accept an arbitrary number of matchers.
11 * Improvement: when compiled by a C++11 compiler, matchers
16 definition of composite matchers.
40 * New matchers: Pointwise(), Each().
67 composite matchers.
68 * The new matcher API lets user-defined matchers generate custom
74 * Regular expression matchers on all platforms.
83 * Custom matchers defined using MatcherInterface or MakePolymorphicMatcher()
[all …]
/external/mockito/src/main/java/org/mockito/internal/reporting/
DPrintSettings.java10 import org.mockito.internal.matchers.text.MatchersPrinter;
47 public String print(List<ArgumentMatcher> matchers, Invocation invocation) { in print() argument
50 String invocationString = qualifiedName + matchersPrinter.getArgumentsLine(matchers, this); in print()
51 if (isMultiline() || (!matchers.isEmpty() && invocationString.length() > MAX_LINE_LENGTH)) { in print()
52 return qualifiedName + matchersPrinter.getArgumentsBlock(matchers, this); in print()

123456789