Lines Matching +full:parser +full:-
7 * http://www.apache.org/licenses/LICENSE-2.0
16 #include "ecmascript/ecma_string-inl.h"
42 chunk_ = thread->GetEcmaVM()->GetChunk(); in SetUp()
105 uint32_t startIndex = regExpGlobalResult->GetStartOfCaptureIndex(index).GetInt(); in GetSubString()
106 uint32_t len = regExpGlobalResult->GetEndOfCaptureIndex(index).GetInt() - startIndex; in GetSubString()
108 thread->GetEcmaVM(), inputStr, startIndex, len)); in GetSubString()
121 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
123 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
124 parser.Parse(); in HWTEST_F_L0()
125 bool parseResult = parser.IsError(); in HWTEST_F_L0()
131 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
132 CString source("^[z-a]$"); in HWTEST_F_L0()
133 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
134 parser.Parse(); in HWTEST_F_L0()
135 bool parseResult = parser.IsError(); in HWTEST_F_L0()
141 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
143 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
144 parser.Parse(); in HWTEST_F_L0()
145 bool parseResult = parser.IsError(); in HWTEST_F_L0()
151 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
153 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
154 parser.Parse(); in HWTEST_F_L0()
155 bool parseResult = parser.IsError(); in HWTEST_F_L0()
161 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
163 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
164 parser.Parse(); in HWTEST_F_L0()
165 bool parseResult = parser.IsError(); in HWTEST_F_L0()
171 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
173 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
174 parser.Parse(); in HWTEST_F_L0()
175 bool parseResult = parser.IsError(); in HWTEST_F_L0()
181 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
183 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
184 parser.Parse(); in HWTEST_F_L0()
185 bool parseResult = parser.IsError(); in HWTEST_F_L0()
191 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
193 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
194 parser.Parse(); in HWTEST_F_L0()
195 bool parseResult = parser.IsError(); in HWTEST_F_L0()
201 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
203 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
204 parser.Parse(); in HWTEST_F_L0()
205 bool parseResult = parser.IsError(); in HWTEST_F_L0()
211 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
213 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
214 parser.Parse(); in HWTEST_F_L0()
215 bool parseResult = parser.IsError(); in HWTEST_F_L0()
221 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
223 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
224 parser.Parse(); in HWTEST_F_L0()
225 bool parseResult = parser.IsError(); in HWTEST_F_L0()
231 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
233 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
234 parser.Parse(); in HWTEST_F_L0()
235 bool parseResult = parser.IsError(); in HWTEST_F_L0()
241 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
243 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
244 parser.Parse(); in HWTEST_F_L0()
245 bool parseResult = parser.IsError(); in HWTEST_F_L0()
251 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
253 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
254 parser.Parse(); in HWTEST_F_L0()
255 bool parseResult = parser.IsError(); in HWTEST_F_L0()
261 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
263 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
264 parser.Parse(); in HWTEST_F_L0()
265 bool parseResult = parser.IsError(); in HWTEST_F_L0()
271 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
273 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
274 parser.Parse(); in HWTEST_F_L0()
275 bool parseResult = parser.IsError(); in HWTEST_F_L0()
281 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
283 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
284 parser.Parse(); in HWTEST_F_L0()
285 bool parseResult = parser.IsError(); in HWTEST_F_L0()
291 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
293 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
294 parser.Parse(); in HWTEST_F_L0()
295 bool parseResult = parser.IsError(); in HWTEST_F_L0()
301 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
303 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
304 parser.Parse(); in HWTEST_F_L0()
305 bool parseResult = parser.IsError(); in HWTEST_F_L0()
311 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
313 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
314 parser.Parse(); in HWTEST_F_L0()
315 bool parseResult = parser.IsError(); in HWTEST_F_L0()
321 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
322 CString source("[b-ac-e]"); in HWTEST_F_L0()
323 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
324 parser.Parse(); in HWTEST_F_L0()
325 bool parseResult = parser.IsError(); in HWTEST_F_L0()
331 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
332 CString source("[\\10b-G]"); in HWTEST_F_L0()
333 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
334 parser.Parse(); in HWTEST_F_L0()
335 bool parseResult = parser.IsError(); in HWTEST_F_L0()
341 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
342 CString source("[\\0b-G]"); in HWTEST_F_L0()
343 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
344 parser.Parse(); in HWTEST_F_L0()
345 bool parseResult = parser.IsError(); in HWTEST_F_L0()
351 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
353 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
354 parser.Parse(); in HWTEST_F_L0()
355 bool parseResult = parser.IsError(); in HWTEST_F_L0()
361 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
363 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
364 parser.Parse(); in HWTEST_F_L0()
365 bool parseResult = parser.IsError(); in HWTEST_F_L0()
371 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
373 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
374 parser.Parse(); in HWTEST_F_L0()
375 bool parseResult = parser.IsError(); in HWTEST_F_L0()
381 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
383 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
384 parser.Parse(); in HWTEST_F_L0()
385 bool parseResult = parser.IsError(); in HWTEST_F_L0()
391 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
393 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
394 parser.Parse(); in HWTEST_F_L0()
395 bool parseResult = parser.IsError(); in HWTEST_F_L0()
401 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
403 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
404 parser.Parse(); in HWTEST_F_L0()
405 bool parseResult = parser.IsError(); in HWTEST_F_L0()
411 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
413 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
414 parser.Parse(); in HWTEST_F_L0()
415 bool parseResult = parser.IsError(); in HWTEST_F_L0()
421 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
423 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
424 parser.Parse(); in HWTEST_F_L0()
425 bool parseResult = parser.IsError(); in HWTEST_F_L0()
431 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
433 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
434 parser.Parse(); in HWTEST_F_L0()
435 bool parseResult = parser.IsError(); in HWTEST_F_L0()
441 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
443 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
444 parser.Parse(); in HWTEST_F_L0()
445 bool parseResult = parser.IsError(); in HWTEST_F_L0()
451 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
452 CString source("[\\d-a]"); in HWTEST_F_L0()
453 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
454 parser.Parse(); in HWTEST_F_L0()
455 bool parseResult = parser.IsError(); in HWTEST_F_L0()
461 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
462 CString source("[\\s-a]"); in HWTEST_F_L0()
463 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
464 parser.Parse(); in HWTEST_F_L0()
465 bool parseResult = parser.IsError(); in HWTEST_F_L0()
471 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
472 CString source("[\\s-\\w]"); in HWTEST_F_L0()
473 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
474 parser.Parse(); in HWTEST_F_L0()
475 bool parseResult = parser.IsError(); in HWTEST_F_L0()
481 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
482 CString source("[a-\\w]"); in HWTEST_F_L0()
483 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
484 parser.Parse(); in HWTEST_F_L0()
485 bool parseResult = parser.IsError(); in HWTEST_F_L0()
491 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
493 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
494 parser.Parse(); in HWTEST_F_L0()
495 bool parseResult = parser.IsError(); in HWTEST_F_L0()
501 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
503 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
504 parser.Parse(); in HWTEST_F_L0()
505 bool parseResult = parser.IsError(); in HWTEST_F_L0()
515 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
516 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
517 parser.Parse(); in HWTEST_F_L0()
518 bool parseResult = parser.IsError(); in HWTEST_F_L0()
526 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
527 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
528 parser.Parse(); in HWTEST_F_L0()
529 bool parseResult = parser.IsError(); in HWTEST_F_L0()
538 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
539 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
540 parser.Parse(); in HWTEST_F_L0()
541 bool parseResult = parser.IsError(); in HWTEST_F_L0()
550 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
551 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
552 parser.Parse(); in HWTEST_F_L0()
553 bool parseResult = parser.IsError(); in HWTEST_F_L0()
561 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
563 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
564 parser.Parse(); in HWTEST_F_L0()
565 bool parseResult = parser.IsError(); in HWTEST_F_L0()
571 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
573 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
574 parser.Parse(); in HWTEST_F_L0()
575 bool parseResult = parser.IsError(); in HWTEST_F_L0()
581 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
583 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
584 parser.Parse(); in HWTEST_F_L0()
585 bool parseResult = parser.IsError(); in HWTEST_F_L0()
591 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
593 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
594 parser.Parse(); in HWTEST_F_L0()
595 bool parseResult = parser.IsError(); in HWTEST_F_L0()
601 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
603 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
604 parser.Parse(); in HWTEST_F_L0()
605 bool parseResult = parser.IsError(); in HWTEST_F_L0()
611 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
613 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
614 parser.Parse(); in HWTEST_F_L0()
615 bool parseResult = parser.IsError(); in HWTEST_F_L0()
621 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
623 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
624 parser.Parse(); in HWTEST_F_L0()
625 bool parseResult = parser.IsError(); in HWTEST_F_L0()
631 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
633 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
634 parser.Parse(); in HWTEST_F_L0()
635 bool parseResult = parser.IsError(); in HWTEST_F_L0()
641 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
643 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
644 parser.Parse(); in HWTEST_F_L0()
645 bool parseResult = parser.IsError(); in HWTEST_F_L0()
651 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
653 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 1); in HWTEST_F_L0()
654 parser.Parse(); in HWTEST_F_L0()
655 bool parseResult = parser.IsError(); in HWTEST_F_L0()
661 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
663 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 1); in HWTEST_F_L0()
664 parser.Parse(); in HWTEST_F_L0()
665 bool parseResult = parser.IsError(); in HWTEST_F_L0()
671 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
673 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 1); in HWTEST_F_L0()
674 parser.Parse(); in HWTEST_F_L0()
675 bool parseResult = parser.IsError(); in HWTEST_F_L0()
681 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
683 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 1); in HWTEST_F_L0()
684 parser.Parse(); in HWTEST_F_L0()
685 bool parseResult = parser.IsError(); in HWTEST_F_L0()
691 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
692 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
694 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
695 parser.Parse(); in HWTEST_F_L0()
696 bool parseResult = parser.IsError(); in HWTEST_F_L0()
702 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
706 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
707 JSHandle<EcmaString> inputStr = factory->NewFromASCII("abc"); in HWTEST_F_L0()
709 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
710 JSHandle<EcmaString> str = factory->NewFromASCII("ab"); in HWTEST_F_L0()
716 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
717 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
719 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
720 parser.Parse(); in HWTEST_F_L0()
721 bool parseResult = parser.IsError(); in HWTEST_F_L0()
727 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
731 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
732 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 10U); in HWTEST_F_L0()
733 JSHandle<EcmaString> inputStr = factory->NewFromASCII("cabd"); in HWTEST_F_L0()
738 JSHandle<EcmaString> str = factory->NewFromASCII("ab"); in HWTEST_F_L0()
743 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(4).GetInt(), -1); in HWTEST_F_L0()
744 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(5).GetInt(), -1); in HWTEST_F_L0()
745 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(6).GetInt(), -1); in HWTEST_F_L0()
746 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(7).GetInt(), -1); in HWTEST_F_L0()
747 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(8).GetInt(), -1); in HWTEST_F_L0()
748 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(9).GetInt(), -1); in HWTEST_F_L0()
753 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
754 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
756 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
757 parser.Parse(); in HWTEST_F_L0()
758 bool parseResult = parser.IsError(); in HWTEST_F_L0()
764 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
768 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
769 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
770 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabaac"); in HWTEST_F_L0()
773 JSHandle<EcmaString> str1 = factory->NewFromASCII("aaba"); in HWTEST_F_L0()
774 JSHandle<EcmaString> str2 = factory->NewFromASCII("ba"); in HWTEST_F_L0()
781 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
782 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
784 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
785 parser.Parse(); in HWTEST_F_L0()
786 bool parseResult = parser.IsError(); in HWTEST_F_L0()
792 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
796 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
797 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
798 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabaac"); in HWTEST_F_L0()
800 JSHandle<EcmaString> str = factory->NewFromASCII("aa"); in HWTEST_F_L0()
806 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
807 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
809 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
810 parser.Parse(); in HWTEST_F_L0()
811 bool parseResult = parser.IsError(); in HWTEST_F_L0()
817 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
821 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
822 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
823 JSHandle<EcmaString> inputStr = factory->NewFromASCII("b"); in HWTEST_F_L0()
825 JSHandle<EcmaString> str = factory->NewFromASCII(""); in HWTEST_F_L0()
831 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
832 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
834 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
835 parser.Parse(); in HWTEST_F_L0()
836 bool parseResult = parser.IsError(); in HWTEST_F_L0()
842 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
846 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
847 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 6U); in HWTEST_F_L0()
848 JSHandle<EcmaString> inputStr = factory->NewFromASCII("zaacbbbcac"); in HWTEST_F_L0()
854 JSHandle<EcmaString> str0 = factory->NewFromASCII("zaacbbbcac"); in HWTEST_F_L0()
855 JSHandle<EcmaString> str1 = factory->NewFromASCII("z"); in HWTEST_F_L0()
856 JSHandle<EcmaString> str2 = factory->NewFromASCII("ac"); in HWTEST_F_L0()
857 JSHandle<EcmaString> str3 = factory->NewFromASCII("a"); in HWTEST_F_L0()
858 JSHandle<EcmaString> str5 = factory->NewFromASCII("c"); in HWTEST_F_L0()
863 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(4).GetInt(), -1); in HWTEST_F_L0()
869 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
870 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
872 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 4); in HWTEST_F_L0()
873 parser.Parse(); in HWTEST_F_L0()
874 bool parseResult = parser.IsError(); in HWTEST_F_L0()
880 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
884 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
885 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
886 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ab\nabc"); in HWTEST_F_L0()
888 JSHandle<EcmaString> str = factory->NewFromASCII("abc"); in HWTEST_F_L0()
894 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
895 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
897 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 4); in HWTEST_F_L0()
898 parser.Parse(); in HWTEST_F_L0()
899 bool parseResult = parser.IsError(); in HWTEST_F_L0()
905 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
909 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
910 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
911 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ab\nabc"); in HWTEST_F_L0()
913 JSHandle<EcmaString> str = factory->NewFromASCII("abc"); in HWTEST_F_L0()
919 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
920 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
922 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
923 parser.Parse(); in HWTEST_F_L0()
924 bool parseResult = parser.IsError(); in HWTEST_F_L0()
930 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
934 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
935 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
936 JSHandle<EcmaString> inputStr = factory->NewFromASCII("erv"); in HWTEST_F_L0()
938 JSHandle<EcmaString> str = factory->NewFromASCII("er"); in HWTEST_F_L0()
944 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
945 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
947 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
948 parser.Parse(); in HWTEST_F_L0()
949 bool parseResult = parser.IsError(); in HWTEST_F_L0()
955 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
959 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
960 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
961 JSHandle<EcmaString> inputStr = factory->NewFromASCII("bad good"); in HWTEST_F_L0()
963 JSHandle<EcmaString> str = factory->NewFromASCII("d"); in HWTEST_F_L0()
969 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
970 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
972 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
973 parser.Parse(); in HWTEST_F_L0()
974 bool parseResult = parser.IsError(); in HWTEST_F_L0()
980 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
984 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
985 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
986 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\na"); in HWTEST_F_L0()
988 JSHandle<EcmaString> str = factory->NewFromASCII("a"); in HWTEST_F_L0()
994 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
995 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
997 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 8); in HWTEST_F_L0()
998 parser.Parse(); in HWTEST_F_L0()
999 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1005 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1009 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1010 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1011 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\n"); in HWTEST_F_L0()
1013 JSHandle<EcmaString> str = factory->NewFromASCII("\n"); in HWTEST_F_L0()
1019 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1020 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1022 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 4); in HWTEST_F_L0()
1023 parser.Parse(); in HWTEST_F_L0()
1024 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1030 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1034 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1035 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1036 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\naabc"); in HWTEST_F_L0()
1038 JSHandle<EcmaString> str = factory->NewFromASCII("abc"); in HWTEST_F_L0()
1044 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1045 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1047 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 4); in HWTEST_F_L0()
1048 parser.Parse(); in HWTEST_F_L0()
1049 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1055 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1059 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1060 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1061 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\nbbabc"); in HWTEST_F_L0()
1063 JSHandle<EcmaString> str = factory->NewFromASCII("abc"); in HWTEST_F_L0()
1069 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1070 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1072 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1073 parser.Parse(); in HWTEST_F_L0()
1074 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1080 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1084 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1085 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1086 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabc"); in HWTEST_F_L0()
1088 JSHandle<EcmaString> str = factory->NewFromASCII("a"); in HWTEST_F_L0()
1094 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1095 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1097 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1098 parser.Parse(); in HWTEST_F_L0()
1099 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1105 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1109 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1110 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1111 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ABC"); in HWTEST_F_L0()
1113 JSHandle<EcmaString> str = factory->NewFromASCII("ABC"); in HWTEST_F_L0()
1119 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1120 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1122 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1123 parser.Parse(); in HWTEST_F_L0()
1124 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1130 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1134 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1135 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1136 JSHandle<EcmaString> inputStr = factory->NewFromASCII("a\n"); in HWTEST_F_L0()
1138 JSHandle<EcmaString> str = factory->NewFromASCII("a\n"); in HWTEST_F_L0()
1144 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1146 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1147 parser.Parse(); in HWTEST_F_L0()
1148 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1154 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1160 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1161 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1163 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1164 parser.Parse(); in HWTEST_F_L0()
1165 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1171 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1175 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1176 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1177 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ababc"); in HWTEST_F_L0()
1179 JSHandle<EcmaString> str = factory->NewFromASCII("a"); in HWTEST_F_L0()
1185 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1186 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1188 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1189 parser.Parse(); in HWTEST_F_L0()
1190 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1196 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1200 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1201 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1202 JSHandle<EcmaString> inputStr = factory->NewFromASCII("baaabac"); in HWTEST_F_L0()
1205 JSHandle<EcmaString> str0 = factory->NewFromASCII(""); in HWTEST_F_L0()
1206 JSHandle<EcmaString> str1 = factory->NewFromASCII("aaa"); in HWTEST_F_L0()
1213 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1214 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1216 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1217 parser.Parse(); in HWTEST_F_L0()
1218 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1224 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1228 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1229 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1230 JSHandle<EcmaString> inputStr = factory->NewFromASCII("caab"); in HWTEST_F_L0()
1232 JSHandle<EcmaString> str = factory->NewFromASCII("a"); in HWTEST_F_L0()
1238 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1239 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1241 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1242 parser.Parse(); in HWTEST_F_L0()
1243 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1249 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1253 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1254 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1255 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aaaa:aa"); in HWTEST_F_L0()
1257 JSHandle<EcmaString> str = factory->NewFromASCII("aaaa:"); in HWTEST_F_L0()
1263 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1264 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1266 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1267 parser.Parse(); in HWTEST_F_L0()
1268 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1274 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1278 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1279 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1280 JSHandle<EcmaString> inputStr = factory->NewFromASCII("caab"); in HWTEST_F_L0()
1282 JSHandle<EcmaString> str = factory->NewFromASCII("a"); in HWTEST_F_L0()
1288 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1290 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1291 parser.Parse(); in HWTEST_F_L0()
1292 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1298 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1304 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1305 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1307 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1308 parser.Parse(); in HWTEST_F_L0()
1309 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1315 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1319 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1320 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1321 JSHandle<EcmaString> inputStr = factory->NewFromASCII("cabab"); in HWTEST_F_L0()
1324 JSHandle<EcmaString> str0 = factory->NewFromASCII(""); in HWTEST_F_L0()
1325 JSHandle<EcmaString> str1 = factory->NewFromASCII("ab"); in HWTEST_F_L0()
1332 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1333 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1334 CString source("[a-z]"); in HWTEST_F_L0()
1335 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1336 parser.Parse(); in HWTEST_F_L0()
1337 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1343 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1347 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1348 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1349 JSHandle<EcmaString> inputStr = factory->NewFromASCII("A"); in HWTEST_F_L0()
1351 JSHandle<EcmaString> str = factory->NewFromASCII("A"); in HWTEST_F_L0()
1357 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1358 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1359 CString source("[^a-b]"); in HWTEST_F_L0()
1360 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1361 parser.Parse(); in HWTEST_F_L0()
1362 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1368 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1372 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1373 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1374 JSHandle<EcmaString> inputStr = factory->NewFromASCII("Z"); in HWTEST_F_L0()
1376 JSHandle<EcmaString> str = factory->NewFromASCII("Z"); in HWTEST_F_L0()
1382 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1383 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1385 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1386 parser.Parse(); in HWTEST_F_L0()
1387 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1393 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1397 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1398 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1399 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\n"); in HWTEST_F_L0()
1401 JSHandle<EcmaString> str = factory->NewFromASCII("\n"); in HWTEST_F_L0()
1407 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1408 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1410 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1411 parser.Parse(); in HWTEST_F_L0()
1412 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1418 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1422 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1423 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1424 JSHandle<EcmaString> inputStr = factory->NewFromASCII(""); in HWTEST_F_L0()
1427 JSHandle<EcmaString> str0 = factory->NewFromASCII(""); in HWTEST_F_L0()
1434 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1435 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1437 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1438 parser.Parse(); in HWTEST_F_L0()
1439 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1445 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
1449 …JSHandle<builtins::RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegE… in HWTEST_F_L0()
1450 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1451 JSHandle<EcmaString> inputStr = factory->NewFromASCII(""); in HWTEST_F_L0()
1453 JSHandle<EcmaString> str0 = factory->NewFromASCII(""); in HWTEST_F_L0()
1455 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(1).GetInt(), -1); in HWTEST_F_L0()
1460 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1461 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1463 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1464 parser.Parse(); in HWTEST_F_L0()
1465 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1470 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1473 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1474 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1475 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabb"); in HWTEST_F_L0()
1478 JSHandle<EcmaString> str0 = factory->NewFromASCII("abb"); in HWTEST_F_L0()
1479 JSHandle<EcmaString> str1 = factory->NewFromASCII("b"); in HWTEST_F_L0()
1486 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1487 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1489 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1490 parser.Parse(); in HWTEST_F_L0()
1491 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1496 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1499 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1500 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 3U); in HWTEST_F_L0()
1501 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabb"); in HWTEST_F_L0()
1505 JSHandle<EcmaString> str0 = factory->NewFromASCII("abb"); in HWTEST_F_L0()
1506 JSHandle<EcmaString> str1 = factory->NewFromASCII("ab"); in HWTEST_F_L0()
1507 JSHandle<EcmaString> str2 = factory->NewFromASCII("b"); in HWTEST_F_L0()
1515 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1516 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1518 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1519 parser.Parse(); in HWTEST_F_L0()
1520 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1525 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1529 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1530 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1531 JSHandle<EcmaString> inputStr = factory->NewFromASCII("qyqya"); in HWTEST_F_L0()
1533 JSHandle<EcmaString> str = factory->NewFromASCII("qya"); in HWTEST_F_L0()
1539 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1540 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1542 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1543 parser.Parse(); in HWTEST_F_L0()
1544 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1549 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1552 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1553 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1554 JSHandle<EcmaString> inputStr = factory->NewFromASCII("qyqy "); in HWTEST_F_L0()
1556 JSHandle<EcmaString> str = factory->NewFromASCII("qy"); in HWTEST_F_L0()
1562 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1563 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1564 CString source("(\\d{4})-(\\d{2})-(\\d{2})"); in HWTEST_F_L0()
1565 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1566 parser.Parse(); in HWTEST_F_L0()
1567 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1570 CString input("xx2021-01-09"); in HWTEST_F_L0()
1572 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1575 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1576 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 4U); in HWTEST_F_L0()
1577 JSHandle<EcmaString> inputStr = factory->NewFromASCII("xx2021-01-09"); in HWTEST_F_L0()
1582 JSHandle<EcmaString> str0 = factory->NewFromASCII("2021-01-09"); in HWTEST_F_L0()
1583 JSHandle<EcmaString> str1 = factory->NewFromASCII("2021"); in HWTEST_F_L0()
1584 JSHandle<EcmaString> str2 = factory->NewFromASCII("01"); in HWTEST_F_L0()
1585 JSHandle<EcmaString> str3 = factory->NewFromASCII("09"); in HWTEST_F_L0()
1594 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1595 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1597 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1598 parser.Parse(); in HWTEST_F_L0()
1599 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1604 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1607 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1608 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 3U); in HWTEST_F_L0()
1609 …JSHandle<EcmaString> inputStr = factory->NewFromASCII("The Quick Brown Fox Jumps Over The Lazy Dog… in HWTEST_F_L0()
1613 JSHandle<EcmaString> str0 = factory->NewFromASCII("Quick Brown Fox Jumps"); in HWTEST_F_L0()
1614 JSHandle<EcmaString> str1 = factory->NewFromASCII("Brown"); in HWTEST_F_L0()
1615 JSHandle<EcmaString> str2 = factory->NewFromASCII("Jumps"); in HWTEST_F_L0()
1623 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1624 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1626 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1627 parser.Parse(); in HWTEST_F_L0()
1628 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1633 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1636 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1637 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1638 JSHandle<EcmaString> inputStr = factory->NewFromASCII("abABc"); in HWTEST_F_L0()
1641 JSHandle<EcmaString> str0 = factory->NewFromASCII("abABc"); in HWTEST_F_L0()
1642 JSHandle<EcmaString> str1 = factory->NewFromASCII("AB"); in HWTEST_F_L0()
1649 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1650 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1651 CString source("^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$"); in HWTEST_F_L0()
1652 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1653 parser.Parse(); in HWTEST_F_L0()
1654 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1659 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1662 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1663 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 3U); in HWTEST_F_L0()
1664 JSHandle<EcmaString> inputStr = factory->NewFromASCII("www.netscape.com"); in HWTEST_F_L0()
1668 JSHandle<EcmaString> str0 = factory->NewFromASCII("www.netscape.com"); in HWTEST_F_L0()
1669 JSHandle<EcmaString> str1 = factory->NewFromASCII("netscape."); in HWTEST_F_L0()
1670 JSHandle<EcmaString> str2 = factory->NewFromASCII("netscap"); in HWTEST_F_L0()
1678 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1679 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1681 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1682 parser.Parse(); in HWTEST_F_L0()
1683 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1688 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1691 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1692 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1693 JSHandle<EcmaString> inputStr = factory->NewFromASCII("baaaac"); in HWTEST_F_L0()
1696 JSHandle<EcmaString> str0 = factory->NewFromASCII("b"); in HWTEST_F_L0()
1697 JSHandle<EcmaString> str1 = factory->NewFromASCII(""); in HWTEST_F_L0()
1704 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1705 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1707 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1708 parser.Parse(); in HWTEST_F_L0()
1709 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1714 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1717 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1718 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1719 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ab"); in HWTEST_F_L0()
1721 JSHandle<EcmaString> str = factory->NewFromASCII(""); in HWTEST_F_L0()
1727 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1728 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1730 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1731 parser.Parse(); in HWTEST_F_L0()
1732 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1737 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1740 …JSHandle<builtins::RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegE… in HWTEST_F_L0()
1741 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 4U); in HWTEST_F_L0()
1742 JSHandle<EcmaString> inputStr = factory->NewFromASCII("baaabaac"); in HWTEST_F_L0()
1746 JSHandle<EcmaString> str0 = factory->NewFromASCII("baaabaac"); in HWTEST_F_L0()
1747 JSHandle<EcmaString> str1 = factory->NewFromASCII("ba"); in HWTEST_F_L0()
1748 JSHandle<EcmaString> str3 = factory->NewFromASCII("abaac"); in HWTEST_F_L0()
1751 ASSERT_EQ(regExpGlobalResult->GetEndOfCaptureIndex(2).GetInt(), -1); in HWTEST_F_L0()
1757 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1758 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1759 CString source("[a-c\\d]+"); in HWTEST_F_L0()
1760 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1761 parser.Parse(); in HWTEST_F_L0()
1762 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1767 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1770 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1771 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1772 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\n\n\\abc324234"); in HWTEST_F_L0()
1774 JSHandle<EcmaString> str = factory->NewFromASCII("abc324234"); in HWTEST_F_L0()
1780 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1781 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1783 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1784 parser.Parse(); in HWTEST_F_L0()
1785 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1790 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1793 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1794 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1795 JSHandle<EcmaString> inputStr = factory->NewFromASCII("line1\nline2"); in HWTEST_F_L0()
1797 JSHandle<EcmaString> str = factory->NewFromASCII("1\nl"); in HWTEST_F_L0()
1803 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1804 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1806 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1807 parser.Parse(); in HWTEST_F_L0()
1808 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1813 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1816 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1817 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1818 JSHandle<EcmaString> inputStr = factory->NewFromASCII("abc\bdef"); in HWTEST_F_L0()
1820 JSHandle<EcmaString> str = factory->NewFromASCII("c\bd"); in HWTEST_F_L0()
1826 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1827 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1829 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1830 parser.Parse(); in HWTEST_F_L0()
1831 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1836 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1839 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1840 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1841 JSHandle<EcmaString> inputStr = factory->NewFromASCII("easy\bto\u0008ride"); in HWTEST_F_L0()
1843 JSHandle<EcmaString> str = factory->NewFromASCII("easy"); in HWTEST_F_L0()
1849 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1850 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1852 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1853 parser.Parse(); in HWTEST_F_L0()
1854 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1859 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1862 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1863 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 3U); in HWTEST_F_L0()
1864 JSHandle<EcmaString> inputStr = factory->NewFromASCII("Course_Creator = Test"); in HWTEST_F_L0()
1867 JSHandle<EcmaString> str0 = factory->NewFromASCII("Course_Creator = Test"); in HWTEST_F_L0()
1868 JSHandle<EcmaString> str1 = factory->NewFromASCII("Course_Creator"); in HWTEST_F_L0()
1875 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1876 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1878 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1879 parser.Parse(); in HWTEST_F_L0()
1880 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1885 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1888 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1889 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1890 JSHandle<EcmaString> inputStr = factory->NewFromASCII("pilOt\nsoviet robot\topenoffice"); in HWTEST_F_L0()
1892 JSHandle<EcmaString> str = factory->NewFromASCII("et"); in HWTEST_F_L0()
1898 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1899 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1901 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 2); in HWTEST_F_L0()
1902 parser.Parse(); in HWTEST_F_L0()
1903 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1908 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1911 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1912 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 5U); in HWTEST_F_L0()
1913 JSHandle<EcmaString> inputStr = factory->NewFromASCII("ab55"); in HWTEST_F_L0()
1919 JSHandle<EcmaString> str0 = factory->NewFromASCII("ab55"); in HWTEST_F_L0()
1920 JSHandle<EcmaString> str1 = factory->NewFromASCII("ab55"); in HWTEST_F_L0()
1921 JSHandle<EcmaString> str2 = factory->NewFromASCII("b"); in HWTEST_F_L0()
1922 JSHandle<EcmaString> str3 = factory->NewFromASCII("5"); in HWTEST_F_L0()
1923 JSHandle<EcmaString> str4 = factory->NewFromASCII("5"); in HWTEST_F_L0()
1933 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1934 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1935 CString source("(?<year>\\d{4})-(?<date>\\d{2}-(?<day>\\d\\d))"); in HWTEST_F_L0()
1936 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1937 parser.Parse(); in HWTEST_F_L0()
1938 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1941 CString input("2020-12-31"); in HWTEST_F_L0()
1943 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1946 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1947 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 4U); in HWTEST_F_L0()
1948 JSHandle<EcmaString> inputStr = factory->NewFromASCII("2020-12-31"); in HWTEST_F_L0()
1953 JSHandle<EcmaString> str0 = factory->NewFromASCII("2020-12-31"); in HWTEST_F_L0()
1954 JSHandle<EcmaString> str1 = factory->NewFromASCII("2020"); in HWTEST_F_L0()
1955 JSHandle<EcmaString> str2 = factory->NewFromASCII("12-31"); in HWTEST_F_L0()
1956 JSHandle<EcmaString> str3 = factory->NewFromASCII("31"); in HWTEST_F_L0()
1965 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1967 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1968 parser.Parse(); in HWTEST_F_L0()
1969 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1974 parser.GetOriginBuffer(), true); in HWTEST_F_L0()
1977 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1978 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
1983 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
1984 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
1986 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
1987 parser.Parse(); in HWTEST_F_L0()
1988 bool parseResult = parser.IsError(); in HWTEST_F_L0()
1993 …ute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.length(), parser.GetOriginBuffer()); in HWTEST_F_L0()
1996 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
1997 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 2U); in HWTEST_F_L0()
1998 JSHandle<EcmaString> inputStr = factory->NewFromASCII("aabcdaabcd"); in HWTEST_F_L0()
2001 JSHandle<EcmaString> str0 = factory->NewFromASCII("aabcdaa"); in HWTEST_F_L0()
2002 JSHandle<EcmaString> str1 = factory->NewFromASCII("aa"); in HWTEST_F_L0()
2009 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
2010 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2012 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2013 parser.Parse(); in HWTEST_F_L0()
2014 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2019 parser.GetOriginBuffer(), true); in HWTEST_F_L0()
2022 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
2023 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
2024 JSHandle<EcmaString> inputStr = factory->NewFromUtf16(u"\u0001"); in HWTEST_F_L0()
2026 JSHandle<EcmaString> str = factory->NewFromASCII("\u0001"); in HWTEST_F_L0()
2032 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2034 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2035 parser.Parse(); in HWTEST_F_L0()
2036 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2041 parser.GetOriginBuffer(), false); in HWTEST_F_L0()
2047 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
2048 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2050 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2051 parser.Parse(); in HWTEST_F_L0()
2052 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2057 parser.GetOriginBuffer(), false); in HWTEST_F_L0()
2060 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
2061 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
2062 JSHandle<EcmaString> inputStr = factory->NewFromASCII("c\u0065"); in HWTEST_F_L0()
2064 JSHandle<EcmaString> str = factory->NewFromASCII("e"); in HWTEST_F_L0()
2070 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
2071 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2073 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2074 parser.Parse(); in HWTEST_F_L0()
2075 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2080 parser.GetOriginBuffer(), true); in HWTEST_F_L0()
2083 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
2084 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
2085 JSHandle<EcmaString> inputStr = factory->NewFromUtf16(u"a啊"); in HWTEST_F_L0()
2087 JSHandle<EcmaString> str = factory->NewFromUtf8("a啊"); in HWTEST_F_L0()
2093 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2095 …parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 16); in HWTEST_F_L0()
2096 parser.Parse(); in HWTEST_F_L0()
2097 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2101 …bool ret = executor.Execute(reinterpret_cast<const uint8_t *>(data), 0, 2, parser.GetOriginBuffer(… in HWTEST_F_L0()
2107 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
2108 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2110 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2111 parser.Parse(); in HWTEST_F_L0()
2112 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2116 …bool ret = executor.Execute(reinterpret_cast<const uint8_t *>(data), 0, 2, parser.GetOriginBuffer(… in HWTEST_F_L0()
2119 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
2120 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
2121 …JSHandle<EcmaString> inputStr = factory->NewFromUtf16(reinterpret_cast<const uint16_t *>(data), 2); in HWTEST_F_L0()
2124 JSHandle<EcmaString> str = factory->NewFromUtf16(reinterpret_cast<const uint16_t *>(data1), 1); in HWTEST_F_L0()
2130 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
2131 RegExpParser parser = RegExpParser(thread, chunk_); in HWTEST_F_L0() local
2133 … parser.Init(const_cast<char *>(reinterpret_cast<const char *>(source.c_str())), source.size(), 0); in HWTEST_F_L0()
2134 parser.Parse(); in HWTEST_F_L0()
2135 bool parseResult = parser.IsError(); in HWTEST_F_L0()
2141 …executor.Execute(reinterpret_cast<const uint8_t *>(input.c_str()), 0, input.size(), parser.GetOrig… in HWTEST_F_L0()
2145 …JSHandle<RegExpGlobalResult> regExpGlobalResult(thread->GetCurrentEcmaContext()->GetRegExpGlobalRe… in HWTEST_F_L0()
2146 ASSERT_EQ(regExpGlobalResult->GetTotalCaptureCounts().GetInt(), 1U); in HWTEST_F_L0()
2147 JSHandle<EcmaString> inputStr = factory->NewFromASCII("\u000B"); in HWTEST_F_L0()
2149 JSHandle<EcmaString> str = factory->NewFromASCII("\u000B"); in HWTEST_F_L0()