Debian Codegraph @

js/src/tests/test262/built-ins/Math/f16round/not-a-constructor.js

raw
1 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-ecmascript-standard-built-in-objects
6 description: >
7 Math.f16round does not implement [[Construct]], is not new-able
8 includes: [isConstructor.js]
9 features: [Float16Array, Reflect.construct]
10 ---*/
11
12 assert(!isConstructor(Math.f16round), "Math.f16round is not a constructor");
13
14 assert.throws(TypeError, function () {
15 new Math.f16round();
16 });
17
18 reportCompare(0, 0);