Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArray / from / invoked-as-func.js
blob97ce6b2ff980664e1d6132745f199ccf4e6bb918
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%.from
5 description: >
6   "from" cannot be invoked as a function
7 info: |
8   22.2.2.1 %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )
10   1. Let C be the this value.
11   2. If IsConstructor(C) is false, throw a TypeError exception.
12   ...
13 includes: [testTypedArray.js]
14 features: [TypedArray]
15 ---*/
17 var from = TypedArray.from;
19 assert.throws(TypeError, function() {
20   from([]);
21 });
23 reportCompare(0, 0);