Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Error/S15.11.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: |
6 The function call Error(...) is equivalent to the object creation expression new
7 Error(...) with the same arguments
8 es5id: 15.11.1_A1_T1
9 description: Checking constructor of the newly constructed Error object
10 ---*/
11
12 //////////////////////////////////////////////////////////////////////////////
13 //CHECK#1
14 Error.prototype.toString = Object.prototype.toString;
15 var err1 = Error();
16 if (err1.constructor !== Error) {
17 $ERROR('#1: Error.prototype.toString=Object.prototype.toString; var err1=Error(); err1.constructor===Error. Actual: ' + err1.constructor);
18 }
19 //
20 //////////////////////////////////////////////////////////////////////////////