/external/jacoco/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ |
D | AbstractMatcherTest.java | 29 private final AbstractMatcher matcher = new AbstractMatcher() { field in AbstractMatcherTest 44 matcher.cursor = m.instructions.getFirst(); in skipNonOpcodes() 45 matcher.skipNonOpcodes(); in skipNonOpcodes() 46 assertSame(m.instructions.getLast(), matcher.cursor); in skipNonOpcodes() 49 matcher.skipNonOpcodes(); in skipNonOpcodes() 50 assertSame(m.instructions.getLast(), matcher.cursor); in skipNonOpcodes() 53 matcher.cursor = null; in skipNonOpcodes() 54 matcher.skipNonOpcodes(); in skipNonOpcodes() 63 matcher.cursor = m.instructions.getFirst(); in nextIs() 64 matcher.nextIs(Opcodes.ATHROW); in nextIs() [all …]
|
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/ |
D | LocaleMatcherTest.java | 76 LocaleMatcher matcher = newLocaleMatcher(further + ", " + closer); in assertCloser() local 77 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 78 matcher = newLocaleMatcher(closer + ", " + further); in assertCloser() 79 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 109 LocaleMatcher matcher = newLocaleMatcher("zh_CN, zh_TW, iw"); in testChinese() local 112 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant_TW")); in testChinese() 113 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant")); in testChinese() 114 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_TW")); in testChinese() 115 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_Hans_CN")); in testChinese() 116 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_CN")); in testChinese() [all …]
|
/external/guava/guava-tests/test/com/google/common/base/ |
D | CharMatcherTest.java | 132 private void doTestSetBits(CharMatcher matcher) { in doTestSetBits() argument 134 matcher.setBits(bitset); in doTestSetBits() 136 assertEquals(matcher.matches((char) i), bitset.get(i)); in doTestSetBits() 169 private void doTestEmpty(CharMatcher matcher) throws Exception { in doTestEmpty() argument 170 reallyTestEmpty(matcher); in doTestEmpty() 171 reallyTestEmpty(matcher.negate()); in doTestEmpty() 172 reallyTestEmpty(matcher.precomputed()); in doTestEmpty() 175 private void reallyTestEmpty(CharMatcher matcher) throws Exception { in reallyTestEmpty() argument 176 assertEquals(-1, matcher.indexIn("")); in reallyTestEmpty() 177 assertEquals(-1, matcher.indexIn("", 0)); in reallyTestEmpty() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/base/ |
D | CharMatcherTest.java | 132 private void doTestSetBits(CharMatcher matcher) { in doTestSetBits() argument 134 matcher.setBits(bitset); in doTestSetBits() 136 assertEquals(matcher.matches((char) i), bitset.get(i)); in doTestSetBits() 169 private void doTestEmpty(CharMatcher matcher) throws Exception { in doTestEmpty() argument 170 reallyTestEmpty(matcher); in doTestEmpty() 171 reallyTestEmpty(matcher.negate()); in doTestEmpty() 172 reallyTestEmpty(matcher.precomputed()); in doTestEmpty() 175 private void reallyTestEmpty(CharMatcher matcher) throws Exception { in reallyTestEmpty() argument 176 assertEquals(-1, matcher.indexIn("")); in reallyTestEmpty() 177 assertEquals(-1, matcher.indexIn("", 0)); in reallyTestEmpty() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ |
D | LocaleMatcherTest.java | 79 LocaleMatcher matcher = newLocaleMatcher(further + ", " + closer); in assertCloser() local 80 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 81 matcher = newLocaleMatcher(closer + ", " + further); in assertCloser() 82 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 87 LocaleMatcher matcher = newLocaleMatcher("zh_CN, zh_TW, iw"); in testChinese() local 90 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant_TW")); in testChinese() 91 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant")); in testChinese() 92 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_TW")); in testChinese() 93 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_Hans_CN")); in testChinese() 94 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_CN")); in testChinese() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/util/ |
D | LocaleMatcherTest.java | 82 LocaleMatcher matcher = newLocaleMatcher(further + ", " + closer); in assertCloser() local 83 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 84 matcher = newLocaleMatcher(closer + ", " + further); in assertCloser() 85 …+ " is closer to " + closer + " than to " + further, new ULocale(closer), matcher.getBestMatch(a)); in assertCloser() 90 LocaleMatcher matcher = newLocaleMatcher("zh_CN, zh_TW, iw"); in testChinese() local 93 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant_TW")); in testChinese() 94 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant")); in testChinese() 95 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_TW")); in testChinese() 96 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_Hans_CN")); in testChinese() 97 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_CN")); in testChinese() [all …]
|
/external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/core/ |
D | IsEqualTest.java | 14 Matcher<?> matcher = equalTo("irrelevant"); in copesWithNullsAndUnknownTypes() local 16 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 17 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 35 final Matcher<Object> matcher = equalTo(null); in canCompareNullValues() local 37 assertMatches(matcher, null); in canCompareNullValues() 38 assertDoesNotMatch(matcher, 2); in canCompareNullValues() 39 assertDoesNotMatch(matcher, "hi"); in canCompareNullValues() 40 assertDoesNotMatch(matcher, new String[] {"a", "b"}); in canCompareNullValues() 59 Matcher<Object> matcher = equalTo(null); in honoursIsEqualImplementationEvenWithNullValues() local 61 assertMatches(matcher, alwaysEqual); in honoursIsEqualImplementationEvenWithNullValues() [all …]
|
D | AnyOfTest.java | 16 Matcher<String> matcher = anyOf(equalTo("irrelevant"), startsWith("irr")); in copesWithNullsAndUnknownTypes() local 18 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 19 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 24 Matcher<String> matcher = anyOf(startsWith("goo"), endsWith("ood")); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() local 26 assertMatches("didn't pass both sub-matchers", matcher, "good"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 27 assertMatches("didn't pass second sub-matcher", matcher, "mood"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 28 assertMatches("didn't pass first sub-matcher", matcher, "goon"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 29 assertDoesNotMatch("didn't fail both sub-matchers", matcher, "flan"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 34 …Matcher<String> matcher = anyOf(startsWith("g"), startsWith("go"), endsWith("d"), startsWith("go")… in evaluatesToTheTheLogicalDisjunctionOfManyOtherMatchers() local 36 assertMatches("didn't pass middle sub-matcher", matcher, "vlad"); in evaluatesToTheTheLogicalDisjunctionOfManyOtherMatchers() [all …]
|
D | DescribedAsTest.java | 15 Matcher<Object> matcher = describedAs("irrelevant", anything()); in copesWithNullsAndUnknownTypes() local 17 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 18 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 23 Matcher<?> matcher = describedAs("my description", anything()); in overridesDescriptionOfOtherMatcherWithThatPassedToConstructor() local 25 assertDescription("my description", matcher); in overridesDescriptionOfOtherMatcherWithThatPassedToConstructor() 30 Matcher<?> matcher = describedAs("value 1 = %0, value 2 = %1", anything(), 33, 97); in appendsValuesToDescription() local 32 assertDescription("value 1 = <33>, value 2 = <97>", matcher); in appendsValuesToDescription() 37 Matcher<String> matcher = describedAs("irrelevant", equalTo("hi")); in celegatesMatchingToAnotherMatcher() local 39 assertMatches(matcher, "hi"); in celegatesMatchingToAnotherMatcher() 40 assertDoesNotMatch("matched", matcher, "oi"); in celegatesMatchingToAnotherMatcher() [all …]
|
D | IsTest.java | 15 Matcher<String> matcher = is("something"); in copesWithNullsAndUnknownTypes() local 17 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 18 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 23 final Matcher<Boolean> matcher = is(equalTo(true)); in matchesTheSameWayTheUnderlyingMatcherDoes() local 25 assertMatches(matcher, true); in matchesTheSameWayTheUnderlyingMatcherDoes() 26 assertDoesNotMatch(matcher, false); in matchesTheSameWayTheUnderlyingMatcherDoes() 37 final Matcher<String> matcher = is("A"); in providesConvenientShortcutForIsEqualTo() local 39 assertMatches(matcher, "A"); in providesConvenientShortcutForIsEqualTo() 46 final Matcher matcher = isA(Integer.class); in providesConvenientShortcutForIsInstanceOf() local 47 assertMatches(matcher, 1); in providesConvenientShortcutForIsInstanceOf() [all …]
|
D | AllOfTest.java | 18 Matcher<String> matcher = allOf(equalTo("irrelevant"), startsWith("irr")); in copesWithNullsAndUnknownTypes() local 20 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 21 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 26 Matcher<String> matcher = allOf(startsWith("goo"), endsWith("ood")); in evaluatesToTheTheLogicalConjunctionOfTwoOtherMatchers() local 28 assertMatches("didn't pass both sub-matchers", matcher, "good"); in evaluatesToTheTheLogicalConjunctionOfTwoOtherMatchers() 29 assertDoesNotMatch("didn't fail first sub-matcher", matcher, "mood"); in evaluatesToTheTheLogicalConjunctionOfTwoOtherMatchers() 30 assertDoesNotMatch("didn't fail second sub-matcher", matcher, "goon"); in evaluatesToTheTheLogicalConjunctionOfTwoOtherMatchers() 31 assertDoesNotMatch("didn't fail both sub-matchers", matcher, "fred"); in evaluatesToTheTheLogicalConjunctionOfTwoOtherMatchers() 36 …Matcher<String> matcher = allOf(startsWith("g"), startsWith("go"), endsWith("d"), startsWith("go")… in evaluatesToTheTheLogicalConjunctionOfManyOtherMatchers() local 38 assertMatches("didn't pass all sub-matchers", matcher, "good"); in evaluatesToTheTheLogicalConjunctionOfManyOtherMatchers() [all …]
|
/external/mockito/src/main/java/org/mockito/hamcrest/ |
D | MockitoHamcrest.java | 60 public static <T> T argThat(Matcher<T> matcher) { in argThat() argument 61 reportMatcher(matcher); in argThat() 62 return (T) defaultValue(genericTypeOfMatcher(matcher.getClass())); in argThat() 74 public static char charThat(Matcher<Character> matcher) { in charThat() argument 75 reportMatcher(matcher); in charThat() 88 public static boolean booleanThat(Matcher<Boolean> matcher) { in booleanThat() argument 89 reportMatcher(matcher); in booleanThat() 102 public static byte byteThat(Matcher<Byte> matcher) { in byteThat() argument 103 reportMatcher(matcher); in byteThat() 116 public static short shortThat(Matcher<Short> matcher) { in shortThat() argument [all …]
|
/external/libphonenumber/libphonenumber/test/com/google/i18n/phonenumbers/internal/ |
D | MatcherTest.java | 31 private void checkMatcherBehavesAsExpected(MatcherApi matcher) { in checkMatcherBehavesAsExpected() argument 36 assertInvalid(matcher, "1", desc); in checkMatcherBehavesAsExpected() 39 assertInvalid(matcher, "91", desc); in checkMatcherBehavesAsExpected() 40 assertInvalid(matcher, "81", desc); in checkMatcherBehavesAsExpected() 41 assertMatched(matcher, "911", desc); in checkMatcherBehavesAsExpected() 42 assertInvalid(matcher, "811", desc); in checkMatcherBehavesAsExpected() 43 assertTooLong(matcher, "9111", desc); in checkMatcherBehavesAsExpected() 44 assertInvalid(matcher, "8111", desc); in checkMatcherBehavesAsExpected() 47 assertMatched(matcher, "2", desc); in checkMatcherBehavesAsExpected() 48 assertMatched(matcher, "20", desc); in checkMatcherBehavesAsExpected() [all …]
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/text/ |
D | IsEqualIgnoringCaseTest.java | 13 Matcher<String> matcher = equalToIgnoringCase("irrelevant"); in copesWithNullsAndUnknownTypes() local 15 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 16 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 21 final Matcher<String> matcher = equalToIgnoringCase("heLLo"); in ignoresCaseOfCharsInString() local 23 assertMatches(matcher, "HELLO"); in ignoresCaseOfCharsInString() 24 assertMatches(matcher, "hello"); in ignoresCaseOfCharsInString() 25 assertMatches(matcher, "HelLo"); in ignoresCaseOfCharsInString() 26 assertDoesNotMatch(matcher, "bye"); in ignoresCaseOfCharsInString() 31 final Matcher<String> matcher = equalToIgnoringCase("heLLo"); in mismatchesIfAdditionalWhitespaceIsPresent() local 33 assertDoesNotMatch(matcher, "hello "); in mismatchesIfAdditionalWhitespaceIsPresent() [all …]
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/number/ |
D | BigDecimalCloseToTest.java | 11 private final Matcher<BigDecimal> matcher = closeTo(new BigDecimal("1.0"), new BigDecimal("0.5")); field in BigDecimalCloseToTest 20 assertTrue(matcher.matches(new BigDecimal("1.0"))); in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 21 assertTrue(matcher.matches(new BigDecimal("0.5"))); in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 22 assertTrue(matcher.matches(new BigDecimal("1.5"))); in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 24 assertDoesNotMatch("too large", matcher, new BigDecimal("2.0")); in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 25 …assertMismatchDescription("<2.0> differed by <0.5> more than delta <0.5>", matcher, new BigDecimal… in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 26 assertDoesNotMatch("number too small", matcher, new BigDecimal("0.0")); in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 27 …assertMismatchDescription("<0.0> differed by <0.5> more than delta <0.5>", matcher, new BigDecimal… in testEvaluatesToTrueIfArgumentIsEqualToABigDecimalWithinSomeError() 31 assertTrue(matcher.matches(new BigDecimal("1.000000"))); in testEvaluatesToTrueIfArgumentHasDifferentScale() 32 assertTrue(matcher.matches(new BigDecimal("0.500000"))); in testEvaluatesToTrueIfArgumentHasDifferentScale() [all …]
|
/external/icu/icu4c/source/test/intltest/ |
D | localematchertest.cpp | 92 LocaleMatcher matcher = LocaleMatcher::Builder().build(errorCode); in testEmpty() local 93 const Locale *best = matcher.getBestMatch(Locale::getFrench(), errorCode); in testEmpty() 95 LocaleMatcher::Result result = matcher.getBestMatchResult("fr", errorCode); in testEmpty() 121 LocaleMatcher matcher = LocaleMatcher::Builder(). in testBasics() local 123 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics() 125 best = matcher.getBestMatch("en_US", errorCode); in testBasics() 127 best = matcher.getBestMatch("fr_FR", errorCode); in testBasics() 129 best = matcher.getBestMatch("ja_JP", errorCode); in testBasics() 135 LocaleMatcher matcher = LocaleMatcher::Builder(). in testBasics() local 137 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics() [all …]
|
/external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/ |
D | AbstractMatcherTest.java | 13 public static <T> void assertMatches(Matcher<T> matcher, T arg) { in assertMatches() argument 14 assertMatches("Expected match, but mismatched", matcher, arg); in assertMatches() 17 public static <T> void assertMatches(String message, Matcher<T> matcher, T arg) { in assertMatches() argument 18 if (!matcher.matches(arg)) { in assertMatches() 19 Assert.fail(message + " because: '" + mismatchDescription(matcher, arg) + "'"); in assertMatches() 31 public static void assertDescription(String expected, Matcher<?> matcher) { in assertDescription() argument 33 description.appendDescriptionOf(matcher); in assertDescription() 37 …public static <T> void assertMismatchDescription(String expected, Matcher<? super T> matcher, T ar… in assertMismatchDescription() argument 38 Assert.assertFalse("Precondition: Matcher should not match item.", matcher.matches(arg)); in assertMismatchDescription() 39 … Assert.assertEquals("Expected mismatch description", expected, mismatchDescription(matcher, arg)); in assertMismatchDescription() [all …]
|
/external/libtextclassifier/native/annotator/grammar/dates/ |
D | extractor.cc | 129 grammar::Matcher* matcher) { in CheckDigits() argument 136 T* result = matcher->AllocateAndInitMatch<T>( in CheckDigits() 143 matcher->AddMatch(result); in CheckDigits() 151 StringPiece match_text, grammar::Matcher* matcher) { in CheckDigitsAsFraction() argument 159 T* result = matcher->AllocateAndInitMatch<T>( in CheckDigitsAsFraction() 165 matcher->AddMatch(result); in CheckDigitsAsFraction() 173 StringPiece match_text, grammar::Matcher* matcher) { in CheckCombinedDigits() argument 221 T* result = matcher->AllocateAndInitMatch<T>( in CheckCombinedDigits() 231 matcher->AddMatch(result); in CheckCombinedDigits() 239 grammar::Matcher* matcher) { in CheckMappedValue() argument [all …]
|
/external/hamcrest/hamcrest-core/src/main/java/org/hamcrest/core/ |
D | CombinableMatcher.java | 10 private final Matcher<? super T> matcher; field in CombinableMatcher 12 public CombinableMatcher(Matcher<? super T> matcher) { in CombinableMatcher() argument 13 this.matcher = matcher; in CombinableMatcher() 18 if (!matcher.matches(item)) { in matchesSafely() 19 matcher.describeMismatch(item, mismatch); in matchesSafely() 27 description.appendDescriptionOf(matcher); in describeTo() 40 matchers.add(matcher); in templatedListWith() 50 public static <LHS> CombinableBothMatcher<LHS> both(Matcher<? super LHS> matcher) { in both() argument 51 return new CombinableBothMatcher<LHS>(matcher); in both() 56 public CombinableBothMatcher(Matcher<? super X> matcher) { in CombinableBothMatcher() argument [all …]
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/object/ |
D | HasToStringTest.java | 21 Matcher<Object> matcher = hasToString(equalTo("irrelevant")); in copesWithNullsAndUnknownTypes() local 23 assertNullSafe(matcher); in copesWithNullsAndUnknownTypes() 24 assertUnknownTypeSafe(matcher); in copesWithNullsAndUnknownTypes() 29 final Matcher<Object> matcher = hasToString(equalTo(TO_STRING_RESULT)); in matchesWhenUtilisingANestedMatcher() local 31 assertMatches(matcher, TEST_OBJECT); in matchesWhenUtilisingANestedMatcher() 32 assertDoesNotMatch(matcher, new Object()); in matchesWhenUtilisingANestedMatcher() 37 final Matcher<Object> matcher = hasToString(TO_STRING_RESULT); in matchesWhenUsingShortcutForHasToStringEqualTo() local 39 assertMatches(matcher, TEST_OBJECT); in matchesWhenUsingShortcutForHasToStringEqualTo() 40 assertDoesNotMatch(matcher, new Object()); in matchesWhenUsingShortcutForHasToStringEqualTo() 45 final Matcher<Object> matcher = hasToString(equalTo(TO_STRING_RESULT)); in describesItself() local [all …]
|
/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/ |
D | Qualifiers.java | 58 Matcher matcher = DIR_QUALIFIER_PATTERN.matcher(parentDirName); in fromParentDir() local 59 if (!matcher.find()) throw new IllegalStateException(parentDirName); in fromParentDir() 60 String qualifiers = matcher.group(1); in fromParentDir() 70 Matcher m = VERSION_QUALIFIER_PATTERN.matcher(qualifiers); in getPlatformVersion() 83 Matcher matcher = SMALLEST_SCREEN_WIDTH_PATTERN.matcher(qualifier); in getSmallestScreenWidth() local 84 if (matcher.find()) { in getSmallestScreenWidth() 85 return Integer.parseInt(matcher.group(1)); in getSmallestScreenWidth() 134 Matcher matcher = SCREEN_WIDTH_PATTERN.matcher(qualifier); in getScreenWidth() local 135 if (matcher.find()) { in getScreenWidth() 136 return Integer.parseInt(matcher.group(1)); in getScreenWidth() [all …]
|
/external/guava/android/guava/src/com/google/common/base/ |
D | JdkPattern.java | 32 public CommonMatcher matcher(CharSequence t) { in matcher() method in JdkPattern 33 return new JdkMatcher(pattern.matcher(t)); in matcher() 52 final Matcher matcher; field in JdkPattern.JdkMatcher 54 JdkMatcher(Matcher matcher) { in JdkMatcher() argument 55 this.matcher = Preconditions.checkNotNull(matcher); in JdkMatcher() 60 return matcher.matches(); in matches() 65 return matcher.find(); in find() 70 return matcher.find(index); in find() 75 return matcher.replaceAll(replacement); in replaceAll() 80 return matcher.end(); in end() [all …]
|
/external/guava/guava/src/com/google/common/base/ |
D | JdkPattern.java | 32 public CommonMatcher matcher(CharSequence t) { in matcher() method in JdkPattern 33 return new JdkMatcher(pattern.matcher(t)); in matcher() 52 final Matcher matcher; field in JdkPattern.JdkMatcher 54 JdkMatcher(Matcher matcher) { in JdkMatcher() argument 55 this.matcher = Preconditions.checkNotNull(matcher); in JdkMatcher() 60 return matcher.matches(); in matches() 65 return matcher.find(); in find() 70 return matcher.find(index); in find() 75 return matcher.replaceAll(replacement); in replaceAll() 80 return matcher.end(); in end() [all …]
|
/external/catch2/include/internal/ |
D | catch_capture_matchers.h | 27 MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString ) in MatchExpr() argument 28 : ITransientExpression{ true, matcher.match( arg ) }, in MatchExpr() 30 m_matcher( matcher ), 46 …void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef … 49 …auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString ) ->… 50 return MatchExpr<ArgT, MatcherT>( arg, matcher, matcherString ); 57 #define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \ argument 59 …AL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDispositi… 61 … catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \ 68 #define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \ argument [all …]
|
/external/libtextclassifier/native/utils/ |
D | regex-match_test.cc | 70 const std::unique_ptr<UniLib::RegexMatcher> matcher = in TEST_F() local 72 ASSERT_TRUE(matcher != nullptr); in TEST_F() 74 ASSERT_TRUE(matcher->Find(&status) && in TEST_F() 77 EXPECT_TRUE(VerifyMatch(message.ToUTF8String(), matcher.get(), verifier)); in TEST_F() 90 const std::unique_ptr<UniLib::RegexMatcher> matcher = in TEST_F() local 92 ASSERT_TRUE(matcher != nullptr); in TEST_F() 95 ASSERT_TRUE(matcher->Find(&status) && in TEST_F() 97 EXPECT_THAT(GetCapturingGroupText(matcher.get(), 0).value(), in TEST_F() 99 EXPECT_THAT(GetCapturingGroupText(matcher.get(), 1).value(), in TEST_F() 101 EXPECT_FALSE(GetCapturingGroupText(matcher.get(), 2).has_value()); in TEST_F() [all …]
|