diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2018-02-15 18:03:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 18:03:39 -0500 |
commit | 7024f3fa11e7e5169c4d42fc8ee7de3e93f7de9d (patch) | |
tree | f2f7a2758bade35564399fad33fd8cb9fa98580f /test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.js | |
parent | afa24856b4b9bc00315b3e47745187d33c471406 (diff) | |
parent | 857f1d429b939c6feef1951041b5c91c9f3a8b4a (diff) | |
download | qtdeclarative-testsuites-7024f3fa11e7e5169c4d42fc8ee7de3e93f7de9d.tar.gz |
Merge pull request #1413 from leobalter/cxielarko-bigint-ta-3
BigInt+TypedArray tests, splitted
Diffstat (limited to 'test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.js')
-rw-r--r-- | test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.js b/test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.js new file mode 100644 index 000000000..f8279f50a --- /dev/null +++ b/test/built-ins/TypedArrays/ctors/object-arg/object-arg-length-excessive-throws.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-typedarray-object +description: > + Return abrupt from allocating array buffer with excessive length +info: | + 22.2.4.4 TypedArray ( object ) + + This description applies only if the TypedArray function is called with at + least one argument and the Type of the first argument is Object and that + object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] + internal slot. + + ... + 6. Perform ? AllocateTypedArrayBuffer(O, len). + ... +includes: [testTypedArray.js] +features: [TypedArray] +---*/ + +var obj = { + length: Math.pow(2, 53) +}; + +testWithTypedArrayConstructors(function(TA) { + assert.throws(RangeError, function() { + new TA(obj); + }); +}); |