| 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 isNaN property can't be used as constructor |
| 6 | es5id: 15.1.2.4_A2.7 |
| 7 | es6id: 18.2.3 |
| 8 | esid: sec-isnan-number |
| 9 | description: > |
| 10 | If property does not implement the internal [[Construct]] method, |
| 11 | throw a TypeError exception |
| 12 | ---*/ |
| 13 | |
| 14 | //CHECK#1 |
| 15 | |
| 16 | try { |
| 17 | new isNaN(); |
| 18 | $ERROR('#1.1: new isNaN() throw TypeError. Actual: ' + (new isNaN())); |
| 19 | } catch (e) { |
| 20 | if ((e instanceof TypeError) !== true) { |
| 21 | $ERROR('#1.2: new isNaN() throw TypeError. Actual: ' + (e)); |
| 22 | } |
| 23 | } |