Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArray / prototype / join / shell.js
blobeda1477282520548ae28183583fd14cd1502d6cd
1 // GENERATED, DO NOT EDIT
2 // file: isConstructor.js
3 // Copyright (C) 2017 AndrĂ© Bargull. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
6 /*---
7 description: |
8     Test if a given function is a constructor function.
9 defines: [isConstructor]
10 features: [Reflect.construct]
11 ---*/
13 function isConstructor(f) {
14     if (typeof f !== "function") {
15       throw new Test262Error("isConstructor invoked with a non-function value");
16     }
18     try {
19         Reflect.construct(function(){}, [], f);
20     } catch (e) {
21         return false;
22     }
23     return true;