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
|
|
|
/*---
|
|
|
|
info: String.fromCharCode has not [[construct]] method
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.5.3.2_A4
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Checking if creating "new String.fromCharCode" fails
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var __fcc__func = String.fromCharCode;
|
|
|
|
|
|
|
|
delete String.fromCharCode;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#1
|
|
|
|
try {
|
|
|
|
var __obj = new __fcc__func(65,66,66,65);
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
|
2014-07-22 01:09:02 +02:00
|
|
|
} catch (e) {
|
2012-02-25 00:40:42 +01:00
|
|
|
if (e instanceof Test262Error) throw e;
|
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|