Home
last modified time | relevance | path

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

12345678910

/external/mockito/src/test/java/org/mockito/internal/invocation/
DMatcherApplicationStrategyTest.java12 import static org.mockito.internal.matchers.Any.ANY;
24 import org.mockito.internal.matchers.Any;
25 import org.mockito.internal.matchers.Equals;
26 import org.mockito.internal.matchers.InstanceOf;
27 import org.mockito.internal.matchers.VarargMatcher;
38 private List matchers; field in MatcherApplicationStrategyTest
51 matchers = asList(new Equals("1")); in shouldKnowWhenActualArgsSizeIsDifferent1()
54 …boolean match = getMatcherApplicationStrategyFor(invocation, matchers).forEachMatcherAndArgument(R… in shouldKnowWhenActualArgsSizeIsDifferent1()
64 matchers = asList(new Equals("1")); in shouldKnowWhenActualArgsSizeIsDifferent2()
67 …boolean match = getMatcherApplicationStrategyFor(invocation, matchers).forEachMatcherAndArgument(R… in shouldKnowWhenActualArgsSizeIsDifferent2()
[all …]
/external/mockito/src/main/java/org/mockito/internal/invocation/
DMatcherApplicationStrategy.java16 import org.mockito.internal.matchers.CapturingMatcher;
17 import org.mockito.internal.matchers.VarargMatcher;
23 private final List<ArgumentMatcher<?>> matchers; field in MatcherApplicationStrategy
28 …private MatcherApplicationStrategy(Invocation invocation, List<ArgumentMatcher<?>> matchers, Match… in MatcherApplicationStrategy() argument
32 this.matchers = appendLastMatcherNTimes(matchers, times); in MatcherApplicationStrategy()
34 this.matchers = matchers; in MatcherApplicationStrategy()
52 …rategy getMatcherApplicationStrategyFor(Invocation invocation, List<ArgumentMatcher<?>> matchers) { in getMatcherApplicationStrategyFor() argument
54 MatcherApplicationType type = getMatcherApplicationType(invocation, matchers); in getMatcherApplicationStrategyFor()
55 return new MatcherApplicationStrategy(invocation, matchers, type); in getMatcherApplicationStrategyFor()
80 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;
55 List<ArgumentMatcher> matchers = new ArrayList<ArgumentMatcher>(arguments.length); in argumentsToMatchers() local
58 matchers.add(new ArrayEquals(arg)); in argumentsToMatchers()
60 matchers.add(new Equals(arg)); in argumentsToMatchers()
63 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/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/
DSeriesMatcher.java18 protected List<NumberParseMatcher> matchers = null; field in SeriesMatcher
23 if (matchers == null) { in addMatcher()
24 matchers = new ArrayList<NumberParseMatcher>(); in addMatcher()
26 matchers.add(matcher); in addMatcher()
34 return matchers == null ? 0 : matchers.size(); in length()
40 if (matchers == null) { in match()
50 for (int i = 0; i < matchers.size();) { in match()
51 NumberParseMatcher matcher = matchers.get(i); in match()
69 …if (i < matchers.size() && segment.getOffset() != result.charEnd && result.charEnd > matcherOffset… in match()
90 if (matchers == null) { in smokeTest()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/parse/
DSeriesMatcher.java20 protected List<NumberParseMatcher> matchers = null; field in SeriesMatcher
25 if (matchers == null) { in addMatcher()
26 matchers = new ArrayList<NumberParseMatcher>(); in addMatcher()
28 matchers.add(matcher); in addMatcher()
36 return matchers == null ? 0 : matchers.size(); in length()
42 if (matchers == null) { in match()
52 for (int i = 0; i < matchers.size();) { in match()
53 NumberParseMatcher matcher = matchers.get(i); in match()
71 …if (i < matchers.size() && segment.getOffset() != result.charEnd && result.charEnd > matcherOffset… in match()
92 if (matchers == null) { in smokeTest()
[all …]
/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;
25 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(1)); in shouldNotFindAnySuspiciousMatchersWhenNumberOfArgumentsDoesntMatch() local
28 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldNotFindAnySuspiciousMatchersWhenNumberOfArgumentsDoesntMatch()
37 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), new Equals(20)); in shouldNotFindAnySuspiciousMatchersWhenArgumentsMatch() local
40 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldNotFindAnySuspiciousMatchersWhenArgumentsMatch()
53 List<ArgumentMatcher> matchers = (List) Arrays.asList(new Equals(10), matcherInt20); in shouldFindSuspiciousMatchers() local
54 …Integer[] suspicious = ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(matchers, new Ob… in shouldFindSuspiciousMatchers()
111 List<ArgumentMatcher> matchers = (List) singletonList(new StringMatcher()); in shouldUseMatchersSafely() local
114 …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/catch2/docs/
Dmatchers.md12 which consists of either a single matcher or one or more matchers combined using `&&`, `||` or `!` …
23 The built-in string matchers, for example, take a second argument specifying whether the comparison…
30 And matchers can be combined:
38 ## Built in matchers
39 Catch currently provides some matchers, they are in the `Catch::Matchers` and `Catch` namespaces.
41 ### String matchers argument
42 The string matchers are `StartsWith`, `EndsWith`, `Contains`, `Equals` and `Matches`. The first fou…
44 Each of the provided `std::string` matchers also takes an optional second argument, that decides ca…
47 ### Vector matchers argument
48 The vector matchers are `Contains`, `VectorContains` and `Equals`. `VectorContains` looks for a sin…
[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/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 …]

12345678910