summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Symbol/errors.js
blob: d6eb37abc495ac7bcdca988bdd0076f6e82c5a3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/ */

// Section numbers cite ES6 rev 24 (2014 April 27).

var sym = Symbol();

// 7.2.2 IsCallable
assertThrowsInstanceOf(() => sym(), TypeError);
assertThrowsInstanceOf(() => Function.prototype.call.call(sym), TypeError);

// 7.2.5 IsConstructor
assertThrowsInstanceOf(() => new sym(), TypeError);
assertThrowsInstanceOf(() => new Symbol(), TypeError);

if (typeof reportCompare === "function")
    reportCompare(0, 0);