Home
last modified time | relevance | path

Searched full:match (Results 1 – 25 of 132) sorted by relevance

123456

/arkcompiler/runtime_core/tests/checked/
Dchecker.rb65 def match_str(match) argument
66 match.is_a?(Regexp) ? "/#{match.source}/" : match
69 def contains?(str, match) argument
70 return str =~ match if match.is_a? Regexp
72 raise_error "Wrong type for search: #{match.class}" unless match.is_a? String
73 str.include? match
91 def find(match) argument
92 return if match.nil?
94 @current_index = @lines.index { |line| contains?(line, match) }
95 raise_error "#{@name} not found: #{match_str(match)}" if @current_index.nil?
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DnoImplicitAnyInContextuallyTypesFunctionParamter.ts27 regexMatchList.forEach(match => ''.replace(match, ''));
28 AssertType(regexMatchList.forEach(match => ''.replace(match, '')), "void");
30 AssertType(match => ''.replace(match, ''), "(string) => string");
31 AssertType(match, "string");
32 AssertType(''.replace(match, ''), "string");
34 AssertType(match, "string");
DtypeGuardsNestedAssignments.ts122 let match: RegExpExecArray | null variable
123 AssertType(match, "union");
126 while ((match = re.exec("xxx")) != null) {
127 const length = match[1].length + match[2].length
129 AssertType(match[1].length + match[2].length, "number");
130 AssertType(match[1].length, "number");
131 AssertType(match[1], "string");
132 AssertType(match, "RegExpExecArray");
134 AssertType(match[2].length, "number");
135 AssertType(match[2], "string");
[all …]
DbestChoiceType.ts23 (''.match(/ /) || []).map(s => s.toLowerCase());
24 AssertType((''.match(/ /) || []).map(s => s.toLowerCase()), "any[]");
25 AssertType((''.match(/ /) || []).map, "union");
34 let x = ''.match(/ /);
36 AssertType(''.match(/ /), "union");
37 AssertType(''.match, "(union) => union");
58 let x = ''.match(/ /);
60 AssertType(''.match(/ /), "union");
61 AssertType(''.match, "(union) => union");
DoverloadResolutionOverNonCTLambdas.ts27 let result= message.replace(/\{(\d+)\}/g, function(match, ...rest) {
31 …Type(function(match, ...rest) { let index= rest[0]; return typeof args[index] !== 'undef…
32 AssertType(match, "string");
34 …}/g, function(match, ...rest) { let index= rest[0]; return typeof args[index] !== 'undef…
42 AssertType(typeof args[index] !== 'undefined' ? args[index] : match, "any");
56 : match;
57 AssertType(match, "string");
DnarrowTypeByInstanceof.ts21 class Match {
35 type FileMatchOrMatch = FileMatch | Match;
55 } else if (elementA instanceof Match && elementB instanceof Match) {
DindexingTypesWithNever.ts111 type Match<Exp, Act> = [Exp] extends [Act] alias
112 ? ([Act] extends [Exp] ? "Match" : "Did not match 2")
113 : "Did not match 1";
115 type ExpectType<Exp, Act> = Match<Exp, Act> extends "Match"
116 ? ({} extends Exp ? Match<Required<Exp>, Required<Act>> : "Match")
117 : "Did not match";
Dparser630933.ts25 let b = a.match(/\/ver=([^/]+)/);
27 AssertType(a.match(/\/ver=([^/]+)/), "RegExpMatchArray");
28 AssertType(a.match, "(union) => RegExpMatchArray");
DnarrowingWithNonNullExpression.ts21 const m = ''.match('');
23 AssertType(''.match(''), "RegExpMatchArray");
24 AssertType(''.match, "(union) => RegExpMatchArray");
DnestedIndexer.ts23 let match: { [index: number]: string;
24 AssertType(match, "{ [number]: string; }");
DcontextualTypingOfObjectLiterals.ts36 obj1 = obj2; // Error - indexer doesn't match
53 f(obj2); // Error - indexer doesn't match
DdeclarationEmitLocalClassDeclarationMixin.ts43 abstract match(path: string): boolean;
52 match(path: string) {
DuseRegexpGroups.ts67 let foo = "foo".match(/(?<bar>foo)/)!.groups.foo;
69 AssertType("foo".match(/(?<bar>foo)/)!.groups.foo, "string");
/arkcompiler/ets_frontend/es2panda/test/
Dtest262util.py126 match = self.includes.search(header)
127 includes = list(map(lambda e: e.strip(), match.group(
128 'includes').split(','))) if match else []
130 match = self.includes2.search(header)
131 includes += list(map(lambda e: e.strip(), match.group(
132 'includes').split('-')))[1:] if match else []
136 match = self.flags.search(header)
138 match.group('flags').split(','))) if match else []
143 match = self.negative.search(header)
144 negative_phase = match.group('phase') if match else 'pass'
[all …]
/arkcompiler/ets_runtime/test/moduletest/builtins/
Dbuiltinsregexp.js26 const data = url.match(/(?<=\/)\w+(.jpg)$/);
37 // Test 3 - RegExp $1 .. $9 match the lastest successful results
44 "abc".match(/(a)/);
54 var res1 = testStr.match(pattern);
57 var res2 = testStr.match(pattern);
60 var res3 = testStr.match(pattern);
/arkcompiler/ets_runtime/ecmascript/
Djs_regexp_iterator.cpp60 // 9. Let match be ? RegExpExec(R, S). in Next()
61 JSTaggedValue match = BuiltinsRegExp::RegExpExec(thread, regexHandle, inputStr, false); in Next() local
62 JSHandle<JSTaggedValue> matchHandle(thread, match); in Next()
65 // 10. If match is null, then in Next()
74 // i. Let matchStr be ? ToString(? Get(match, "0")). in Next()
97 // iii. Return ! CreateIterResultObject(match, false). in Next()
102 // ii. Return ! CreateIterResultObject(match, false). in Next()
/arkcompiler/ets_runtime/test/moduletest/weakcollectionswithsymbol/
Dweaksetsymbolvalue.js46 Symbol.match,
59 print("ws.has(Symbol.match) " + ws.has(Symbol.match));
Dweakmapsymbolkey.js50 Symbol.match,
63 print("wm.get(Symbol.match) == 4 " + (wm.get(Symbol.match) == 4));
Dfinalizationregistrywithsymbol.js30 fr.register(s, "symbol 1", Symbol.match);
39 fr.unregister(Symbol.match);
Dexpect_output.txt23 wm.get(Symbol.match) == 4 true
32 ws.has(Symbol.match) true
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/tests/
Dpgo_profiler_test.cpp147 ASSERT_TRUE(!loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
150 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
215 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
216 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[2]->GetMethodId())); in HWTEST_F_L0()
217 ASSERT_TRUE(!loader.Match(expectRecordName, methodLiterals[1]->GetMethodId())); in HWTEST_F_L0()
220 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[1]->GetMethodId())); in HWTEST_F_L0()
279 ASSERT_TRUE(!loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
282 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
284 ASSERT_TRUE(loader.Match(expectRecordName1, methodLiterals[1]->GetMethodId())); in HWTEST_F_L0()
323 ASSERT_TRUE(loader.Match(expectRecordName, methodLiterals[0]->GetMethodId())); in HWTEST_F_L0()
[all …]
/arkcompiler/runtime_core/tests/cts-generator/generator/
Dtest_case.rb98 if single_line.match(/\#\{.+\}/)
102 if match = single_line.match(/(.+)##\*([[:digit:]]+)$/)
103 str, num = match.captures
/arkcompiler/ets_frontend/test262/
Deshost.patch163 + const matches = syntaxErrorMessage.match();
191 + let match = str.match(errorRe1);
192 + if (match) {
194 + name: match[1],
195 + message: match[2],
201 + let errors = str.match(/[(](\d+),(\d+)[)]: (.*)/gm);
223 + errors = str.match(errorRe2);
/arkcompiler/runtime_core/isa/
Dasserts.rb142 Panda.instructions.select { |i| i.mnemonic.match?(/^(throw|call|return)/) }.map do |i|
149 match = i.mnemonic.match(/[ifu](\d+)to[ifu](\d+)/)
150 next true unless match
152 ssize, dsize = match.captures
/arkcompiler/toolchain/build/compile_script/
Dark.py235 … print("\nLogic of getting gn binary or ninja binary does not match logic of prebuilts_download." \
432 # match [option][clean] flag
436 # match [option][clean-continue] flag
441 # match [option][gn-args] flag
444 # match [option][keepdepfile] flag
448 # match [option][verbose] flag
452 # make a new list with flag that do not match any flag in [option]
466 # match [option] flag
478 # match [help] flag
483 # match [[os_cpu].[mode]] flag

123456