/external/hamcrest/src/org/hamcrest/core/ |
IsNot.java | 7 import org.hamcrest.Matcher; 13 * Calculates the logical negation of a matcher. 16 private final Matcher<T> matcher; field in class:IsNot 18 public IsNot(Matcher<T> matcher) { 19 this.matcher = matcher; 23 return !matcher.matches(arg); 27 description.appendText("not ").appendDescriptionOf(matcher); [all...] |
Is.java | 6 import org.hamcrest.Matcher; 11 * Decorates another Matcher, retaining the behavior but allowing tests 19 private final Matcher<T> matcher; field in class:Is 21 public Is(Matcher<T> matcher) { 22 this.matcher = matcher; 26 return matcher.matches(arg); 30 description.appendText("is ").appendDescriptionOf(matcher); [all...] |
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...] |
AllOf.java | 4 import org.hamcrest.Matcher; 12 * shortcut, so that the second matcher is not called if the first 13 * matcher returns <code>false</code>. 16 private final Iterable<Matcher<? extends T>> matchers; 18 public AllOf(Iterable<Matcher<? extends T>> matchers) { 23 for (Matcher<? extends T> matcher : matchers) { 24 if (!matcher.matches(o)) { 39 public static <T> Matcher<T> allOf(Matcher<? extends T>... matchers) [all...] |
AnyOf.java | 4 import org.hamcrest.Matcher; 12 * shortcut, so that the second matcher is not called if the first 13 * matcher returns <code>true</code>. 17 private final Iterable<Matcher<? extends T>> matchers; 19 public AnyOf(Iterable<Matcher<? extends T>> matchers) { 24 for (Matcher<? extends T> matcher : matchers) { 25 if (matcher.matches(o)) { 40 public static <T> Matcher<T> anyOf(Matcher<? extends T>... matchers) [all...] |
/external/hamcrest/src/org/hamcrest/ |
BaseMatcher.java | 6 * BaseClass for all Matcher implementations. 8 * @see Matcher 10 public abstract class BaseMatcher<T> implements Matcher<T> { 13 * @see Matcher#_dont_implement_Matcher___instead_extend_BaseMatcher_() 16 // See Matcher interface for an explanation of this method.
|
Matcher.java | 6 * A matcher over acceptable values. 7 * A matcher is able to describe itself to give feedback when it fails. 9 * Matcher implementations should <b>NOT directly implement this interface</b>. 11 * which will ensure that the Matcher API can grow to support 12 * new features and remain compatible with all Matcher implementations. 14 * For easy access to common Matcher implementations, use the static factory 21 public interface Matcher<T> extends SelfDescribing { 24 * Evaluates the matcher for argument <var>item</var>. 27 * because the caller of the Matcher does not know at runtime what the type is 31 * @param item the object against which the matcher is evaluated [all...] |
CoreMatchers.java | 7 * Decorates another Matcher, retaining the behavior but allowing tests 13 public static <T> org.hamcrest.Matcher<T> is(org.hamcrest.Matcher<T> matcher) { 14 return org.hamcrest.core.Is.is(matcher); 23 public static <T> org.hamcrest.Matcher<T> is(T value) { 33 public static org.hamcrest.Matcher<java.lang.Object> is(java.lang.Class<?> type) { 40 public static <T> org.hamcrest.Matcher<T> not(org.hamcrest.Matcher<T> matcher) { [all...] |
/external/junit/src/org/junit/internal/matchers/ |
CombinableMatcher.java | 7 import org.hamcrest.Matcher; 11 private final Matcher<? extends T> fMatcher; 13 public CombinableMatcher(Matcher<? extends T> matcher) { 14 fMatcher= matcher; 26 public CombinableMatcher<T> and(Matcher<? extends T> matcher) { 27 return new CombinableMatcher<T>(allOf(matcher, fMatcher)); 31 public CombinableMatcher<T> or(Matcher<? extends T> matcher) { [all...] |
IsCollectionContaining.java | 11 import org.hamcrest.Matcher; 15 private final Matcher<? extends T> elementMatcher; 17 public IsCollectionContaining(Matcher<? extends T> elementMatcher) { 38 public static <T> Matcher<Iterable<T>> hasItem(Matcher<? extends T> elementMatcher) { 43 public static <T> Matcher<Iterable<T>> hasItem(T element) { 48 public static <T> Matcher<Iterable<T>> hasItems(Matcher<? extends T>... elementMatchers) { 49 Collection<Matcher<? extends Iterable<T>>> all 50 = new ArrayList<Matcher<? extends Iterable<T>>>(elementMatchers.length) [all...] |
Each.java | 7 import org.hamcrest.Matcher; 10 public static <T> Matcher<Iterable<T>> each(final Matcher<T> individual) { 11 final Matcher<Iterable<T>> allItemsAre = not(hasItem(not(individual)));
|
/frameworks/base/core/tests/coretests/src/android/net/ |
UriMatcherTest.java | 45 UriMatcher matcher = new UriMatcher(ROOT); local 46 matcher.addURI("people", null, PEOPLE); 47 matcher.addURI("people", "#", PEOPLE_ID); 48 matcher.addURI("people", "#/phones", PEOPLE_PHONES); 49 matcher.addURI("people", "#/phones/blah", PEOPLE_PHONES_ID); 50 matcher.addURI("people", "#/phones/#", PEOPLE_PHONES_ID); 51 matcher.addURI("people", "#/addresses", PEOPLE_ADDRESSES); 52 matcher.addURI("people", "#/addresses/#", PEOPLE_ADDRESSES_ID); 53 matcher.addURI("people", "#/contact-methods", PEOPLE_CONTACTMETH); 54 matcher.addURI("people", "#/contact-methods/#", PEOPLE_CONTACTMETH_ID) 66 UriMatcher matcher = new UriMatcher(ROOT); local [all...] |
/external/junit/src/org/junit/matchers/ |
JUnitMatchers.java | 3 import org.hamcrest.Matcher; 16 * @return A matcher matching any collection containing element 18 public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItem(T element) { 24 * @return A matcher matching any collection containing an element matching elementMatcher 26 public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItem(org.hamcrest.Matcher<? extends T> elementMatcher) { 32 * @return A matcher matching any collection containing every element in elements 34 public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItems(T... elements) { 40 * @return A matcher matching any collection containing at least one element that matches 41 * each matcher in elementMatcher (this may be one element matching all matchers [all...] |
/frameworks/base/media/mca/filterfw/java/android/filterfw/io/ |
PatternScanner.java | 20 import java.util.regex.Matcher; 50 // Create the matcher 51 Matcher matcher = pattern.matcher(mInput); local 52 matcher.region(mOffset, mInput.length()); 56 if (matcher.lookingAt()) { 57 updateLineCount(mOffset, matcher.end()); 58 mOffset = matcher.end(); 59 result = mInput.substring(matcher.start(), matcher.end()) 85 Matcher matcher = pattern.matcher(mInput); local 93 Matcher matcher = pattern.matcher(mInput); local [all...] |
/libcore/luni/src/main/native/ |
java_util_regex_Matcher.cpp | 17 #define LOG_TAG "Matcher" 125 MatcherAccessor matcher(env, addr, javaText, false); 126 UBool result = matcher->find(startIndex, matcher.status()); 128 matcher.updateOffsets(offsets); 134 MatcherAccessor matcher(env, addr, javaText, false); 135 if (matcher.status() != U_ZERO_ERROR) { 138 UBool result = matcher->find(); 140 matcher.updateOffsets(offsets); 146 MatcherAccessor matcher(env, addr) [all...] |
/external/mockito/src/org/mockito/internal/matchers/ |
And.java | 13 import org.hamcrest.Matcher; 20 private final List<Matcher> matchers; 22 public And(List<Matcher> matchers) { 27 for (Matcher matcher : matchers) { 28 if (!matcher.matches(actual)) { 37 for (Iterator<Matcher> it = matchers.iterator(); it.hasNext();) {
|
Or.java | 13 import org.hamcrest.Matcher; 20 private final List<Matcher> matchers; 22 public Or(List<Matcher> matchers) { 27 for (Matcher matcher : matchers) { 28 if (matcher.matches(actual)) { 37 for (Iterator<Matcher> it = matchers.iterator(); it.hasNext();) {
|
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);
|
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
UriMatcherTest.java | 22 UriMatcher matcher; field in class:UriMatcherTest 28 matcher = new UriMatcher(NO_MATCH); 29 root = Robolectric.shadowOf(matcher).rootNode; 43 matcher.addURI(AUTH, path, 1); 57 matcher.addURI(AUTH, "#", 1); 58 matcher.addURI(AUTH, "*", 2); 66 matcher.addURI(AUTH, "bar", 1); 67 assertThat(matcher.match(Uri.withAppendedPath(URI, "bar")), is(1)); 69 matcher.addURI(AUTH, "bar/#", 2); 70 assertThat(matcher.match(Uri.withAppendedPath(URI, "bar/1")), is(2)) [all...] |
/external/robolectric/lib/main/ |
hamcrest-core-1.2.jar | |
/external/guava/guava-tests/test/com/google/common/base/ |
CharMatcherTest.java | 126 private void doTestEmpty(CharMatcher matcher) throws Exception { 127 reallyTestEmpty(matcher); 128 reallyTestEmpty(matcher.negate()); 129 reallyTestEmpty(matcher.precomputed()); 132 private void reallyTestEmpty(CharMatcher matcher) throws Exception { 133 assertEquals(-1, matcher.indexIn("")); 134 assertEquals(-1, matcher.indexIn("", 0)); 136 matcher.indexIn("", 1); 141 matcher.indexIn("", -1); 145 assertEquals(-1, matcher.lastIndexIn("")) [all...] |
/external/mockito/src/org/mockito/internal/progress/ |
ArgumentMatcherStorage.java | 7 import org.hamcrest.Matcher;
15 HandyReturnValues reportMatcher(Matcher matcher);
|
/external/chromium_org/chrome/browser/extensions/api/declarative_content/ |
content_condition_unittest.cc | 13 #include "extensions/common/matcher/url_matcher.h" 24 URLMatcher matcher; local 27 matcher.condition_factory(), 37 EXPECT_TRUE(matcher.IsEmpty()) << "Errors shouldn't add URL conditions"; 41 URLMatcher matcher; local 44 matcher.condition_factory(), 54 EXPECT_TRUE(matcher.IsEmpty()) << "Errors shouldn't add URL conditions"; 58 URLMatcher matcher; local 61 matcher.condition_factory(), 71 EXPECT_TRUE(matcher.IsEmpty()) << "Errors shouldn't add URL conditions" 75 URLMatcher matcher; local [all...] |
/external/llvm/utils/TableGen/ |
DAGISelMatcher.h | 1 //===- DAGISelMatcher.h - Representation of DAG pattern matcher -----------===// 22 class Matcher; 31 Matcher *ConvertPatternToMatcher(const PatternToMatch &Pattern,unsigned Variant, 33 Matcher *OptimizeMatcher(Matcher *Matcher, const CodeGenDAGPatterns &CGP); 34 void EmitMatcherTable(const Matcher *Matcher, const CodeGenDAGPatterns &CGP, 38 /// Matcher - Base class for all the DAG ISel Matcher representatio [all...] |
/external/chromium_org/ash/wm/workspace/ |
magnetism_matcher_unittest.cc | 16 MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges); 17 EXPECT_FALSE(matcher.AreEdgesObscured()); 19 EXPECT_FALSE(matcher.ShouldAttach( 22 EXPECT_FALSE(matcher.AreEdgesObscured()); 23 EXPECT_TRUE(matcher.ShouldAttach( 29 EXPECT_TRUE(matcher.ShouldAttach( 41 MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges); 42 EXPECT_FALSE(matcher.AreEdgesObscured()); 44 EXPECT_FALSE(matcher.ShouldAttach( 47 EXPECT_FALSE(matcher.AreEdgesObscured()) [all...] |