20 const Smi& idx = Object::smi_zero();
26 uint8_t chars[] = {
'a',
'b',
'c',
'b',
'a'};
34 EXPECT_EQ(2, res.
Length());
41 const Smi& smi_1 = Smi::Cast(res_1);
42 const Smi& smi_2 = Smi::Cast(res_2);
43 EXPECT_EQ(1, smi_1.
Value());
44 EXPECT_EQ(3, smi_2.
Value());
48 uint16_t chars[] = {
'a',
'b',
'c',
'b',
'a'};
56 EXPECT_EQ(2, res.
Length());
63 const Smi& smi_1 = Smi::Cast(res_1);
64 const Smi& smi_2 = Smi::Cast(res_2);
65 EXPECT_EQ(1, smi_1.
Value());
66 EXPECT_EQ(3, smi_2.
Value());
ObjectPtr At(intptr_t index) const
static ArrayPtr Execute(const RegExp ®exp, const String &input, const Smi &start_offset, bool sticky, Zone *zone)
static OneByteStringPtr New(intptr_t len, Heap::Space space)
static RegExpPtr CreateRegExp(Thread *thread, const String &pattern, RegExpFlags flags)
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static StringPtr New(Thread *thread, const char *cstr)
static Thread * Current()
static TwoByteStringPtr New(intptr_t len, Heap::Space space)
static ArrayPtr Match(const String &pat, const String &str)
ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction)
#define ARRAY_SIZE(array)