aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/ch15/15.11/15.11.4/S15.11.4_A4.js
blob: 2b9dd3ce97dbf2d3f4d622fd041a4fced444667b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * Since Error prototype object is not function it has not [[create]] method
 *
 * @path ch15/15.11/15.11.4/S15.11.4_A4.js
 * @description Checking if creating "new Error.prototype" fails
 */

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
try {
	__instance = new Object.prototype;
	$FAIL('#1: "__instance = new Object.prototype" lead to throwing exception');
} catch (e) {
    if (e instanceof Test262Error) throw e;
}
//
//////////////////////////////////////////////////////////////////////////////