js/src/tests/js1_5/Array/11.1.4.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     6 //-----------------------------------------------------------------------------
     7 var BUGNUMBER = 260106;
     8 var summary = 'Elisons in Array literals should not be enumed';
     9 var actual = '';
    10 var expect = '';
    11 var status;
    12 var prop;
    13 var array;
    15 printBugNumber(BUGNUMBER);
    16 printStatus (summary);
    18 status = summary + ' ' + inSection(1) + ' [,1] ';
    19 array = [,1];
    20 actual = '';
    21 expect = '1';
    22 for (prop in array)
    23 {
    24   if (prop != 'length')
    25   {
    26     actual += prop;
    27   }
    28 }
    29 reportCompare(expect, actual, status);
    31 status = summary + ' ' + inSection(2) + ' [,,1] ';
    32 array = [,,1];
    33 actual = '';
    34 expect = '2';
    35 for (prop in array)
    36 {
    37   if (prop != 'length')
    38   {
    39     actual += prop;
    40   }
    41 }
    42 reportCompare(expect, actual, status);
    44 status = summary + ' ' + inSection(3) + ' [1,] ';
    45 array = [1,];
    46 actual = '';
    47 expect = '0';
    48 for (prop in array)
    49 {
    50   if (prop != 'length')
    51   {
    52     actual += prop;
    53   }
    54 }
    55 reportCompare(expect, actual, status);
    57 status = summary + ' ' + inSection(4) + ' [1,,] ';
    58 array = [1,,];
    59 actual = '';
    60 expect = '0';
    61 for (prop in array)
    62 {
    63   if (prop != 'length')
    64   {
    65     actual += prop;
    66   }
    67 }
    68 reportCompare(expect, actual, status);

mercurial