tests/auto/qml/ecmascripttests/test262/test/built-ins/global/S15.1_A1_T1.js
raw| 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | info: The global object does not have a [[Construct]] property |
| 6 | es5id: 15.1_A1_T1 |
| 7 | description: > |
| 8 | It is not possible to use the global object as a constructor with |
| 9 | the new operator |
| 10 | ---*/ |
| 11 | |
| 12 | var global = this; |
| 13 | |
| 14 | assert.throws(TypeError, function() { |
| 15 | new global; |
| 16 | }); |