Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/prop-desc.js

raw
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 /*---
5 es6id: 20.2
6 esid: sec-math-object
7 description: >
8 Property descriptor of Math
9 info: |
10 The Math Object
11
12 [...]
13 The Math object is not a function object. It does not have a [[Construct]]
14 internal method; it is not possible to use the Math object as a constructor
15 with the new operator. The Math object also does not have a [[Call]] internal
16 method; it is not possible to invoke the Math object as a function.
17
18 17 ECMAScript Standard Built-in Objects:
19
20 Every other data property described in clauses 18 through 26 and in Annex B.2
21 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
22 [[Configurable]]: true } unless otherwise specified.
23 includes: [propertyHelper.js]
24 ---*/
25
26 assert.sameValue(typeof Math, "object", "no [[Call]]");
27 assert.throws(TypeError, function() {
28 new Math();
29 }, "no [[Construct]]");
30
31 verifyNotEnumerable(this, "Math");
32 verifyWritable(this, "Math");
33 verifyConfigurable(this, "Math");