tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

not-a-constructor.js (510B)


      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);