Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/String/fromCharCode/S15.5.3.2_A4.js

raw
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: String.fromCharCode has not [[construct]] method
6 es5id: 15.5.3.2_A4
7 description: Checking if creating "new String.fromCharCode" fails
8 ---*/
9
10 var __fcc__func = String.fromCharCode;
11
12 delete String.fromCharCode;
13
14 //////////////////////////////////////////////////////////////////////////////
15 //CHECK#1
16 try {
17 var __obj = new __fcc__func(65, 66, 66, 65);
18 $ERROR('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
19 } catch (e) {
20 if (e instanceof Test262Error) throw e;
21 }
22 //
23 //////////////////////////////////////////////////////////////////////////////