js/src/tests/test262/ch11/11.4/11.4.4/S11.4.4_A2.1_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  * Operator ++x uses GetValue and PutValue
     6  *
     7  * @path ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js
     8  * @description Type(x) is Reference and GetBase(x) is not null
     9  */
    11 //CHECK#1
    12 var x = 1;
    13 if (++x !== 1 + 1) {
    14   $ERROR('#1: var x = 1; ++x === 1 + 1. Actual: ' + (++x));
    15 } else {
    16   if (x !== 1 + 1) {
    17     $ERROR('#1: var x = 1; ++x; x === 1 + 1. Actual: ' + (x));
    18   } 
    19 }
    21 //CHECK#2
    22 this.x = 1;
    23 if (++this.x !== 1 + 1) {
    24   $ERROR('#2: this.x = 1; ++this.x === 1 + 1. Actual: ' + (++this.x));
    25 } else {
    26   if (this.x !== 1 + 1) {
    27     $ERROR('#2: this.x = 1; ++this.x; this.x === 1 + 1. Actual: ' + (this.x));
    28   } 
    29 }
    31 //CHECK#3
    32 var object = new Object();
    33 object.prop = 1;
    34 if (++object.prop !== 1 + 1) {
    35   $ERROR('#3: var object = new Object(); object.prop = 1; ++object.prop === 1 + 1. Actual: ' + (++object.prop));
    36 } else {
    37   if (this.x !== 1 + 1) {
    38     $ERROR('#3: var object = new Object(); object.prop = 1; ++object.prop; object.prop === 1 + 1. Actual: ' + (object.prop));
    39   } 
    40 }

mercurial