| 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 [[Class]] property of the newly constructed object is set to "Error" |
| 6 |
es5id: 15.11.2.1_A3_T1 |
| 7 |
description: > |
| 8 |
Checking Class of the newly constructed Error object using |
| 9 |
toSting() function |
| 10 |
---*/ |
| 11 |
|
| 12 |
////////////////////////////////////////////////////////////////////////////// |
| 13 |
//CHECK#1 |
| 14 |
Error.prototype.toString = Object.prototype.toString; |
| 15 |
var err1 = new Error(); |
| 16 |
if (err1.toString() !== '[object ' + 'Error' + ']') { |
| 17 |
$ERROR('#1: err1.toString()===\'[object Error]\'. Actual: ' + err1.toString()); |
| 18 |
} |
| 19 |
// |
| 20 |
////////////////////////////////////////////////////////////////////////////// |