2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
The value of the internal [[Prototype]] property of the Error constructor
|
|
|
|
is the Function prototype object(15.3.4)
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.11.3_A1_T1
|
2014-07-22 01:09:02 +02:00
|
|
|
description: >
|
|
|
|
Checking prototype of constructor of the newly constructed Error
|
|
|
|
object
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#1
|
2018-02-15 21:50:18 +01:00
|
|
|
var err1 = Error("err");
|
|
|
|
if (!Function.prototype.isPrototypeOf(err1.constructor)) {
|
|
|
|
$ERROR('#1: var err1=Error("err"); Function.prototype.isPrototypeOf(err1.constructor) return true. Actual:' + Function.prototype.isPrototypeOf(err1.constructor));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#2
|
2018-02-15 21:50:18 +01:00
|
|
|
if (!Function.prototype.isPrototypeOf(Error.constructor)) {
|
|
|
|
$ERROR('#2: Function.prototype.isPrototypeOf(Error.constructor) return true. Actual:' + Function.prototype.isPrototypeOf(Error.constructor));
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|