js/src/tests/test262/ch08/8.6/S8.6_A4_T1.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * An Object is an unordered collection of properties
     6  *
     7  * @path ch08/8.6/S8.6_A4_T1.js
     8  * @description Simple using a few custom properties
     9  */
    11 ///////////////////////////////////////////////////////
    12 // CHECK#1
    13 var obj = {bar:true, some:1, foo:"a"};
    15 var count=0;
    17 for (property in obj)	count++;
    19 if (count !== 3){
    20   $ERROR('#1: obj = {bar:true, some:1, foo:"a"}; count=0; for (property in obj) count++; count === 3. Actual: ' + (count));
    21 }
    22 //
    23 ////////////////////////////////////////////////////////
    25 ///////////////////////////////////////////////////////
    26 // CHECK#2
    27 var obj_ = {bar:true};
    28 obj_.some = 1;
    29 obj_.foo = "a";
    31 count=0;
    33 for (property in obj_) count++;
    35 if (count !== 3){
    36   $ERROR('#2: obj_ = {bar:true}; obj_.some = 1; obj_.foo = "a"; count=0; for (property in obj_) count++; count === 3. Actual: ' + (count));
    37 }
    38 //
    39 ////////////////////////////////////////////////////////
    41 ///////////////////////////////////////////////////////
    42 // CHECK#3
    43 var obj__ = new Object();
    44 obj__.bar = true;
    45 obj__.some = 1;
    46 obj__.foo = "a";
    48 count=0;
    50 for (property in obj__)	count++;
    52 if (count !== 3){
    53   $ERROR('#3: obj__ = new Object(); obj__.bar = true; obj__.some = 1; obj__.foo = "a"; for (property in obj__)  count++; count === 3. Actual: ' + (count));
    54 }
    55 //
    56 ////////////////////////////////////////////////////////

mercurial