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:
1 parent
f71a4a6975
commit
c438d5fa92
2 files changed
+36
-3
No files matched your search
@@ -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