Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/String/fromCharCode/S15.5.3.2_A1.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: The length property of the fromCharCode function is 1
6 es5id: 15.5.3.2_A1
7 description: Checking String.fromCharCode.length
8 ---*/
9
10 //////////////////////////////////////////////////////////////////////////////
11 //CHECK#1
12 if (typeof String.fromCharCode !== "function") {
13 $ERROR('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
14 }
15 //
16 //////////////////////////////////////////////////////////////////////////////
17
18 //////////////////////////////////////////////////////////////////////////////
19 //CHECK#2
20 if (!(String.hasOwnProperty("fromCharCode"))) {
21 $ERROR('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
22 }
23 //
24 //////////////////////////////////////////////////////////////////////////////
25
26 //////////////////////////////////////////////////////////////////////////////
27 //CHECK#3
28 if (String.fromCharCode.length !== 1) {
29 $ERROR('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
30 }
31 //
32 //////////////////////////////////////////////////////////////////////////////