Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Evaluate the production ArrayLiteral: [ ]
6 *
7 * @path ch11/11.1/11.1.4/S11.1.4_A1.1.js
8 * @description Checking various properties of the array defined with expression "var array = []"
9 */
11 var array = [];
13 //CHECK#1
14 if (typeof array !== "object") {
15 $ERROR('#1: var array = []; typeof array === "object". Actual: ' + (typeof array));
16 }
18 //CHECK#2
19 if (array instanceof Array !== true) {
20 $ERROR('#2: var array = []; array instanceof Array === true');
21 }
23 //CHECK#3
24 if (array.toString !== Array.prototype.toString) {
25 $ERROR('#3: var array = []; array.toString === Array.prototype.toString. Actual: ' + (array.toString));
26 }
28 //CHECK#4
29 if (array.length !== 0) {
30 $ERROR('#4: var array = []; array.length === 0. Actual: ' + (array.length));
31 }