Home
last modified time | relevance | path

Searched +full:add +full:- +full:matcher (Results 1 – 25 of 229) sorted by relevance

12345678910

/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/
DLocaleMatcherTest.java6 * Copyright (C) 2009-2015, Google, Inc.; International Business Machines Corporation and *
56 return new LocaleMatcher(LocalePriorityList.add(string).build()); in newLocaleMatcher()
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()
[all …]
DTrieMapTest.java6 * Copyright (C) 2011-2012, Google, International Business Machines Corporation and
63 …on, timing for 1s:\t to get more accurate figures and test for reasonable times, use -e5 or more"); in init()
73 UnicodeSet testSet = new UnicodeSet("[[:^C:]-[:sc=han:]]"); in init()
98 localeName = ULocale.getDisplayCountry("und-" + countryCode, locale); in init()
261 .add("cdab", "fifth") in checkSearch()
262 .add("abcde", "second") in checkSearch()
263 .add("abdfg", "third").build(); in checkSearch()
277 TrieMap.Matcher<String> matcher = trieMap.getMatcher(); in checkSearch() local
278 matcher.set(string, 0); in checkSearch()
282 hasMore = matcher.next(); in checkSearch()
[all …]
DTrieMap.java27 // would be nice to have a BytesTrieBuilder.add(aByte);
29 // can you store the same string twice, eg add(bytes1, value), add(bytes1, value)? What happens? If…
30 // should happen on add, not on build.
78 return result.add(key, value); in with()
81 public abstract Builder<V> add(CharSequence key, V value); in add() method in TrieMap.Builder
95 abstract public Matcher<V> getMatcher(); in getMatcher()
97 public abstract static class Matcher<V> { class in TrieMap
169 // TODO Auto-generated method stub in iterator()
173 public TrieMap.Matcher<V> getMatcher() { in getMatcher()
214 public class BytesMatcher extends Matcher<V> {
[all …]
/third_party/flutter/flutter/packages/flutter_test/lib/src/
Dmatchers.dart2 // Use of this source code is governed by a BSD-style license that can be
40 const Matcher findsNothing = _FindsWidgetMatcher(null, 0);
55 const Matcher findsWidgets = _FindsWidgetMatcher(1, null);
70 const Matcher findsOneWidget = _FindsWidgetMatcher(1, 1);
85 Matcher findsNWidgets(int n) => _FindsWidgetMatcher(n, n);
102 const Matcher isOffstage = _IsOffstage();
110 const Matcher isOnstage = _IsOnstage();
118 const Matcher isInCard = _IsInCard();
128 const Matcher isNotInCard = _IsNotInCard();
130 /// Asserts that an object's toString() is a plausible one-line description.
[all …]
/third_party/flutter/flutter/packages/flutter/test/rendering/
Dmock_canvas.dart2 // Use of this source code is governed by a BSD-style license that can be
26 /// [paints] matcher will always pass a zero offset.
46 Matcher get paintsNothing => _TestRecordingCanvasPaintsNothingMatcher();
49 Matcher get paintsAssertion => _TestRecordingCanvasPaintsAssertionMatcher();
52 Matcher paintsExactlyCountTimes(Symbol methodName, int count) {
59 /// Used by the [paints] matcher.
77 /// The [paints] matcher returns a [PaintPattern] so that you can build the
87 /// no call to [Canvas.transform] is found, then the matcher fails.
91 /// The `matrix4` argument is dynamic so it can be either a [Matcher], or a
94 /// matching [Matcher] such as [equals] can be used to test each value in the
[all …]
/third_party/boost/boost/xpressive/detail/static/
Dstatic.hpp25 // - must support indirect repeat counts {$n,$m}
26 // - add ws to eat whitespace (make *ws illegal)
27 // - a{n,m} -> repeat<n,m>(a)
28 // - a{$n,$m} -> repeat(n,m)(a)
29 // - add nil to match nothing
30 // - instead of s1, s2, etc., how about s[1], s[2], etc.? Needlessly verbose?
47 return static_cast<Next const *>(this)-> in match()
57 return static_cast<Top const *>(top)-> in top_match()
67 return static_cast<Top const *>(top)->match(state); in pop_match()
110 template<typename Matcher, typename Next>
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/parse/
DSeriesMatcher.java23 public void addMatcher(NumberParseMatcher matcher) { in addMatcher() argument
28 matchers.add(matcher); in addMatcher()
53 NumberParseMatcher matcher = matchers.get(i); in match() local
56 maybeMore = matcher.match(segment, result); in match()
58 // Nothing for this matcher to match; ask for more. in match()
63 boolean isFlexible = matcher instanceof NumberParseMatcher.Flexible; in match()
65 // Match succeeded, and this is a flexible matcher. Re-run it. in match()
67 // Match succeeded, and this is NOT a flexible matcher. Proceed to the next matcher. in match()
69 … // Small hack: if there is another matcher coming, do not accept trailing weak chars. in match()
75 // Match failed, and this is a flexible matcher. Try again with the next matcher. in match()
[all …]
DAffixMatcher.java36 return length(lhs.prefix) > length(rhs.prefix) ? -1 : 1;
38 return length(lhs.suffix) > length(rhs.suffix) ? -1 : 1;
42 return lhs.hashCode() > rhs.hashCode() ? -1 : 1;
99 // Pre-process the affix strings to resolve LDML rules like sign display. in createMatchers()
140 // Flags for setting in the ParsedNumber; the token matchers may add more. in createMatchers()
144 // We still need to add that matcher for strict mode to work. in createMatchers()
145 matchers.add(getInstance(prefix, suffix, flags)); in createMatchers()
149 matchers.add(getInstance(prefix, null, flags)); in createMatchers()
152 matchers.add(getInstance(null, suffix, flags)); in createMatchers()
157 // Put the AffixMatchers in order, and then add them to the output. in createMatchers()
[all …]
DAffixPatternMatcher.java47 // De-reference the memory in fromAffixPattern()
64 // Add an ignorables matcher between tokens except between two literals, and don't put two in consumeToken()
92 // All currency symbols use the same matcher in consumeToken()
101 // No action necessary: the ignorables matcher has already been added. in consumeToken()
104 // Case 3: the token is a non-ignorable literal. in consumeToken()
DNumberParserImpl.java204 /// CURRENCY MATCHER /// in createParserFromProperties()
215 // ICU-TC meeting, April 11, 2018: accept percent/permille only if it is in the pattern, in createParserFromProperties()
287 public void addMatcher(NumberParseMatcher matcher) { in addMatcher() argument
289 this.matchers.add(matcher); in addMatcher()
335 parseLongestRecursive(segment, result, -100); in parse()
337 for (NumberParseMatcher matcher : matchers) { in parse()
338 matcher.postProcess(result); in parse()
350 NumberParseMatcher matcher = matchers.get(i);
351 if (!matcher.smokeTest(segment)) {
352 // Matcher failed smoke test: try the next one
[all …]
/third_party/googletest/googlemock/src/
Dgmock-matchers.cc31 // Google Mock - a framework for writing C++ mock classes.
33 // This file implements Matcher<const string&>, Matcher<string>, and
36 #include "gmock/gmock-matchers.h"
37 #include "gmock/gmock-generated-matchers.h"
46 // Constructs a matcher that matches a const std::string& whose value is
48 Matcher<const std::string&>::Matcher(const std::string& s) { *this = Eq(s); } in Matcher() function in testing::Matcher::string
51 // Constructs a matcher that matches a const std::string& whose value is
53 Matcher<const std::string&>::Matcher(const ::string& s) { in Matcher() function in testing::Matcher::string
58 // Constructs a matcher that matches a const std::string& whose value is
60 Matcher<const std::string&>::Matcher(const char* s) { in Matcher() function in testing::Matcher::string
[all …]
/third_party/flutter/flutter/packages/flutter_tools/test/src/
Dcommon.dart2 // Use of this source code is governed by a BSD-style license that can be
20 /// A matcher that compares the type of the actual value to the type argument T.
21 // TODO(ianh): Remove this once https://github.com/dart-lang/matcher/issues/98 is fixed
22 Matcher isInstanceOf<T>() => test_package.TypeMatcher<T>();
64 if (toolsIndex == -1)
83 final DateTime modificationTime = baseTime.add(Duration(seconds: seconds));
87 /// Matcher for functions that throw [ToolExit].
88 Matcher throwsToolExit({ int exitCode, Pattern message }) {
89 Matcher matcher = isToolExit;
91 matcher = allOf(matcher, (ToolExit e) => e.exitCode == exitCode);
[all …]
/third_party/flutter/flutter/dev/integration_tests/android_semantics_testing/lib/src/
Dmatcher.dart2 // Use of this source code is governed by a BSD-style license that can be
13 /// This matcher is intended to compare the accessibility values generated by
16 Matcher hasAndroidSemantics({
53 class _AndroidSemanticsMatcher extends Matcher {
90 description.add('AndroidSemanticsNode');
92 description.add(' with text: $text');
94 description.add( 'with contentDescription $contentDescription');
96 description.add(' with className: $className');
98 description.add(' with id: $id');
100 description.add(' with actions: $actions');
[all …]
/third_party/python/Lib/lib2to3/
Dbtm_matcher.py1 """A bottom-up tree matching algorithm implementation meant to speed
3 their rarest linear path, a linear Aho-Corasick automaton is
18 """Class for a node of the Aho-Corasick automaton used in matching"""
27 """The main matcher class. After instantiating the patterns should
39 to the matcher(a common Aho-Corasick automaton). The fixer is
45 match_nodes = self.add(linear, start=self.root)
49 def add(self, pattern, start): member in BottomMatcher
60 #add all alternatives, and add the rest of the pattern
62 end_nodes = self.add(alternative, start=start)
64 match_nodes.extend(self.add(pattern[1:], end))
[all …]
/third_party/icu/icu4c/source/i18n/
Dnumparse_affixes.cpp34 (affix != nullptr && affix->getPattern() == patternString); in matched()
40 static int32_t length(const AffixPatternMatcher* matcher) { in length() argument
41 return matcher == nullptr ? 0 : matcher->getPattern().length(); in length()
73 // Add an ignorables matcher between tokens except between two literals, and don't put two in consumeToken()
76 (fLastTypeOrCp < 0 || !fIgnorables->getSet()->contains(fLastTypeOrCp))) { in consumeToken()
100 // All currency symbols use the same matcher in consumeToken()
107 } else if (fIgnorables != nullptr && fIgnorables->getSet()->contains(cp)) { in consumeToken()
109 // No action necessary: the ignorables matcher has already been added. in consumeToken()
112 // Case 3: the token is a non-ignorable literal. in consumeToken()
123 void AffixPatternMatcherBuilder::addMatcher(NumberParseMatcher& matcher) { in addMatcher() argument
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dnumparse_affixes.cpp34 (affix != nullptr && affix->getPattern() == patternString); in matched()
40 static int32_t length(const AffixPatternMatcher* matcher) { in length() argument
41 return matcher == nullptr ? 0 : matcher->getPattern().length(); in length()
73 // Add an ignorables matcher between tokens except between two literals, and don't put two in consumeToken()
76 (fLastTypeOrCp < 0 || !fIgnorables->getSet()->contains(fLastTypeOrCp))) { in consumeToken()
100 // All currency symbols use the same matcher in consumeToken()
107 } else if (fIgnorables != nullptr && fIgnorables->getSet()->contains(cp)) { in consumeToken()
109 // No action necessary: the ignorables matcher has already been added. in consumeToken()
112 // Case 3: the token is a non-ignorable literal. in consumeToken()
123 void AffixPatternMatcherBuilder::addMatcher(NumberParseMatcher& matcher) { in addMatcher() argument
[all …]
/third_party/flutter/skia/third_party/externals/icu/source/i18n/
Dnumparse_affixes.cpp33 (affix != nullptr && affix->getPattern() == patternString); in matched()
39 static int32_t length(const AffixPatternMatcher* matcher) { in length() argument
40 return matcher == nullptr ? 0 : matcher->getPattern().length(); in length()
72 // Add an ignorables matcher between tokens except between two literals, and don't put two in consumeToken()
75 (fLastTypeOrCp < 0 || !fIgnorables->getSet()->contains(fLastTypeOrCp))) { in consumeToken()
99 // All currency symbols use the same matcher in consumeToken()
106 } else if (fIgnorables != nullptr && fIgnorables->getSet()->contains(cp)) { in consumeToken()
108 // No action necessary: the ignorables matcher has already been added. in consumeToken()
111 // Case 3: the token is a non-ignorable literal. in consumeToken()
117 void AffixPatternMatcherBuilder::addMatcher(NumberParseMatcher& matcher) { in addMatcher() argument
[all …]
/third_party/googletest/googlemock/docs/
DCookBook.md62 virtual int Add(Element x);
63 virtual int Add(int times, Element x);
65 // Overloaded on the const-ness of this object.
72 MOCK_METHOD1(Add, int(Element x));
73 MOCK_METHOD2(Add, int(int times, Element x);
87 using Foo::Add;
88 MOCK_METHOD1(Add, int(Element x));
89 // We don't want to mock int Add(int times, Element x);
119 Google Mock can mock non-virtual functions to be used in what we call _hi-perf
125 non-virtual methods is the _same_ as mocking virtual methods:
[all …]
DDesignDoc.md10 non-trivial effort to define a custom action in Google Mock. For
25 …* The defined action is usable only in mock functions that takes exactly 3 arguments - an unnecess…
48 boiler-plate C++ requires.
59 refer to the K-th (0-based) argument of the mock function as `argK`.
71 your code is still type-safe though: you'll get a compiler error if
89 pre-defined symbols in the body of `ACTION`:
91 | `argK_type` | The type of the K-th (0-based) argument of the mock function |
92 |:------------|:-------------------------------------------------------------|
103 | **Pre-defined Symbol** | **Is Bound To** |
104 |:-----------------------|:----------------|
[all …]
/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/
DAsYouTypeFormatter.java8 * http://www.apache.org/licenses/LICENSE-2.0
25 import java.util.regex.Matcher;
79 private static final Pattern NATIONAL_PREFIX_SEPARATORS_PATTERN = Pattern.compile("[- ]");
108 // A cache for frequently used country-specific regular expressions.
112 * Constructs an as-you-type formatter. Should be obtained from {@link
151 NATIONAL_PREFIX_SEPARATORS_PATTERN.matcher( in maybeCreateNewTemplate()
181 // national prefix should be excluded. A rule that has a carrier-code formatting rule is in getAvailableFormats()
182 // kept since the national prefix might actually be an extracted carrier code - we don't in getAvailableFormats()
194 if (ELIGIBLE_FORMAT_PATTERN.matcher(format.getFormat()).matches()) { in getAvailableFormats()
195 possibleFormats.add(format); in getAvailableFormats()
[all …]
/third_party/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/
DBuildMetadataProtoFromXml.java8 * http://www.apache.org/licenses/LICENSE-2.0
35 import java.util.regex.Matcher;
52 private static final String INPUT_FILE = "input-file";
53 private static final String OUTPUT_DIR = "output-dir";
54 private static final String DATA_PREFIX = "data-prefix";
55 private static final String MAPPING_CLASS = "mapping-class";
57 private static final String SINGLE_FILE = "single-file";
58 private static final String LITE_BUILD = "lite-build";
61 private static final String SPECIAL_BUILD = "special-build";
66 " --" + INPUT_FILE + "=PATH Read phone number metadata in XML format from PATH.\n" +
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DStringMatcher.java6 * Copyright (C) 2001-2004, International Business Machines Corporation and *
24 * positive segment number. This affects how the matcher converts
50 * The segment number, 1-based, or 0 if not a segment.
55 * Context object that maps stand-ins to matcher and replacer
61 * Construct a matcher that matches the given pattern string.
63 * stand-ins that represent nested UnicodeMatcher objects.
66 * @param theData context object mapping stand-ins to
74 matchStart = matchLimit = -1; in StringMatcher()
79 * Construct a matcher that matches a substring of the given
82 * stand-ins that represent nested UnicodeMatcher objects.
[all …]
/third_party/qrcodegen/java/src/main/java/io/nayuki/qrcodegen/
DQrSegment.java5 * https://www.nayuki.io/page/qr-code-generator-library
13 * - The above copyright notice and this permission notice shall be included in
15 * - The Software is provided "as is", without warranty of any kind, express or
36 * <p>The mid-level way to create a segment is to take the payload data and call a
37 * static factory function such as {@link QrSegment#makeNumeric(String)}. The low-level
38 * way to create a segment is to custom-make the bit buffer and call the {@link
44 * - see {@link QrSegmentAdvanced} for full kanji support.</p>
48 /*---- Static factory functions (mid level) ----*/
53 * <p>Any text string can be converted to UTF-8 bytes ({@code
73 * @throws IllegalArgumentException if the string contains non-digit characters
[all …]
/third_party/boringssl/src/third_party/googletest/include/gtest/
Dgtest-matchers.h32 // This file implements just enough of the matcher interface to allow
33 // EXPECT_DEATH and friends to accept a matcher argument.
46 #include "gtest/gtest-printers.h"
47 #include "gtest/internal/gtest-internal.h"
48 #include "gtest/internal/gtest-port.h"
58 4251 GTEST_MAYBE_5046_ /* class A needs to have dll-interface to be used by
64 // To implement a matcher Foo for type T, define:
67 // 2. a factory function that creates a Matcher<T> object from a
70 // The two-level delegation design makes it possible to allow a user
71 // to write "v" instead of "Eq(v)" where a Matcher is expected, which
[all …]
/third_party/node/.github/workflows/
Dlinters.yml10 lint-addon-docs:
11 runs-on: ubuntu-latest
13 - uses: actions/checkout@v2
14 - name: Use Node.js ${{ env.NODE_VERSION }}
15 uses: actions/setup-node@v1
17 node-version: ${{ env.NODE_VERSION }}
18 - name: Environment Information
20 - name: Lint addon docs
21 run: NODE=$(which node) make lint-addon-docs
22 lint-cpp:
[all …]

12345678910