Support string iterator for strings longer than 64K (#4727)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
This commit is contained in:
Zoltan Herczeg authored and GitHub committed 2021-08-03 10:44:19 +02:00
1 parent f71a4a6975
commit c438d5fa92
2 files changed
+36 -3

No files matched your search

+12
View File
@@ -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);