Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArrayConstructors / ctors / length-arg / is-symbol-throws.js
bloba383eb453c60466361437b2f80a2a8c00240859c
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-typedarray-length
5 description: >
6   If length is a Symbol, throw a TypeError exception.
7 info: |
8   22.2.4.2 TypedArray ( length )
10   This description applies only if the TypedArray function is called with at
11   least one argument and the Type of the first argument is not Object.
13   ...
14   4. Let numberLength be ? ToNumber(length).
15   ...
16 includes: [testTypedArray.js]
17 features: [Symbol, TypedArray]
18 ---*/
20 var s = Symbol('1');
22 testWithTypedArrayConstructors(function(TA) {
23   assert.throws(TypeError, function() {
24     new TA(s);
25   });
26 });
28 reportCompare(0, 0);