summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js
blob: 23ef34454f115b270be487432e267b4421badf91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-get-%typedarray%.prototype.length
description: >
  Return value from the [[ArrayLength]] internal slot
info: |
  22.2.3.18 get %TypedArray%.prototype.length

  ...
  6. Let length be the value of O's [[ArrayLength]] internal slot.
  7. Return length.

  ---

  The current tests on `prop-desc.js` and `length.js` already assert `length` is
  not a dynamic property as in regular arrays.
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/

testWithBigIntTypedArrayConstructors(function(TA) {
  var ta1 = new TA();
  assert.sameValue(ta1.length, 0);

  var ta2 = new TA(42);
  assert.sameValue(ta2.length, 42);
});

reportCompare(0, 0);