| 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 value of the internal [[Prototype]] property of the Error constructor |
| 7 |
is the Function prototype object(15.3.4) |
| 8 |
es5id: 15.11.3_A1_T1 |
| 9 |
description: > |
| 10 |
Checking prototype of constructor of the newly constructed Error |
| 11 |
object |
| 12 |
---*/ |
| 13 |
|
| 14 |
////////////////////////////////////////////////////////////////////////////// |
| 15 |
//CHECK#1 |
| 16 |
var err1 = Error("err"); |
| 17 |
if (!Function.prototype.isPrototypeOf(err1.constructor)) { |
| 18 |
$ERROR('#1: var err1=Error("err"); Function.prototype.isPrototypeOf(err1.constructor) return true. Actual:' + Function.prototype.isPrototypeOf(err1.constructor)); |
| 19 |
} |
| 20 |
// |
| 21 |
////////////////////////////////////////////////////////////////////////////// |
| 22 |
|
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
//CHECK#2 |
| 25 |
if (!Function.prototype.isPrototypeOf(Error.constructor)) { |
| 26 |
$ERROR('#2: Function.prototype.isPrototypeOf(Error.constructor) return true. Actual:' + Function.prototype.isPrototypeOf(Error.constructor)); |
| 27 |
} |
| 28 |
// |
| 29 |
////////////////////////////////////////////////////////////////////////////// |