Support string iterator for strings longer than 64K (#4727)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -75,3 +75,15 @@ assert(next.value === undefined);
|
||||
|
||||
assert(iterator.toString() === '[object String Iterator]');
|
||||
assert(iterator[Symbol.toStringTag] === 'String Iterator');
|
||||
|
||||
iterator = (' '.repeat(80000))[Symbol.iterator]();
|
||||
next = iterator.next();
|
||||
idx = 0;
|
||||
|
||||
while (!next.done) {
|
||||
assert(next.value === ' ');
|
||||
assert(next.done === false);
|
||||
next = iterator.next();
|
||||
idx++;
|
||||
}
|
||||
assert(idx == 80000);
|
||||
|
||||
Reference in New Issue
Block a user