Debian Codegraph @

js/src/tests/test262/language/statements/for-in/resizable-buffer.js

raw
1 // Copyright 2023 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-arraybuffer-length
6 description: >
7 Indices of TypedArrays backed by resizable buffers are enumerable with
8 for-in
9 includes: [resizableArrayBufferUtils.js]
10 features: [resizable-arraybuffer]
11 ---*/
12
13 let rab = CreateResizableArrayBuffer(100, 200);
14 for (let ctor of ctors) {
15 const ta = new ctor(rab, 0, 3);
16 let keys = '';
17 for (const key in ta) {
18 keys += key;
19 }
20 assert.sameValue(keys, '012');
21 }
22
23 reportCompare(0, 0);