diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js')
-rw-r--r-- | js/src/tests/test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js b/js/src/tests/test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js new file mode 100644 index 0000000000..05a95c91fe --- /dev/null +++ b/js/src/tests/test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js @@ -0,0 +1,16 @@ +// |reftest| skip-if(!this.hasOwnProperty('SharedArrayBuffer')) -- SharedArrayBuffer is not enabled unconditionally +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// Copyright (C) 2017 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: Return value from [[ByteLength]] internal slot +features: [SharedArrayBuffer] +---*/ + +var ab1 = new SharedArrayBuffer(0); +assert.sameValue(ab1.byteLength, 0); + +var ab2 = new SharedArrayBuffer(42); +assert.sameValue(ab2.byteLength, 42); + +reportCompare(0, 0); |