js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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  * The production x &= y is the same as x = x & y
     6  *
     7  * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js
     8  * @description Type(x) and Type(y) vary between primitive number and Number object
     9  */
    11 //CHECK#1
    12 x = 1;
    13 x &= 1;
    14 if (x !== 1) {
    15   $ERROR('#1: x = 1; x &= 1; x === 1. Actual: ' + (x));
    16 }
    18 //CHECK#2
    19 x = new Number(1);
    20 x &= 1;
    21 if (x !== 1) {
    22   $ERROR('#2: x = new Number(1); x &= 1; x === 1. Actual: ' + (x));
    23 }
    25 //CHECK#3
    26 x = 1;
    27 x &= new Number(1);
    28 if (x !== 1) {
    29   $ERROR('#3: x = 1; x &= new Number(1); x === 1. Actual: ' + (x));
    30 }
    32 //CHECK#4
    33 x = new Number(1);
    34 x &= new Number(1);
    35 if (x !== 1) {
    36   $ERROR('#4: x = new Number(1); x &= new Number(1); x === 1. Actual: ' + (x));
    37 }

mercurial