summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js')
-rw-r--r--js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js b/js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js
new file mode 100644
index 0000000000..23ef34454f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArray/prototype/length/BigInt/return-length.js
@@ -0,0 +1,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);