Debian Codegraph @

rhino/testsrc/tests/js1_5/Array/11.1.4.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = '11.1.4.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 260106;
9 var summary = 'Elisons in Array literals should not be enumed';
10 var actual = '';
11 var expect = '';
12 var status;
13 var prop;
14 var array;
15
16 printBugNumber(BUGNUMBER);
17 printStatus (summary);
18
19 status = summary + ' ' + inSection(1) + ' [,1] ';
20 array = [,1];
21 actual = '';
22 expect = '1';
23 for (prop in array)
24 {
25 if (prop != 'length')
26 {
27 actual += prop;
28 }
29 }
30 reportCompare(expect, actual, status);
31
32 status = summary + ' ' + inSection(2) + ' [,,1] ';
33 array = [,,1];
34 actual = '';
35 expect = '2';
36 for (prop in array)
37 {
38 if (prop != 'length')
39 {
40 actual += prop;
41 }
42 }
43 reportCompare(expect, actual, status);
44
45 status = summary + ' ' + inSection(3) + ' [1,] ';
46 array = [1,];
47 actual = '';
48 expect = '0';
49 for (prop in array)
50 {
51 if (prop != 'length')
52 {
53 actual += prop;
54 }
55 }
56 reportCompare(expect, actual, status);
57
58 status = summary + ' ' + inSection(4) + ' [1,,] ';
59 array = [1,,];
60 actual = '';
61 expect = '0';
62 for (prop in array)
63 {
64 if (prop != 'length')
65 {
66 actual += prop;
67 }
68 }
69 reportCompare(expect, actual, status);